Chess Assistant 23 & Chess Assistant 22
Chess Assistant 23 combines advanced game database management, analysis powered by the strongest engines, the advanced Tree mode, Opening Encyclopedia and many other features.

Chess Assistant 23 €75.96
Chess Assistant 22 €47.48

ChessOK.com » Introduction to Tree Configurations
Introduction to Tree Configurations 25 September 2008

Rybka 3 Aquarium logotype Many chess software users are familiar with electronic opening books.
Chess players use them to study openings and build their repertoire, freestyle players use them for a similar purpose, and engine testers use them to ensure balanced positions out of the opening, etc.
Opening books are one application of chess trees, but Aquarium uses trees for many other purposes and takes this concept to a new level with its tree configurations.

Chess Trees
Chess trees are a collection of positions and the moves that connect them. A simple example is shown in the image, where the circles represent positions and the arrows the moves that connect them.
Here you can see, for instance, that Black is to move in position P1 and is only given two choices in this tree. He must either play 9…O-O leading to position P2 or 9…c5 leading to position P3.
Although this structure is often referred to as a chess tree or simply a tree, transpositions and cycles mean that it is not a tree in the graph-theoretic sense. It is important to note that each position is only stored once in the chess tree.
This means that regardless of the moves played to reach it, the exact same information will be displayed: same statistics, same evaluation, etc.
A chess tree.

Aquarium Chess Trees

Trees are used more extensively in Aquarium than any other similar software. They are used in every type of analysis, even infinite analysis and, of course, for opening books. Aquarium trees can be used for annotating positions, not only using symbols (!, ? etc.) but also textual annotations and board graphics. Trees also typically store various statistics about positions. This information is displayed in a spreadsheet like format when viewed in Aquarium, where each column displays a specific type of information. Trees in Aquarium can store and display the following types of data, or columns as they are usually called:

  • Number of games. The number of times the move has been played.
  • Success is the percentage score for the given move.
  • Elo is the rating of the highest rated player who played the move.
  • Year when the move was last played.
  • Human evaluations in symbol form (=, +– …).
  • Computer evaluations in centipawns (+0.19).
  • Played percents. The percentage of games where the move has been played.
  • Annotation. Text and graphical annotations.
  • Hash Score and Hash Depth display information from Rybka’s hashtable while she is analyzing.
What is a Tree Configuration?
Although a chess tree can be very useful on its own, the real power of Aquarium comes from its ability to combine information from several different trees into a single view. The view is defined through a tree configuration.
Let’s say that you have created a tree with game statistics. Later on you want to see Rybka’s evaluations of these positions.
You might think of adding the evaluations to the statistics tree, but it’s much simpler and more flexible to use a separate evaluation tree and then create a combined view of the two trees. Such a tree, Rybka CAP, actually comes with Aquarium so you can immediately update your tree configuration to see what Rybka thinks of the positions in your tree. The image below illustrates how you can create a tree configuration from these two trees.
A tree configuration.

On the top left we have the statistics tree and to the right another separate tree with evaluations. At the bottom of the image we see a screenshot from Aquarium displaying the merged information. The “Total” column displays the number of games. We can see, for instance, that the move 9… O-O has been played 150 times. The left red arrow shows that this information comes from the statistics tree. Similarly, by looking at the Rybka column in the tree configuration, we see that Rybka’s evaluation of the position after 9…O-O is 0.13. And this information comes from the evaluation tree as the red arrow shows.

Looking at the image it should be clear why the different types of data stored in a tree are usually referred to as “columns.” It’s because of the way the tree data is displayed in columns in the tree window in Aquarium. So every column you see in a tree configuration comes from one of its trees. The “Move” column is slightly different. As long as a move can be found in one of the trees it will be displayed there in addition to moves from the game notation.

Note that in order to keep the image simple only one type of data is shown in each tree. In reality each tree will usually contain two or more types of data, or columns.

You can add as many trees and columns as you like to a configuration. The “Success” column could display the percentage score of each move. That information would more than likely be available in the statistics tree, so all you have to do is add another column from that tree to the configuration. You might also want to see the evaluation of a second chess engine in the tree. In that case you would need an additional tree containing the engine’s evaluation. This would allow you to view the evaluations of the two engines side by side. The possibilities are only limited by your imagination.

What Are the Advantages of Tree Configurations?

Tree configurations allow a modular approach that has several advantages over single-tree books:

Data from several sources can be used to create a tree configuration. You can use your own trees, standard Aquarium trees or trees that you download from the Internet to compose a new opening book. If your current opening book doesn’t cover gambits, for instance, you might be able to find a gambit tree produced by someone else and add it to your opening book.

