“Deep position analysis” in the Fritz/Rybka chess playing program

If you haven’t yet read the immediately previous post to this blog, I encourage you to do so – otherwise the rest of this post might not make much sense. In that last post, we discussed the difference between the way an over the board (face to face) chessplayer analyzes a particular board position, and the way a correspondence player would analyze the same position. The over the board player must look at a static position, decide on two or three candidate moves, and try to mentally visualize the consequences of each candidate as far ahead as he can. That’s exactly how a chess program like one of the Fritz family (Fritz, Rybka, Hiarcs, Junior, and Shredder) analyzes a position in “Infinite analysis” mode. A correspondence player, however, is free to move pieces around, examine many, many candidate moves and, after deciding on one, move a piece physically and analyze that move, deciding on candidates, etc. (often by moving pieces without the necessity of “in the head” visualization) and record the moves/analysis as he sees fit. That’s similar to the style of computer analysis (which I call “creeping” analysis) which was discussed in the previous post: manually advancing the engine one move at a time, each time adding the top-evaluated candidate to a growing line of analysis.

But there’s a way to have the software do this automatically, plus have it generate not just a single line of analysis but a whole tree of it. It’s a feature called “Deep Position Analysis”.

We’ll start out with the same line of the Ruy Lopez Worrall Attack that we’ve used in the previous two blog posts. As before, we’ll click on Black’s thirteenth move (13…Re8) to highlight it, hit the “T” key on the keyboard to take back the move, then we’ll make the same move again to create a variation line which begins with 13…Re8:

Fritz13 and Rybka4 chess playing computer software program DVD from USCFSales.com

Click on the picture for a larger view

With the variation move highlighted (as in the above illustration), we’ll next go to the Analysis menu to find the command for Deep Position Analysis (highlighted in the illustration below):

Fritz13 and Rybka4 chess playing computer software program DVD from USCFSales.com

Click on the picture for a larger view

Clicking on this command brings up the following dialogue where we’ll set the parameters for the software’s analysis session:

Fritz13 and Rybka4 chess playing computer software program DVD from USCFSales.com

You can have more than one engine perform a deep position analysis (with the understanding that two engines will require twice the time expenditure, three engines will need three times the amount of time, etc.) by clicking “Multiple engines” and selecting engines from the familiar scrolling list. If you don’t select an engine, the software will use whichever chess engine is currently loaded.

The “branching” settings control the number of variations in the tree; the higher you set these numbers, the larger the tree (however, this will be influenced by the “Evaluation window” setting as we’ll see presently). “First move” determines how many “main” variations will be analyzed. I’ve used a value of “4”, meaning that the chess engine should display and analyze four possibilities for White after 13…Re8 (our “root” position).

“Branching in second move” determines how many sub-variations will be displayed within each of those four main variations. “Branching in third moves” controls the number of sub-variations within those “second level” sub-variations, with the fourth move branching determining how many sub-lines might appear within the “third level” variations.

Note, however, that there’s a setting for “Evaluation window” (expressed in 1/100ths of a pawn), with a function very similar to what we see in standard analysis forms, such as “Full analysis” and “Blundercheck”. I’ve set this for a value of “30”, which means that if a sub-variation is evaluated as being 0.30 pawns or more worse than the “parent” variation’s best move, it won’t be added to the tree.

“Length of variations” means exactly what it implies – this controls the length (measured in half-moves) of each variation the engine will generate (not counting the initial move of the variation; in this case White’s 14th move candidates don’t count).

You have three mutually exclusive settings (you can use only one of these at a time) which control the amount of time the software will use to create the tree. I’m not a big fan of “Fixed depth”, with one possible exception: if I’m going to be using my computer for other tasks while the analysis is going on (instead of having the analysis session run while I’m away or asleep), I would choose “Fixed depth” (which, by the way, is also measured in half-moves) so that the engine will always reach that depth no matter how long that takes (due to some portion of my CPU’s limited cycles being used for the non-chess tasks I’m performing).

“Total time” means that the analysis session will run for the number of minutes you set; it’s up to the software to determine how to budget its time when analyzing a particular position.

Using the “Time” setting makes the chess engine act in the same manner as we’ve previously seen in “Full analysis” and “Blundercheck” mode; it will analyze a position for x seconds (whatever time you’ve set), finish the current depth level (in plies) it’s on when that time is reached, and when that ply is finished record the best move it’s found and then move ahead to the next position.

