Cristi - blog


GNU Chess and XBoard

Recording chess games in digital format

You don't need software to keep a record of your games. Using a pen and paper would suffice. However, I like to store my games in computer files using PGN (which uses algebraic chess notation as well as additional markings to codify a game). PGN is a plain text computer-processible format for recording chess games, supported by many chess programs. It was devised around 1993, by Steven J. Edwards, and was first popularized via the Usenet newsgroup rec.games.chess.

PGN is useful for interchange of games with other users (especially small collections of games) as many programs can import PGN games, and as an archival format that doesn't depend on a computer program remaining available to interpret a binary format many years later. From now on, I'll be posting my games in PGN format in the chess directory of my website. I always write down the moves during the game so that afterwards I can import them into XBoard.

XBoard is a graphical user interface which serves as a front-end for many different chess services, including chess engines that will run on your machine and play a game against you or help you analyze (such as GNU Chess, Crafty, or many others), chess servers on the Internet (where you can connect to play chess with people from all over the world, watch other users play, or just hang out and chat) or correspondence chess (played by electronic mail).

GNU Chess and XBoard

GNU Chess is a free chess-playing program, developed as part of the GNU project of the Free Software Foundation (FSF). It can be used to play chess against the computer on a terminal or, more commonly, as a chess engine for graphical chess frontends such as XBoard. The current version is 6.1.2 at the time of writing and you can download it from gnu.org, along with the manual. In order to run XBoard with GNU Chess as a backend:
xboard -fcp 'gnuchess --xboard'
xboard -fd . -fcp './gnuchess --xboard'

After I fire them up, I'll press Ctrl+E for 'edit game' mode and replay the moves I wrote down or simply import a game I have transcribed in PGN format. You can show or hide move history by pressing Alt+Shift+H. One of the features I find particularly useful is right clicking a move to go back to a previous position.

I analyze my games to compare my decisions against concrete evidence. Engines are cool, but I think it's better not to use one immediately. I replay the moves of the game and find all the places where one side gained an advantage. I recommend using the software only when you have done your analysis already (by writing down all the variations).

Afterwards, you can go from 'edit game' to 'analyze game' (Ctrl+G). This option subjects the currently loaded game to automatic analysis by the loaded engine. XBoard will start auto-playing the game from the currently displayed position, while the engine is analyzing the current position. The game will be annotated with the results of these analyses. In particlar, the score and depth will be added as a comment, and the PV will be added as a variation.

You can also analyze a position after you set it up, by using 'analysis mode' (Ctrl+A). XBoard tells the chess engine to start analyzing the current game/position and shows you the analysis as you move pieces around. The chess engine will help you find a better move than what you might come up with on your own. If you haven't already, be sure to give one a go.

Posted 01 November 2014.

← Previous: The Cloud is Not Great

Next: Migrate or backup IMAP accounts →


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.