There is no need to merge the data from the trees that comprise the tree configuration. The trees that go into the tree configuration stay as separate trees. This makes it easy to update or replace individual trees, without affecting the others. If we continue with the gambit tree example, you might find that someone else made a better gambit tree than the one you are currently using, and all you have to do is add it to your configuration and remove the old one.

The same tree can be used in multiple tree configurations. The same tree can easily be used in as many tree configurations as you like. You could, for instance, use the same statistics tree in several different configurations. Note that this only requires a single copy of the tree. No copying or data duplication is required, which makes maintenance much easier.

After a tree configuration has been created it can be used just as simply as if it were a single tree. Once you have created a tree configuration, it is handled by Aquarium as a single entity, no matter how complex its structure may be.

The “Main Tree”

Every tree configuration has a special tree, called the “Main Tree,” which allows the user to classify and order the moves in the tree configuration. The Main Tree holds information about:

  • Move colors. Move colors can be used to select which moves are played and which are not when a tree configuration is used as an opening book. They are also useful when a player builds an opening repertoire and wants to classify the moves, e.g., mark moves that he is currently investigating. Both 9…O-O and 9…c5 have been colored green in the image below.
  • Move ordering (you can reorder moves by pressing Shift+Up and Shift +Down in the tree window). Move ordering is displayed in the “flg” column in red type. In the image below 9…O-O has been put at the top of the list (“1”) and 9…c5 is second (“2”). User-chosen move-ordering will mainly be interesting once a user gets near or beyond the “tips” of the tree or known theory. Then he can use this method to order the moves as dictated by the results of his investigations.
  • Flags (‘flg’ column). There are four flags available for marking moves. Currently these flags can be used for classifying moves any way the user sees fit.
The Main Tree affects the “Move” and “flg” columns.

The Main Tree also stores moves that you add to the tree configuration after selecting “Add moves to main tree” from the tree window right-click menu.

The “Discarded Moves” Tree

The “Discarded Moves” tree is another special tree that is a part of every tree configuration. As with many other features of Aquarium’s tree functionality, this idea comes from Dagh Nielsen, one of the world’s top freestyle players and opening expert. His goal was to create a superior book editing environment that would be useful for both the “engine-book editor” and the “common user who uses the tree/book format to support/store his analysis.” In general his emphasis on flexibility and fast operation had a big influence on this part of Aquarium.
The Discarded Moves tree has a very special role. While all other trees can add moves and information, the Discarded Moves tree does the opposite. It “turns off” moves, so they are treated as if they weren’t a present in the tree configuration until they are “turned on” again.
In this image, 9…c5 has been discarded, as can be seen by the purple asterisk following the move in the tree window. Discarded moves are an excellent tool for experimenting with books and for training purposes.
Discarded moves are ignored.

Practical Use of the Special Trees

The Main Tree and the Discarded Moves tree add a completely new dimension to opening books. Let’s take an example of an opening book author who is creating a new opening book in Aquarium. If his target group contains various types of chess players and engine operators, then it’s unlikely that a single book will suit all of them. A strong titled chess player is interested in different openings than a club player, a solid player wants something completely different than a young and adventurous player and chess engine operators and testers are yet another group with special and varied requirements. So what can the book author do? The answer is that with a little planning he can use the same book as a base and simply prepare special versions of the Main Tree and the Discarded Moves tree to create tree configurations that reflect the requirements of different groups. Here are some examples:

  • The strong players: This configuration would emphasize openings played at the highest level. It might be a good idea to create this configuration first, because the Main Tree and Discarded Moves tree could provide a good start starting point for some of the other configurations.
  • The club players: This configuration might play all the variations in the strong players version, but add many others, such as all kinds of gambits and aggressive openings.
  • The Kamikaze: This configuration would only play gambits and highly aggressive opening lines. This configuration would have little in common with the strong players configuration.
  • The solid player. This configuration would only play the most solid openings and variations.
  • Engines: The strong players configuration could most likely be used successfully for engines, but many engine operators would prefer more variety in the opening. So this configuration might be based on the strong players configuration and then be expanded to include additional openings and variations that are popular in chess engine competitions.

Using this method we are giving the same opening book completely different “personalities” by combining it with different Main Trees and Discarded Moves trees, i.e., by creating different tree configurations.

The real beauty of this approach is that once the book author has created these different configurations he can reuse them. The next version of his opening book may be based on a different game collection, but when he uses it in the Kamikaze configuration it will still play those wild openings!

What all this means is that the opening book author has much more flexibility than before and most importantly, he can reuse much of the work he put into the previous version.

Of course any Aquarium user can create configurations that emphasize his favorite openings and then use those configurations with any published opening book or create his own.
Altering a Tree Configuration
To alter a tree configuration, click the Options button on the Tree tab when viewing a game.
You’ll see the “Tree configuration” dialog:

