Like some features in Chess Assistant, the background analysis modes have a learning curve associated with them. This article, in addition to outlining some important tasks, also discusses how the background analysis modes operate. This will give you a better understanding of what happens when you use this powerful feature.
Projects are engine analysis settings that can be used with background analysis. In this manner, you can quickly select the engine, and analysis time that is used by default for various types of positions.
Clients process the positions fed to them by the background analysis manager.
Chess Assistant (CA) 7 introduces yet another computer analysis mode, which is called "Background Analysis". This mode is useful for a particular type of analysis style that some people may find foreign, because it operates under a different convention than many people are used to. For instance, typically, chess software operates very interactively, and in a serial fashion. Many programs support an "infinite" analysis mode, in which the chess engine calculates the best move for the position currently on the board. In background analysis mode, all the engine calculations go on "behind the scenes", and so the user can go on using other functions of CA, while the engine calculations take place.
The advantages of this approach are as follows:
The final point may not be intuitively obvious, and will probably only apply to a small percentage of users, but it is certainly a benefit. If you want more information about how multiple processors and hyperthreading affect the use of Chess Assistant, then see this article.
When you use one of the background analysis modes, you are actually submitting positions, with instructions on how to analyze them, to a background process that runs when CA is open. This background server (called BackGround Analysis manager, or BGA) automatically starts and stops engines, and submits positions to them for analysis, while you are doing other things in CA.
So it is probably pretty clear that you need to make sure that the BGA manager is running before you can use the background analysis modes. What I would suggest is that you make sure the BGA manager is running whenever CA starts. You can enable this by selecting "Background analysis properties" from the "Engines" menu. When you do that, you'll get the following dialog box:
You should make sure that "Always run background analysis manager at Chess Assistant startup", and "Open client manager at startup" are checked. If you have a multiple processor machine, you can also decide if you want the BGA manager to run two engines (each client uses an engine) at startup as well. Users with later versions of the P4 will also be able to check this box, if they have a hyperthreading aware BIOS, chipset, and operating system (but this is not recommended, see this article for more info).
How Background Analysis Works
Perhaps a short discussion of the mechanics of background analysis are in order. When you first submit a position for background analysis, it goes into a queue, which is managed by the BGA manager. The manager talks to individual analysis clients, which are responsible for analyzing the positions. As positions are analyzed, and the clients become available to accept new positions, the BGA manager sends them a new position from the queue.
Each position that is accepted by the BGA manager must belong to a project. Every project has its own engine settings associated with it. Thus for instance, if you know that a particular engine is fairly strong in the endgame, you can set up a project for that engine, and send endgame positions to it. If you had an engine that was a fast searcher, and was very strong tactically, you might set up a project for it, and send it those positions that are heavy with tactical complications.
New projects are created by adding them to the BGA. To do this, you first open the BGA window (select "BGA Manager" from the "Tools" menu). Then right click over the window, and select "New project...". In the example I discussed previously, I'd like to set up Shredder 7.04 as my default engine for endgame positions. So I simply select "UCI" as the engine type, and Shredder 7.04 as the engine I want to use (see screen shot below). I've also bumped up the analysis time for each position to two minutes. Generally speaking, you'll want to leave the other settings on this dialog box alone, unless you've attained true CA mastery. The default options do two things: they make sure the results of the background analysis get inserted back into the original game, and also into an EPD file called common.epd. Use of the latter will be discussed a bit later in this article.
After you've added a project, you'll notice that it appears in the BGA project screen. In addition, it also becomes available to you whenever you submit a position to the BGA.
Everyday use of BGA
While I've discussed quite a bit of background information on the BGA, I haven't yet said a word about using it. As it turns out, there are several different types of background analysis that can be performed on a position. To illustrate the choices available, open up any game, and place the cursor on an arbitrary position. If then you select "Background analysis" from the "Engines" menu, you'll be presented with the following dialog box.
Note that the numbers next to each of the BGA modes correspond to the default shortcut keys that you can use to invoke them, the exceptions of course are analysis modes 10-12, which use a different set of shortcut keys. If you want an explanation of what each mode does, I would suggest that you consult the help file (an updated version of the help file can be found here).
In the above dialog, you can select the project that is used for each type of background analysis. For instance, if 'Current position' analysis is selected as shown above, hitting the 'Edit' button will allow you to change the project that is used for that type of analysis.
You may notice that in CA version 7.X, one feature that is common to all the analysis modes is the use of color coded styles to represent moves that are being, or have been analyzed (CA 8 does not use this convention by default, but it can be changed with the styles dialog box). When a position is first sent to background analysis the preceeding move becomes underlined and colored green. After the analysis is completed, the move will change colors to indicate that the analysis is complete. Furthermore, the analysis will automatically appear in the "Comments" tab underneath the board. As an example of this process, see the animation below
CA 8 users can either change the styles setting to get this effect (shift-S, then change style for 'Server analyzed'), or can check the BGA client to see if the position has been analyzed.
Example use of Background Analysis
The background analysis autoplay modes should be used in instances where you want to see how the game might have turned out when a specific move is made. For instance, in the position below, white has a couple of plans at his disposal. One is to relocate the bishop to f2 (after Be1), the knight to e2, and attack the isolated pawn on d4. Another is to try to play actively by playing Bd6. In the game, I chose Bd6, and did not play as energetically as I should have:
FEN: 2b3k1/5pbp/rp3np1/p3r3/1BPpPN2/R2P2PP/5PB1/1R4K1 w - -
To use one of the autoplay modes, you would simply make the Be1 and Bd6 moves on the board. Then hit the "3" key after each of these moves. Essentially, you will be calling the background autoplay mode twice. The difference between this and the normal engine autoplay mode, which is accessible from the "Engine-Engine" entry on the "Engines" menu, is that the time controls for the game are different. In the background mode, each move is analyzed for set time, whereas you can use many more time controls for the engine autoplay function. So, it really is up to you which function you use. You'll notice that the resulting analysis that appears below the board gives the nod to Be1.
Now let's look at how you might use the "Search for more improvements in the game" background analysis function. This particular analysis mode is useful because it provides computer evaluations for alternative moves that might be improvements to the ones played in the game. Open any game in Chess Assistant that you want to analyze. Click on any move in the game.
Then use 'Search for more improvements in the game' (ctrl-alt-space). After this analysis is complete, run the BGA script (discussed below). then take a look at the tree - you'll see that the BGA column now shows evaluations for alternative moves. If you then go through and use 'Current position' analysis on each move in the game, you can also get evaluations for the moves in the game score as well.
This brings us to the major advantage of background analysis. In addition to making analysis visible in the tree, it also automatically minimaxes all the analysis as well. This means that you will always see the best evaluation of a position, even if a good/bad move is beyond the calculation horizon of the engine you ware using for a particular move, just as long as the consequences of a move become clear at a later point in the analysis process.
You might do this with a combination of the 'Search for improvements in the game' function and specific analysis of particular positions with 'Current position' analysis. You would then merge all these results together using the BGA script - CA will then allow you to sort through all the analysis via examination of the 'BGA' column in the tree. This is incredibly useful for complicated games where it is easy to lose track of the evaluations for specific variations. Correspondence players that use a chess engine (where allowed)will also find this to be very useful as well.
Making Background Analysis Visible in the Tree
As luck (or design) would have it, you can also display the results of background analysis in the tree. By default, all the tree views have a column called "BGA", which contains the results of BGA analysis. CA also contains a script that will automatically rebuild this tree with new results from the background analysis functions (from common.epd). Simply go to the "Tree" menu, select "Scripts" and then "BGA". If you don't have this script, you can download it (note, this is not a virus, it simply has an unfortunate file extension), and import it from here. You will need to open the scripts manager (Tree->Scripts->Manager), and import the downloaded file.
The background analysis modes support a new way of working within Chess Assistant. They can be very useful when you don't want to interrupt your train of thought during an analysis session, or when analyzing many complex variations that would benefit from the minimax procedure.
The implementation of background analysis functions within CA is very complex. To find out more about how background analysis works, I would suggest that you take a look at the instructional videos on background analysis that were done by Nick Volkov for CA 8.
* Well maybe not everything...