Rybka's shared analysis

by ChessBase
1/9/2009 – Shared Analysis -- what is it? Is it two players conspiring in the tournament hall rest room? Maybe Allwerman's back with a new computer? Try neither -- it's a new analysis mode in the Rybka3 packages which involves a pair of "twin" chess engines analyzing simultaneously. You can learn more about it in the latest ChessBase Workshop.

ChessBase 17 - Mega package - Edition 2024 ChessBase 17 - Mega package - Edition 2024

It is the program of choice for anyone who loves the game and wants to know more about it. Start your personal success story with ChessBase and enjoy the game even more.


OK, friends, strap yourself in for this one, because it's a pretty brilliant idea. In fact, it's one of those "obvious" brilliant ones, the kind where you smack yourself in the forehead and say, "Why didn't I think of that??"

Rybka has a new analysis mode called "Shared Analysis". Basically it involves a pair of "twin" chess engines analyzing simultaneously. This is nothing new; an old 1990's chess program used this technique to offer "instant" game analysis as soon as you finished a game against it. But Rybka's Shared Analysis feature offers an interesting twist on this old idea.

Before we proceed, we need to do a quick review on the subject of hash tables. When a chess engine looks ahead at the myriad possibilities which lie ahead, it stores the positions it's already evaluated (and their numerical assessments) in the hash tables. Then, if elsewhere in its search, it encounters the same position again (due to a different move order, known as a transposition) it won't waste time evaluating that position a second time -- it just uses the stored evaluation from when it previously analyzed that position.

Shared Analysis is used when analyzing a single position. Start Infinite Analysis (ALT-F2) using one of the Rybka engines. Then right-click in the Engine Analysis pane to get a popup menu and select "Shared Analysis" from that menu. You'll see the analysis pane change to resemble the following:

The single Engine analysis pane then splits into two panes. Here's what's happened. The original chess engine (shown in the upper pane in the illustration above) gives up half of your computer's processor cycles. The software then starts a second "invocation" of the same chess engine which will then use that freed processing power; in other words, the software starts an identical copy of that same chess engine. Both of these engines then start analyzing the position, each using half of the computer processor's power.

"Big deal," I hear you saying. "They're just doing the same thing." Wellllll, not exactly. The first chess engine gets "locked" on the initial position it was analyzing when you started Shared Analysis. But the second chess engine (in the lower pane, noted as the "B" engine in the above illustration) is free to analyze different positions if you move the Notation pane cursor somewhere farther ahead in the game, but this second engine will also be storing its analyses in the same hash tables which it shares with the "A" engine.

Take a minute and see if you can figure out where all of this is headed. I'll wait...


OK, give up? Let's start Shared Analysis and then use the cursor keys or VCR buttons to jump the game ahead, say, three moves. The "A" engine will still be analyzing the initial position (the one on the board when we started the Shared Analysis function), but the "B" engine will be analyzing the position on the board three moves later and storing its evaluations in the hash tables it shares with Engine "A"; in theory, the "B" engine will always be three moves ahead of its "twin", therefore it'll always be storing positions in the hash tables for places the "A" engine hasn't reached yet. But when the "A" engine does get to these points, it'll find a whole lot of positions which have already been analyzed. This will allow the "A" engine to analyze a lot more positions very quickly and search even deeper than it could if the "A" engine was analyzing by itself. It's like a military team sending a reconaissance patrol ahead to report back on the terrain and enemy positions it encounters. When it's all said and done, Engine B is "feeding" extra analysis to Engine A:

You can see in the above illustration that the "A" engine is still analyzing the initial position (after Black's 15th move) and is also displaying the analysis in a bold font (to remind us that this is the main analysis). But we've jumped ahead three moves in the gamescore as we can see by looking at the "B" engine's Analysis pane; that Rybka engine is looking ahead from Black's 18th move). It's storing those positions in the same hash table files that the "A" engine is using, so when the "A" engine encounters these positions it won't have to analyze them -- it'll already have access to these evaluations. To exit Shared Analysis mode, right-click on the "B" engine and select "Close" from the popup menu.

That's not just brilliant, that's crazy brilliant. But it's also one of those forehead-smacking genius ideas that's almost too obvious, now that someone's actually implemented it.

As a last tip regarding Shared Analysis, it's best used with a large-sized hash table (as big as you can get without causing excessive hard disk activity). Remember, you set the hash table size in the engine selection dialogue (reached by hitting F3 while in the main chessboard screen).

Until next week, have fun!

© 2008, Steven A. Lopez. All rights reserved.

Reports about chess: tournaments, championships, portraits, interviews, World Championships, product launches and more.


Rules for reader comments


Not registered yet? Register