The “Select configuration” drop-down list at the top of the screenshot allows you to select an existing tree configuration. In this case we have selected “Annotations”.
The “New…” button allows you to create a new configuration with the assistance of the “New tree configuration” wizard, which leads you through the creation process step by step.
The “Delete” button deletes the currently selected configuration. This is the correct way to remove a tree configuration.
Note that it doesn’t touch the trees themselves – only the information about that particular configuration is deleted.
A tree configuration.

The list of columns in the current tree configuration is displayed in the middle of the window under the heading “Configuration columns.” The “Name” column displays the text that will be used as a heading in the tree window. You can modify the name by double-clicking the cell. The “Tree” column shows which tree the data is coming from and the “Visible” column controls its visibility in the tree window. Doubleclicking on a tree allows you to choose a different tree for a column.

The two arrow buttons to the right of the column list allow you to change the order of the columns as they are displayed in the tree window. To move a column, first click on it in the column list and then click the up or down arrow buttons to move it.

Below the column list there are three buttons, “Add…,” “Remove” and “Add DST….” These allow you to add or remove columns from the configuration. If you want to remove a column, click on it in the column list and then click the Remove button. “Add DST….” adds all columns specified in a tree descriptor file to the configuration. Clicking the “Add…” button displays the “New column” dialog box.
Here you can select the tree (“Tree path”) that contains the column you want to add. The “Column type” field is a drop-down list that allows you to select one of the column types, as described in the “Aquarium Chess Trees” section above. Finally, the “Column name” will be the heading used for the new column in the tree window. After filling out these three fields click OK to add the new column to the configuration.
Adding a column to a configuration.

Clicking the “Advanced…” button in the lower left corner of the “Tree configurations” window displays additional configuration options.
This is where you can select the Main Tree (“Main tree path”) and the Discarded Moves tree (“Discarded tree path”) that we discussed above.
Advanced configuration settings.

Tree Configurations as Opening Books

Aquarium comes with five tree configurations that can be used as opening books. They are also a good starting point for creating new books:

  • NarrowBook
  • WideBook
  • CTGExample
  • HandicapBook
  • Annotations

If you create a new configuration based on one of these, your new configuration can be used as an opening book.

When you view a tree configuration in the tree window, you can see if it can be used as an opening book by the presence a “Play%” column, which displays the probability of each move being played.

Creating a New Opening Book from an Existing One
Here we will see how you can create a new opening book based on one of the books that come with Aquarium.

This is the simplest way to create a new book. It is also recommended that you use this method if you intend to modify one of Aquarium’s standard books.

If you make a mistake, you can always start again, but it may not be easy to undo changes that you make to the standard books.
Start by bringing up the “Tree configurations” dialog box as was explained above and select the tree configuration on which you want to base the new opening book.
In the image above I have selected the Annotations configuration. Next click the “New…” button to start the new tree configuration wizard.
The wizard supports five different ways of creating a new configuration, although we will only examine one of them here.
The new tree configuration wizard.

As you can see, the default option is exactly the one we are interested in: “Copy current configuration (Annotations).” So all we have to do is click the Next button.
Here you give your new configuration a name and click Finish.
The “Tree configurations” dialog will be displayed again, now containing the new configuration.
You can then modify it as was described in the “Altering a Tree Configuration” section above.
Editing Opening Books

After creating an opening book, or any tree configuration for that matter, you can further tune it by using move coloring. The default move color priorities are shown in the following image.
The default rule is: Play only green moves, if possible. If no green moves are available, play blue or black moves, if possible. If all moves are discarded, orange or red, don’t play any move from the opening book and pass the position to the engine.
Default move priorities.

You can color the moves green, blue, orange and red, and discard them by right-clicking on them in the tree window and selecting the appropriate color. A much faster method is to use the keyboard shortcuts to color the moves (5: green, 4: blue, 3: orange, 2: red, 8: discarded). The play percentages are immediately updated as you change the colors. This way you can configure your opening book to play or avoid certain moves and variations.

A text description is given for each color in Aquarium, but you should not take those descriptions too literally and use the colors in whatever way suits you best. Dagh Nielsen, for example, preferred to call green moves “Approved” instead of “Good” and red moves “Inferior” instead of “Bad.” For other colors he used the description you see in Aquarium.

Dadi Jonsson.

Study chess online on Chess King Learn! Time-proven training courses, thousands of examples and exercises.

Start playing right now in your web browser on Chess King Playing Zone! Teams, tournaments, training, analysis and much more!

Download weekly chess database updates (containing 2000+ games) with latest tournaments and games in PGN and Chess Assistant format.

More »