5.1: Analysis Engines
The ChessDB analysis window shows the analysis by a chess program (known as an engine) of the current board position. Whenever the board changes, ChessDB sends the new position to the engine and it shows its assessment of that position. The analysis window using the supplies Toga II 1.3x4 engine is shown here. Since this is a UCI engine, ChessDB can show several lines of analyis. In the following, 6 lines of analysis are shown. With Black to move, he has two lines which give Black an advantage (...Rgxg7 and ...Rhxg7), as well as several which would be blunders, as they would give white a significant advantage.
The score shown in the analysis window is always from the perspective of White, so a negative score indicates Black is better.
If only one line is shown, as in the below with Crafty 20.14, the lower frame in the window (with the scrollbar) shows the history of evaluations produced by the engine for the current position, so you can see how the assessment has changed. If multiple lines are shown, as above with Toga II 1.3x4, then the lower frame shows the multiple lines, but you can not see the history.
To add the best move chosen by the engine as a new move in the current game, press the Add move button.
ChessDB maintains a list of the engines you have used, along with an estimated Elo rating (if you guess one) and the date when each engine was last used. You can sort the engine list by name, Elo rating, or date. Select the New or Edit buttons to add a new engine to the list or edit the details for an existing entry.
A demo version of Rybka is included in ChessDB. This is version 2.1, but is limited to only 1 second for analysis. To get the full version of Rybka (the strongest chess engine at the time of writing), you will need to purchase it. Several free engines are included in ChessDB, including Toga II 1.3x4, which is the strongest free engine at the time of writing (August 2007).
For each engine, you must specify the executable file to run and which directory ChessDB should run it in. and whether the engine is a UCI or Winboard engine - the difference is in the protocol the engines use to talk to the interface. Common engines and the protocols they used are:
- Beowulf (Winboard)
- Chessdblet (Winboard)
- Crafty (Winboard)
- Fruit (UCI)
- Gandalf (UCI)
- Gnuchess (Winboard)
- Hiarcs (UCI)
- Jupiter (Winboard)
- Phalanx (Winboard)
- Rybka (UCI)
- Ruffian (UCI and Winboard)
- Scidlet (Winboard)
- Shredder (UCI and Winboard)
- Spike (UCI and Winboard)
- The Barron (Winboard)
- Toga (UCI)
- Yace (Winboard and UCI)
- Zappa (Winboard and UCI)
If you are not sure what your engine is, try both - it will not do any harm. The code to autodetect the engine type has not yet been written, but it is expected to appear in the final 3.6.19 release, but not the beta release.
The most likely cause of engine starting problems is the choice of which directory the engine should run in. Some engines require an initialization or opening book file in their start directory to run properly. Other engines (like Crafty) write log files to the directory they start in, so you will need to run them in a directory where you have write access. If the directory setting for an engine is ".", ChessDB will just start the engine in the current directory.
So if an engine that should work fine in ChessDB does not start, try changing its directory setting. To avoid engines creating log files in many different directories, I recommend starting engines in the directory of the ChessDB User files (this is where the chessdb.exe file is located on Windows, or ~/.chessdb/ on Unix); there is a button in the dialog box for editing engine details marked chessdb.exe dir on Windows or ~/.chessdb on Unix that lets you set the engine to start in this directory.
UCI Engine OptionsWith a UCI engine, ChessDB can often set a very large number of parameters - most of which you will probably want to ignore. If you click on 'Configure UCI engine' you will see the paramters list. Just change them if you want.
With the Training button, you can play moves against the analysis engine. The time for each move is fixed, and the analysis results are not shown when training mode is on.
Annotating a game
The Add variation button in the analysis window adds the current score and best line of play as a new variation in the game.
You can do this automatically for a number of moves (annotating the game) by pressing the Annotate button. This prompts you for some annotation options and then turns on autoplay mode.
When autoplay mode is used and the analysis window is open, a variation containing the score and best line of play is automatically added for each position as autoplay mode moves through the game. Only positions from the current position until the end of the game (or until you exit autoplay mode) are annotated, so you can skip annotation of opening moves by moving to a middlegame position before starting autoplay.
To cancel annotation at any time, just turn off autoplay mode, for example by pressing the Escape key in the main window.
Note that for simplicity, the Annotate button is only available in the window opened as analysis engine 1. If you open an engine as analysis engine 2, you cannot use it to annotate the game.
Pressing the chessboard-icon button in an analysis window will show or hide the analysis board, which shows the position at the end of the current best line of play found by the engine. This works for most ChessDB-compatible engines but may not work for all; it depends on the move notation an engine uses.
Turing the engine on/offYou can stop the engine's analysis at at time by clicking the magnifying glass. This is useful on a laptop, as it saves power.
Engine vs EngineIf you press the left-arrow, the engine #1 will move for both sides, playing the best line for that colour at any point. If you want to have an engine vs engine contest, then ChessDB is not the ideal tool, but it can be done - see here.
If an engine is using too much CPU time and affecting the use of ChessDB or other applications, turning on the Low CPU priority checkbox may help; it gives the engine a low priority for CPU scheduling.
Using Winboard/Xboard Chess engines
To use the analysis window, you will usually use a chess program that supports the WinBoard/Xboard protocol.
ChessDB sends he xboard, post and protover 2 to an engine when it starts, and will use the setboard and analyze commands for more efficient communication if the engine responds indicating that it supports them. If an engine does not support the setboard command, it will not be able to provide analysis in any game that begins with a non-standard start position.
For programs that do not support the analyze command, ChessDB sends the following commands every time the position changes: new and force, then the moves in the game to the current position, then go.
Bob Hyatt's free chess program Crafty is easy to set up in ChessDB. It is a reasonably strong engine and works well. Many other WinBoard or XBoard compatible programs have been successfully used with ChessDB.
Using Universal Chess Interface (UCI) Chess engines
Another protocol used by some chess engines is the UCI protocol. This tends to be used more by commerical engines, such as Rybka, `Fritz and Shredder. ChessDB directly supports the UCI protocol, so it is possible to use UCI chess engines - there is no need to use the program Polyglot to use UCI engines, which was needed on earlier releases of ChessDB.
Toga II is a chess engine which uses the UCI protocol. In some quick tests, where Toga II version 1.2.1a was played against Crafty 20.14 inside ChessDB, Toga won every game, so is almost certainly a stronger chess engine than Crafty. However, the data shown by Toga II is not as useful as that shown with Crafty, as it does not show the move number. The screenshot below is for Toga analysing the same position as was analysed above using Crafty above - both engines suggest the best move is d5, but Crafty shows this is black's 10th move, Toga does not.
Links to some chess engines which can be used with ChessDB.
The Crazy Bishop: http://remi.coulom.free.fr/
If you would like to contribute to the tutorial or see anything that should be updated, corrected or improved, please contact David Kirkby. But please note David only speaks English.
Website administered by Dr. David Kirkby
This page was last modified: September 16, 2007. 11:41:41 am GMT