4.2: The Tree Window
The previous section introduced
the concepts of searches and the filter, and upcoming sections
explain the various types of search ChessDB can do for you.
Here we introduce a special search tool called the Tree window.
You can open or close the Tree using the Windows: Tree window
menu command, the Ctrl+T shortcut key, or
on the toolbar.
The Tree window is based on the observation that a very common
search users want to do is find all games with a particular
opening position, and see what moves were played from that
position. This is what the Tree window does for you. Whenever the
current displayed position (in the main window chessboard) changes,
the Tree re-searches your database and sets the filter to contain
only the games that reach the displayed position. It also lists
all the moves played from the position, along with their relative
success rate (always from White's perspective even if Black is
to move), and other useful statistics.
Open the sample.pgn file or the ChessDB-format database you created in ChessDB, load its first game now. Then open the Tree window. You should see something like the window shown here. At the start position, the Tree window shows that 1.e4 was played 64.6% of the time in this database, and scores 53.5% for White. Try loading other games in the database and move around the first few opening moves of each game, observing how the tree window contents (and the filter, as indicated in the main window status bar and the Switcher window) change whenever the chessboard changes. If you have the game list window open, you will also see its list change accordingly.
Sorting the Tree Move List
By default, the moves listed in the tree are sorted by frequency (how often each move has been played). This is usually the most useful, but other options are available from the Tree window Sort menu.
The Tree Graph
ChessDB can display the score column of the Tree as a graph.
In the Tree window, select the File / Graph window menu
command or press the
button. You should see a new window like the screenshot here, which
(in this case) shows that in the position after 1.e4, the moves
c5 and e5 have scored around 52% for White in this database,
but Black has done very poorly
(White has scored 68%) with 1...e6, the French defence.
This also shows that you
must be wary of statistics based on a small number of games, as 1.e4 e6
has only been played 11 times in this database.
Note that scores are always from the White perspective, even when Black is to move. The range 50% to 55% is given a light blue background to help it stand out. In master level chess White scores about 54-55% on average, so a bar much higher or lower than the top of the blue area represents a move that has had unusually good or poor results. The Tree graph also draws a red line representing the average (weighted mean by frequency) of all moves from the current position, so you can see how each move compares to the mean.
The Best Games List

The Best games list shows a list of the "best" selected games that
reach the current position. You can open it from the Tree window
File / Best games list menu command or the
button.
The "best" games are defined to be those with the highest combined Elo rating, so games between strong grandmasters will appear at the top of the list. There are two menubuttons in the Best games list window that you can use to alter the size of the list or restrict the list to contain certain results (such as White wins only).
The lower pane of the Best games list shows a preview of the currently selected game. For each game in the list, you can browse it (that is, view it in its own window without affecting the currently loaded game), load it, or merge it as a variation of the current game. This last option is useful for annotating a game by adding references to master games that reached the same opening variation.
Locking the Tree Window
You may find that you often want to browse games in one database, while viewing the Tree information of another database. For example, you may be browsing games in a small database and also have open a much larger reference database that you'd like the Tree window to use.
You can do this by locking the Tree to one database. To lock the tree, first make sure the database you want the Tree to use is selected, then press the Lock checkbox in the Tree window. Then switch to any other database, and the Tree will continue to use the locked database until you unlock it.
If you would like to contribute to the tutorial or see anything that should be updated, corrected or improved, please contact David Kirkby.