There is a very good introduction to the Tree view in the Aquarium manual. What I want to do here, is to focus on the tree configuration philosophy that we have implemented in Aquarium.
This article may seem hard to understand. I put all the information here, and the complexity increases as I proceed. So if you don't understand some part of it, don't worry - this will come later. For most difficult tasks we also plan to introduce simpler approaches.
Tree Configuration is an entity that is used everywhere in Aquarium. Tree Configuration consists of several columns that can be of different type. Each column has a tree associated with it, and the column is filled with the data from the corresponding tree:
As you see on the image, there are 4 columns currently displayed in the Tree window, apart from moves themselves and flags. Each of the columns (Eval, Total, CAP, Annotation) is based on a different tree file.
Moves shown in the tree window are all the moves that are present in ANY of the trees, or in the game notation.
The advantage of the tree configuration approach is that you don't need to copy the DATA to display it in different way. Different tree configurations may refer to the same trees. Data is stored in trees, appearance - in the configuration.
You can edit any tree configuration in any way: include or exclude columns, change the column types and trees. We'll discuss it later in detail.
Every tree configuration has two additional trees - Main tree and Discarded tree.
Main tree is responsible for:
- Move colors
- Move ordering (you can reorder moves my pressing Shift+Up and Shift+Down in Tree window).
- Flags ('flg' column)
Discarded tree is responsible for:
- Discarding moves
Setting Up Tree Configurations.
To alter the tree configuration, click Tree Options button on the Ribbon:
You'll see the Tree Configuration Options dialog:
Here, you can add and remove the confuguration's columns, create and remove the configurations themselves, re-order columns, render them visible/invisible, change the associated trees.
You can change the Main tree, by clicking Advanced button first.
I suggest you always create a copy of the existing configuration when you are going to experiment with it until you know what you are doing
When you add a column to a tree configuration, you must select the column type:
The available column types are:
- Number of games - number of times the move have been played
- Success - percentage of points taken by a side to move after playing the move
- Elo - maximum Elo of all who played the move
- Year - last year when the move was played
- Human evaluations - position evaluation in symbolic form (+=, ...)
- Computer evaluations - position evaluation in numeric form (+0.19)
- Percents - not implemented for now
- Categories - not implemented for now
- Reliability - not implemented for now
- Played percents - percents of times the move have been played, with respect to other moves
- Annotation - text and graphical annotation
- Hash Score - contents of Rybka 3's hash. Filled during analysis.
- Hash Depth - contents of Rybka 3's hash. Filled during analysis.
Usage as Opening Books.
Any tree configuration may be used as an opening book. Some of them are not suited for it - the engine will start playing from the very beginning. In the release version, the following configurations are valid opening books:
Every time you create a copy of one of the above tree configurations, your new configuration can be used as an opening book.
The first thing you see when viewing such a configuration is a 'Play%' column that displays a probability of playing each of the moves. These probabilities are used when the engine is playing with this book.
Editing opening books - a simple way.
You can edit the opening book percents by marking the moves green, blue, orange and red, and discarding them (5,4,3,2,8 keys). The percents are immediately updated. The rule is:
- Play only green moves, if possible.
- If no green moves available, play blue or black moves, of possible.
- If all moves are discarded, orange or red, don't play any move and pass the position to the engine.
This way you can configure your opening book to play certain moves.
Editing opening books - a versatile way.
Now we have to dig deeper into the Tree Configurations Options dialog:
Click 'Settings', and look at the following Advanced options dialog:
The 'Move colors' button enables you to change the policy by which the moves are selected. You can do this by dragging the colored squares up and down:
As you see on the above image, the current policy is the default one: make green moves first, if not available, make black and blue, never make orange, red and discarded.
As you have figured out, you can, for example, set the priority of 'interesting' (blue) move highest, etc.
Now the hardest part of it - bonuses.
As you have seen on the image, there are several other columns in the tree configuration, not shown in the first dialog. Most of them are of 'Bonus' type:
You can make these columns Visible, and you'll see the numbers in the tree configuration. They are bonuses, and they define the move percentages.
For each move we calculate the bonus in the following way:
- We find the column which 'ID' is the same as the bonus's column 'Column'.
- We take the numerical value X out of this column (for our current move).
- We take the function F which name is 'Function'.
- We calculate the Y = F(X). For example, for the 'identity' function F(X)=X, for 'constant' function F(X)=1, etc.
- We multiply Y by 'Weight': Bonus = Y*Weight.
All of the bonuses for a given move are summed up. The total bonuses are normalized and treated as play probability. Note that move colors take effect before this, so the move color policy hase higher priority then bonuses. But, when the move has non-positive bonus, it is never played, no matter what its color is.
How to know the function names? There's no GUI for this, but they are stored in the Config\tree_configurations.xml file. For those of you who is interested in this stuff, I'll explain even further, since I still omitted some of the opening book features.
Hope that this "Trees: getting started" description will help to use power of Aquarium trees better.
I just want to clarify the "discarded" Flag. Discarded Flag covers move collors i.e. colored moves temporarily lose their colors in opening book. Discarded Flag is adviced to be used for experimenting with books. For example you have three green moves 1.e4, 1.d4 and 1.c4. For some day you decided to play 1.c4 only to understand how good it is for some new engine. Surely you may unmark green moves 1.e4 and 1.d4 . But later you can forget what color was used for these moves, especially if these moves are not the first moves in the game. So another decision was accepted during beta testing - to discard moves. Discarded moves remember their color, but this color is ignored during game play. So you always know that you discard a move for some reason and are going to restore its initial state some time later.