Buy 3 chess training programs for the price of 2
Order any two training programs in our online chess shop and get a third training program absolutely free. If your order is more than $120 / €100 Euro, you will get additional present.

New CT-ART 5.0 combines three excellent courses guiding you from beginner to advanced level.

ChessOK.com » Aquarium 2016: Tree Generation Strategies
Aquarium 2016: Tree Generation Strategies 02 June 2016

Introduction

Aquarium 2016 introduces Tree Generation Strategies (TGS) in IDeA. Similar to Custom Tasks in previous versions this new feature generates a subtree of analyzed positions, starting from the current position. However, instead of manually setting the parameters every time you run a Custom Task, you pick a Tree Generation Strategy from a dropdown list. This means that it is very easy to use, but advanced users can also define their own or modify existing strategies.

Besides being easier to use, Tree Generation Strategies are more flexible than the older method offered by Custom Tasks. A set of branching factors/evaluation windows can be specified for each ply. The branching factor is reduced if the evaluation of any of the alternatives is different from the top choice by more than the smallest evaluation window for the given ply. After that a second pair of branching factor/evaluation window (if specified) will be used etc. until the evaluation of an alternative falls outside the biggest evaluation window or the branching limit has been reached. This gives finegrained control over the branching factor at each ply, depending on how much the evaluation of alternatives differs from the top move.

01

There is no practical limit on the length of the lines which can be generated and you have complete control over the shape of the generated tree, ply by ply. You can also set up different rules depending on who has the move in the root position, white or black. Therefore a Tree Generation Strategy is an excellent tool for fresh analysis or checking existing analysis, even if it wasn’t created with IDeA:

  • Check the mainline of previous analysis. This could be analysis you picked up from a chess book or a magazine or your own analysis, regardless of how it was created and what tools you used.
  • Check the mainline and variations of your analysis. Besides checking the mainline, a Tree Generation Strategy can also check the sidelines in the notation
  • Automatic initial seeding when you start a new IDeA project
  • Automatic seeding when you add a new root to your IDeA project
  • Deep analysis starting from a leaf node
  • Improve the quality of analysis in an IDeA project, by examining an existing branch of the project tree, extending short lines and adding alternatives where needed until they match the requirements defined in the Tree Generation Strategy.

The generated tasks are analyzed by the IDeA engines and the results of the analysis are added to the project tree like all other IDeA analysis. Less time is spent on analyzing inferior moves (based on the parameters defined in time_tuning.xml) and bad lines are not extended.

Tree Generation Strategy doesn’t interfere with other types of analysis. You can run infinite analysis at the same time, automatically sending tasks to the analysis queue (or directly to the project tree) or manually add positions that you want analyzed — and your IDeA analysis will of course continue normally.

You have the same flexibility in choosing analysis quality as you do in IDeA. By default the project’s time/depth (and Wait for next depth) combination is used, but you can also choose a different analysis quality for the tasks generated by the Tree Generation Strategy.

02

Using TGS with infinite analysis

The complete control over the shape of the tree is not only of interest for normal IDeA analysis. Users who limit themselves to infinite analysis can take advantage of this feature without activating automatic tree expansion. They can, for instance, use a strategy with a low branching factor and long lines using powerful multithreaded engine(s) for the analysis. That is, of course, equivalent to normal infinite analysis, but with automatic guidance through a predefined Tree Generation Strategy, instead of having to guide the engine manually through the variations. When the analysis is finished the resulting tree can be minimaxed, giving an overview of the results and pointing out the critical lines.

Another option is to use a Tree Generation Strategy with several singlecore engines in order to get an overview of the possible continuations. After that infinite analysis with a multithreaded engine can be used to check and improve the lines.

In both cases the results of the analysis can be automatically stored in a project tree. When you return to the same project at a later date, the results will be displayed automatically in the tree window.

Examples

03

Example 1: The graphic shows the evaluation window / branching factor for ply 2. Up to four alternatives will be generated within an evaluation window of ±0.4. If an alternative falls outside the evaluation window, no more alternatives will be generated. Only the branches within the evaluation window will be extended.

04

