Chess
This is what I was able to discover about chess on the OLPC. I just got it a couple of days ago, so I probably missed a lot.
Etoys
Launch Etoys, open a new project, drag out the "Object Catalog" from the treasure box in the menu, go to "Games" category and drag out "Chess".
Single-player against the computer, and a fairly weak opponent
on the web
Should be a bunch of places which will let you play on the web, both against a computer, and against other players. Need to find a couple and list them here.
xboard
xboard runs on linux, it has not been sugarized, so everything is from the Terminal
Installing
Open the terminal
su -l yum install xboard wget -P/usr/bin http://freechess.org/Download/timeseal_x86 chmod +x /usr/bin/timeseal_x86 exit
(The first time I installed xboard it, xboard itself failed, but the dependencies succeeded. I re-ran it, and it got xboard. Was this just a blip, or do other people have to do this too?)
Notes
- xboard tries by default to use the Helvetica font, which is not installed on the OLPC. So we need to override the font.
- when playing on fics, the timeseal makes it so that the time taken for your computer to talk to the server ("lag") doesn't count against your thinking time.
Playing
To play a game of chess against the computer: xboard -font 6x13 -coordFont 6x13 -clockFont 6x13
To play against other people online, at FICS: xboard -font 6x13 -coordFont 6x13 -clockFont cs -icshost 69.36.243.188 -icshelper timeseal_x86
You first need to go to their website and register for an account (It's free.)
when playing on fics, the console is in your shell window, another window comes up with the board. This shows up as a gray circle on the home screen
I'm DanTilkin on FICS, drop me a line if you're on there. I'd love to play you a game.
Shortcuts
Add the following to the bottom of the file ~/.bashrc , the Nano and Vi editors are installed by default:
alias fics="xboard -font 6x13 -coordFont 6x13 -clockFont cs -icshost 69.36.243.188 -icshelper timeseal_x86" alias gnuchess="xboard -font 6x13 -coordFont 6x13 -clockFont 6x13"
You can then just run "fics" to play on the server, or "gnuchess" to play the computer.
When xboard connects to a server, it runs the commands in the file "~/.icsrc". The first two lines should be your username and password, this will log you in automatically.
Two-player
With one computer, run like you're going to play the computer, then switch to "Edit game" under the mode menu.
With two computers, and internet access, you can both log on to FICS, and play each other using the "match" command.
PyChess
I was able to get Pychess installed and run, although not without problems. Pychess is less developed than xboard. It's also slower, which is a problem when playing blitz chess on a server. It does have a 2-player mode. It's also in python, and being actively developed, which probably make it a better candidate for OLPC development.
Installing
Read this whole section first. If it seems too complicated for you, it probably is. It's not your fault, it needs to be made easier.
- yum has version 0.6, but the current is 0.8 beta4, that's what I installed.
- This has a declared dependency on python version 2.4, but version 2.5 is installed, that's why the --nodeps argument to rpm is needed.
wget http://pychess.googlecode.com/files/pychess-0.8beta4.noarch.rpm rpm --nodeps -i pychess-0.8beta4.noarch.rpm
run as "PYTHONPATH=/usr/lib/python2.4/site-packages pychess"
It needs icons in "usr/share/icons/gnome/" subdirectories, but it doesn't find them. Not sure how to tell it where they are.
I wound up editing code in /usr/lib/python2.4/site-packages/pychess/widgets/ to add calls to icons.append_search_path, this isn't the right answer, but it worked.
I added the following lines, right after the object is created.
[olpc@xo-10-C4-41 widgets]$ grep append_search_path *.py
Background.py:it.append_search_path("/usr/share/icons/gnome/48x48/stock/generic")
Background.py:it.append_search_path("/usr/share/icons/Echo/16x16/actions")
Background.py:it.append_search_path("/usr/share/icons/gnome/48x48/stock/generic")
gamewidget.py:icons.append_search_path("/usr/share/icons/gnome/16x16/stock/object")
gamewidget.py:icons.append_search_path("/usr/share/icons/gnome/16x16/actions")
newGameDialog.py:it.append_search_path("/usr/share/icons/gnome/24x24/stock/generic/")
newGameDialog.py:it.append_search_path("/usr/share/icons/gnome/16x16/status/")
ToggleComboBox.py: it.append_search_path("/usr/share/icons/gnome/16x16/stock/image")
To-do
1. Install a bigger, easier to read font for use with xboard. (How?) 2. put font choices in .Xdefaults, rather than an alias. 3. install timeseal 4. Want to see the console and the board at the same time. 5. try other downloaded interfaces to fics. 6. try java interface to fics.
Activity
I'd love to see a chess activity for the OLPC. I did a search, didn't find anything. For the extensibility side, give kids an easy way to program their own chess engines.
Since Python is the preferred language, may want to investigate Pygame and PyChess
xboard and gnuchess are under the GPL, can possibly use those as a base.