Some players prefer to let the engine analyze the “root” position (in this case the position after 13…Re8) for longer than later positions, just the way a human player studies a position a bit longer to determine initial candidate moves. The “Plus (root)” setting gives extra time for the chess engine to do just that – evaluate the root position longer to determine the best initial candidate moves.

So with the settings I’ve decided upon in the above illustration, the engine will analyze the root position for (240+60=) 300 seconds (five minutes) to determine the best four candidate moves (determined by the “First move branching” setting), and will display all which are evaluated as being within 0.30 pawns of the best move. After these (up to four) candidates are determined, the engine will analyze each successive position for 60 seconds, displaying the best move plus any sub-variations that arise as long as each sub-variation is within a 0.30 pawn evaluation of the “parent” line above it. Each variation (after White’s 14th move) will be ten half-moves long.

When I’m ready, I click “OK” and hit the rack. In the morning, here’s what awaits me:

Fritz13 and Rybka4 chess playing computer software program DVD from USCFSales.com

Click on the picture for a larger view

And it’s simple enough to reconstruct what the chess engine did here. It analyzed the position after 13…Re8 for five minutes and came up with four candidate moves for White, each of which was evaluated as being within 0.30 pawns of the others:





Since 14.Bg3 was evaluated as the best move, Junior moved ahead to this move (which you’ll actually see if you sit and watch the process; the move 14.Bg3 becomes highlighted, and the board position changes accordingly) and began to evaluate the new position. After about sixty seconds it determined that 14…Bd6 was Black’s best reply, and that 14…Rb8 was the second-best move (and evaluated it as being within 0.30 pawns of the best move, 14…Bd6). Junior then moved ahead to 14…Bd6 and began to evaluate this position. It continued to move ahead (just exactly as we did manually using the “creeping analysis” I described in the previous post), until it reached the requested ten ply depth (as determined by the “Length of variations” I set). Then Junior went back and analyzed both of the branch variations (14…Rb8 and 15.Qd3) in exactly the same manner.

Had we hung around to watch what Junior was doing, we’d then have seen the software jump to 14.Qd1 and repeat the process of analyzing positions, then jumping ahead to the next move, over and over until that variation was completely analyzed. We’d then have seen it jump back to the third candidate, 14.Qd3, and so on.

I didn’t stick around to watch, but the process likely took ninety minutes to two hours to complete, and that was for a fairly small tree using a fairly fast “Time” setting. A larger tree (as determined by the “Branching” settings and “Length of variations”) with a longer “Time” value would have taken correspondingly longer to generate.

It’s interesting to look at the evaluations which Junior provides at the end of each variation. It’s also very significant that Junior didn’t provide any “third” or “fourth” level branching (no variation goes more than two “levels” deep). Despite the fact that the book from which I got this Worrall Attack variation claims that “Black has counterplay” after 13…Re8, no line shows Black getting anything better than equality – and that’s entirely dependent on what White plays. With best play for both sides (in Junior’s opinion), it looks like Black ends up eight-tenths of a pawn in the hole. Now this does mean that Black gets some compensation (since he’s still down two pawns materially), but I’m not convinced that this equates to “counterplay”. Further research is called for.

And that is precisely the value of “Deep position analysis”: you can take a position which someone has evaluated as being better for one player (or equal, or whatever the specific analysis indicates), and double-check it with the help of a chess engine (or engines).

Just a note – don’t forget to use “Save game” or “Replace game” to save the analysis after the chess engine is finished, otherwise you’ll lose the analysis when you load/start a new game and you’ll likely get all moody and bitter.

Have fun! – Steve Lopez

Chessplayers who have purchased their ChessBase brand chess computer software from USCFSales can receive free technical support and advice on their purchases straight from me; just shoot me an e-mail (steve@uscfsales.com), but please remember to include the USCFSales order number from your ChessBase software purchase. – Steve

Copyright 2011, Steven A. Lopez. All rights reserved.


Leave a comment

Filed under chess, Chess DVD, Chess playing software, Chess software, Chess Tiger, ChessBase, Fritz, Hiarcs, Junior, Rybka, Shredder

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s