Example 2: The image on the left shows a more complicated example than we saw above. Here we have three sets of branching factors and evaluation windows. Eight alternatives will be generated at ply 2 as long as their evaluation differs 0.2 pawns or less from the best move. If an alternative is generated which deviates 0.20.4 pawns from the best move, then the limit is reduced to four alternatives. Finally, if an alternative is found which deviates 0.40.8 pawns from the best move, then the generation of alternatives will stop if/when two alternatives have been generated. If an alternative is encountered that deviates more than 0.8 pawns from the top choice, then no more alternatives will be created.

Example 3: You want to seed a new IDeA project using your favorite Tree Generation Strategy. You might, for instance, choose a strategy which analyzes many alternatives in the root position and then reduces the number of alternatives as the variations get longer, either explicitly or by tightening the evaluation bounds. Actually, Aquarium can automatically do this for you when you start a new project and also when you add a new root to a project!

Example 4: The same Tree Generation Strategy can contain different rules depending on whose move it is in the position where the analysis is started. You can, for example, have a number of alternatives generated for white, but only one move when it’s black’s move. This strategy might be useful when you are analyzing a won position.

Example 5: You have already analyzed a position with IDeA and generated a tree with the results of the analysis, but you want to make sure that a critical part of the tree has been analyzed thoroughly. In this case you can use a TGS to ensure that enough alternatives have been generated and critical lines are long enough.

Using Tree Generation Strategies

The following example shows how Tree Generation Strategies are used in IDeA.

05

Select IDeA > Custom task. The Custom Task Properties dialog box will be displayed.

06

Select “Use prolongation strategy” and then choose a strategy from the dropdown list. In this example I have chosen a strategy called “tactics” and its description is displayed on a separate line: “Use this strategy to discover unexpected tactics.”

When you click OK, you will see a task like “u6” appear in the IDeA task queue. The number indicates how many alternatives will be generated in the root position.

07

In this case a maximum of 6 alternatives will be generated as shown in the image above. One engine will generate those alternatives, but when that is done a new subtask will be generated for each of the alternatives to continue the analysis. In the example below, six subtasks were created.

08

This means that one IDeA engine can be assigned to each alternative, so they will be processed simultaneously and therefore much faster than if the same engine processed the Tree Generation Strategy from start to end. This process will continue and each subtask will generate a new set of tasks until the Tree Generation Strategy is completed.

Note that move colors have no effect on the analysis.

Besides selecting a strategy from the dropdown list, there are a couple of other important options to choose from.

09

The “Apply to notation” dropdown list has three options:

  • Current position. This is the simplest option. The selected strategy is applied only to the current position.
  • Rest of the line. This option follows the mainline in the notation (not the tree), starting with the current position, and applies the selected strategy to every position along the mainline. This means that a new custom task is created after every move in the mainline.
  • Include variations. This option is similar to Rest of the line, but also follows any variations from the mainline that may be present in the notation and creates a strategy task after each move.

Rest of the line and Include variations are excellent tools to check existing variations, variations that you have picked up from books or magazines, solutions to exercises, studies etc.

Selecting Rest of the line or Include variations activates the “Current side” option.

10

If you select “Current side”, then the selected strategy is only applied to positions where the current side has the move. In the example above I have chosen Rest of the line and “Current side.” If I start the Tree Generation Strategy in a position where white is to move, then the strategy will only be applied to positions along the mainline where white is to move.

Ignore moves from notations (find alternatives) is a rarely used option, but if it is selected then the chosen strategy will only analyze alternatives that are not present in the notation.

Starting TGS at an Internal Node

It’s fairly clear what happens when you start a TGS in a position where no analysis has taken place. IDeA will follow the TGS recipe without having to consider previous analysis. However, if a TGS is started at an internal tree node, it will encounter previously analyzed positions.

Let’s say that you start a TGS which generates five alternatives in the root position. If there are already three alternatives there when the TGS starts, it will add two new alternatives, at most. This means that TGSs can, for instance, be used for “padding” an existing branch, making sure that enough alternatives are generated and important lines are extended.

Start of Project and New Root TGS

Usually, you have to run a Tree Generation Strategy manually. However, there are two exceptions where IDeA automatically initiates their execution:

  1. FirstRoot . This TGS (stored in FirstRoot.xml ) is automatically added to the IDeA
    queue when a new project is created.
  2. Root . This TGS (stored in Root.xml ) is sent to the queue when you add a new root to a
    project.

Using this feature you have complete control over the initial shape of the tree in a new project and influence the shape of the branches following a new root.

