Wordsmith(scrabble)

From OLPC
Jump to navigation Jump to 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 meaning of words in an interactive way.
I totally understand the legalities, hence i would have some different variations to prevent this issue from cropping up.
I would use TuxWordSmith as the base code for my activity. TuxWordSmith is python based, but with unicode support for multiple languages and character sets and would be a solid base for wordsmith.

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.
Also, the game would keep tabs on words which have been already pronounced a set number of times. These words won't be spoken again.

The repetition value would be depended on the age of the child. with more repetition for smaller age group.

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

  • (Optional)Scoring would use local currency. This would help the child learn about the local currency system.
  • 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 recorded 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.

http://www.freebsoft.org/doc/speechd/speech-dispatcher_15.html#SEC57
it is as simple as
import speechd
client = speechd.SSIPClient('test')
client.set_output_module('festival')
client.set_language('en')
client.set_punctuation(speechd.PunctuationMode.SOME)
client.speak("Hello World!")
client.close()

Base code would be borrowed from TuxWordSmith (http://www.schoolforge.net/education-software/educational-games/tuxwordsmith), which is a python based scrabble implementation but with unicode support for multiple languages and character sets.
Glade will be used to create the basic outline of UI.

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.
  • Gstreamer lib would be used for sounds.
  • The game would use the customized dictionary which would be using word list from Words activity.The dictionary would use the 'SQlite' as the DB engine.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

Its structure can be modeled as follows:

word
meaning
Usage
level

I have the idea in my mind that the dictionary can be in a separate file, which can either be accessed by applications ( like wordsmith ) for their use, or have an independent frontend to function as a stand alone dictionary.

  • History : The game 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

Deliverables

I understand the the project is quite vast. The proposal details are my vision as to what the final activity should look like. However, the project would have three deliverables: 1) UI with multiplayer mode and AI -- Essential and priority 2) Above with Team play, Thesaurus, Hinting and watching, multiple undo 3) Speech tools, community Hinting, Voice configuration.

And if time permits, i would try and write together a simple how to play scrabble tutorials, and other helpful documentations and links from across the net.