Wordsmith(scrabble)

From OLPC
Revision as of 10:51, 2 April 2008 by AdityaV (talk | contribs) (realizing the project)
Jump to: navigation, search

Wordsmith, scrabble implementation for XO laptops

Idea

The idea is to make a internationalized version scrabble board game .The game would use Speech-dispatcher to spell out words resulting in it being a useful tool for students to learn pronunciation in an interactive way.

Need

Scrabble focuses on improving the thesaurus and abstract thinking of the players and hence is an important learning tool. The project aims to use Speech-Dispatcher to spell out words so that students can also learn correct pronunciation. They would also be able to learn new words by using the dictionary lookup feature, and proposed integration with Listen and Spell
Future versions of the game can also use speech recognition software so that the student has to spell the formed word as well to get the points.

Usage Scenarios

Team would be of 2 players
The game would be designed with these usage scenarios in mind:

Player/team vs cpu ( easy, medium, hard )
Player/team vs player/team
Player/team vs player/team with spectators (small number)
Community / tourney matches

A sample run:
Student would open the activity. The game would open the welcome screen, with following options:

  1. New Game - Creates a new gave against AI
  2. Multiplayer single opponent - Game against human
  3. Multiplayer team vs AI- Team Game against AI
  4. Multiplayer team vs Team- Team Game against another Team
  5. Spectate - opens the spectator window. It would list currently running games and the student can join if open.(i.e. flagged public)
  6. Replay - The game would give option to load a previously recorded game.

Features

All features which aren't marked optional are mandatory.

Speech Integration

The game will speak out formed words. However, controls would be implemented so that children belonging to higher age group wouldn't have to listen to every word being pronounced again and again.
The game would maintain a list of don't-pronounce words which are marked by student. Controls will be implemented in accordance to age group division which would go hand-in-hand with levels divided dictionary.

6-8 : all words would be spelled.
8-10: level 1 (words with less than 3 letters) won't be pronounced.
10-12: level 1, 2(words with less than 5 letters) won't be pronounced.
12-14: level 1,2,3( words with less than 6 letters) won't be pronounced.

Dictionary Lookup

A list of already played words would also be included, which when selected would also be spoken out, and would also be linked to the dictionary. This will help the child to learn new words as they encounter.

Integration with Listen and Spell( Optional )

The new words a child encounters in the game would automatically be referred to the Listen and Spell Activity. The Listen and Spell activity would then give more preference to these new words, enabling quick learning.

Hinting System

Children would be given hints which would carry a small penalty; the idea is to improve thesaurus of the child.

Multiplayer

Multiplayer support and spectator modes will be included.
Chat would be included too.
Games can be flagged Private and Public, so as to control their visibility on the mesh.

Team Play ( Optional )

team Play can be implemented in two ways

  1. Team player A would make a move. The game board would update and highlight the move and the dominant player can choose to veto or accept it. The issue can be discussed over chat.
  2. It can also be turn based. In this, player A would make move, while other player would watch. Then ,they would swap after opposition turn.
    Team chat would be disabled in this mode.

Community Hinting ( Optional )

Same as team play method (1), but this would be an option. This option would carry a small penalty.

  • The game would randomly select a spectator, or
  • The player can select a spectator from spectator list and select “hint me” option.

Multiple Undo

The game will provide multiple undo levels when the student plays against the computer. This will improve pattern finding ability.

game features

AI

  • The A.I. I have chosen to implement would be the Crab by Andrew W Appel and Guy J Jacobson. This research paper is the fastest implementation of scrabble algorithm which should run easily on XO laptops, and has enough power to pose a suitable challenge to children.

The paper is located here. http://www.gtoal.com/wordgames/jacobson+appel/aj.pdf

Keeping tabs

  • The game would enter a record in the journal if the game time is more than 5 minutes.
  • The game would be recorded move by move to a file. It can be played at a later stage.
  • High scores would be recoreded in Journal

(OPTIONAL) The game would include a list of top 10 highest scores it has encountered over the mesh (multiplayer gaming ) according to the age group.

Coolness factor

  • The game would use simple animations like blinking, zooming out while rotating, victory sounds etc to keep children entertained.

Voice Configuration ( Optional )

The student can edit voice configuration like volume, pitch, rate, language of the words and voice, gender of the voice etc.

Technical aspects

  • Speech-dispatcher: - The voicing would be done using speech dispatcher which would eventually be using espeak for synthesis. Espeak supports more than 30 international languages.
  • The game would use Pygtk and Cario and olpcgames wrapper libraries to construct the game. A lot of designing ideas would be borrowed from pyscrabble (http://pyscrabble.sourceforge.net/ ).

Glade will be used to create the basic outline of UI.

  • Telepathy, avahi, and mesh networking(PresenceService DBUS API ) would be used to implement chat and multiplayer components
  • The game would use Unicode and gettext to achieve internationalization.
Pango would be used for rendering text to screen
(http://www.gtoal.com/wordgames/#foreignscrab) would be used to for creating the tileset for different languages. this will help in addressing localization issue.
  • The game would use the customized dictionary which would be using word list from Words activity. The dictionary would have features like:
    • Level based: words divided into different levels according to number of letters
level division can be :
level 1 : words with less than 3 letters
level 2 : words with 3 to 5 letters
level 3 : words with 6 letters
level 4 : more than 6 letters
  • History : the dictionary would keep tabs on which letters the opponent used, and check if they have been originally used by the player or not. It would then suggest to Listen and Spell so that the child can learn these new words.

realizing the project

Initally, i was aiming to have a solid multiplayer mode with mesh implementation, as well as an ai for single player.After these are tested and debugged, i would start with Thesaurus, Hinting, Watching, (in that order) and then if there is time , the speech tools.

A skeleton game would be created which would include a minimalistic UI, definition of classes for board, tileset, player dictionary. An Entity-Relationship diagram would be posted on wiki so that feedback from community can be taken to implement certain method and avoid pitfalls.
AI would be implemented afterwards. This is essential for testing the skeleton game and implementing the hinting system.
The multiplayer component would be implemented after AI starts to work.
The UI would now be tweaked and made friendlier in nature. Features like dictionary lookup, integration with Listen and Spell would now be implemented here.
The replay system would be tackled next. I think this mode would require its own UI
The game would now be injected with a dozen of cool stuff like animations, sounds and so on.
The game would now be ready to undergo testing and evaluation.