If these TGSs are not found, IDeA will proceed normally without adding any predefined tasks to the queue.

Creating Your Own Tree Generation Strategies

The Tree Generation Strategies are defined in XML files which are stored in AquariumData\IDeA\Strategies . If you create your own Tree Generation Strategy, place the XML file in this directory and Aquarium will find it (no need to restart Aquarium). Let’s start with a simple strategy.

We want the variations to be 3 moves long (6 plies) and choose an evaluation window of 40 centipawns. The same window is used for all plies. Here is the number of alternatives we want at each ply:

  • Ply 1: 5 alternatives
  • Ply 2: 3 alternatives
  • Ply 3: 2 alternatives
  • Plies 46: A simple extension of the lines that fall within the evaluation window at ply 3 This is how this strategy could be implemented:

<white maxply="6" ply1="5=40" ply2="3=40" ply3="2=40"/>
<black maxply="6" ply1="5=40" ply2="3=40" ply3="2=40"/>

The first line will be used if you start the Tree Generation Strategy in a position where white is to move and the second line is used when it’s started in a position where black is to move. Besides the white / black keywords, the two lines are identical. This means that we don’t care whose move it is in the position where we launch the Tree Generation Strategy. As an example of how to interpret the elements in each line, let’s have a look at ply1="5=40" :

  • ply1 means that this definition applies to the first ply.
  • "5=40" means that the branching factor is 5 (at most five alternatives will be generated) and 40 is the evaluation window. If an alternative is generated that falls outside the evaluation window, then that will be the final alternative generated at that ply, even if fewer than 5 alternatives have been generated.

Here is a slightly more complicated strategy, using multiple evaluation windows / branching factors at ply 1. This example also shows what a complete XML file containing a Tree Generation Strategy looks like:

<?xml version="1.0" encoding="UTF8"?>
<strategy description="Describe your strategy here">
<black maxply="3" ply1="6=20, 5=50, 2=100" ply2="3=20"/>
<white maxply="2" ply1="6=20, 5=50, 2=100"/>
</strategy>

If you start the analysis in a position where black is to move, then the following line will guide
IDeA through the task:

<black maxply="3" ply1="6=20, 5=50, 2=100" ply2="3=20"/>

  • black tells IDeA that these are the instructions that should be followed when analysis is started from a position where black is to move.
  • maxply="3" means that the variations will be 3 ply deep.
  • ply1="6=20, 5=50, 2=100" sets the parameters for the first ply (the root position).
    • 6=20 means that up to six alternatives should be generated within an evaluation window of 20 centipawns..
    • 5=50 comes into effect if an alternative is generated which is different from the top choice by 2150 centipawns. If this happens, then no more than 5 alternatives will be generated.
    • 2=100 means that if an alternative deviates 51100 centipawns from the best move, then the creation of alternatives will stop if/when 2 or more alternatives have been generated.
  • ply2="3=20" will generate up to 3 alternatives at ply 2. Only two alternatives will be generated if the difference in evaluation between the first two alternatives is greater than 20 centipawns.
  • Since maxply="3" and there is no definition for ply3 only one move will be generated in each variation at ply 3.

Note that alternatives with evaluation that exceed the maximum evaluation bounds for a ply are not extended.

The following definition will be used when analysis is started in a position where white is to move:

<white maxply="2" ply1="6=20, 5=50, 2=100"/>

Note that if a specification for a ply is missing, the variation will simply be extended (without generating alternatives). In the example above maxply="2" but there is no specification for ply2 so each line will simply be extended to ply 2.

If you want to specify the exact same parameters for different plies, then you can use a shorthand as shown here:

ply1="6=20, 5=50, 2=100" ply2="ply1" ply3="ply1" ply4="ply1"

Here, ply1 is specified in detail, but the following plies are just copies of ply1.

Notes:

  • Activating/deactivating a project (or exiting/restarting Aquarium) after the analysis has started does not affect the generation of subtasks.
  • You can manage a task generated by a prolongation strategy like any other IDeA task. This means that you can manually finish or delete a task if you feel that it’s not worth spending more time on it. If you find the position interesting, you can switch the task to infinite analysis mode. You can also force an autoplay task to finish the analysis of the current position and start analyzing the next move in the variation.

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!

7-man Lomonosov Tablebases provide deeper-than-ever insight into chess endgame.

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

More »