High Performance Analysis
with Chess Engines
by Steve Lopez
ChessBase 9 comes complete with a couple of chess engines ready for your use (Fritz5.32 and Crafty). Of course, you can install and use other Winboard- and UCI-compatible chess engines (as described in an
article when you purchase Chessbase 9.0). But a question remains: how do you actually use these engines in ChessBase 9?
Before we get down to the nuts-and-bolts procedural stuff, we need to dispel a few interrelated myths about chessplaying engines.
MYTH #1 -- CHESS PROGRAMS PLAY PERFECT CHESS
Many chessplayers erroneously believe that chess programs play some kind of "perfect" chess and never make an error. This is patently false. By and large, chess engines play better chess than 99% of the humans who use them, but they're not some sort of infallible "divine oracle". If that was the case, no chessplaying program would ever lose a game and all engine vs. engine games would be draws.
MYTH #2 -- CHESS PROGRAMS "SEE" EVERYTHING
They don't -- it's not possible. The exponential nature of the "search tree" (all possible moves and replies from a given position) is what makes this impossible to achieve.
Here's a simplified example. Let's imagine a hypothetical chess position in which it's White's turn to move and he has twenty possible moves. We'll imagine that for each of these twenty moves Black has twenty possible replies. For each Black reply, White has twenty possible responses, and so on. (By the way, in computer chess jargon each player's move is called a ply [sometimes known as a "half-move"]. This is to distinguish between a single player's move and a move pair [that is, a move for each player] which is what most players think of when they think of a "move". For example, a forty move game [forty moves for each player] would actually be an eighty ply game in computer chess jargon. This is an important concept and one which we'll return to repeatedly in the course of this article).
Here's how the search tree would look in terms of the number of possible positions:
- After the 1st ply (White's move) -- 20 possible positions
- After the 2nd ply (Black's move) -- 400 possible positions
- After the 3rd ply (White's move) -- 8,000 possible positions
- After the 4th ply (Black's move) -- 160,000 possible positions
- After the 5th ply (White's move) -- 3,200,000 possible positions
- After the 6th ply (Black's move) -- 64,000,000 possible positions
- After the 7th ply (White's move) -- 1,280,000,000 possible positions
- After the 8th ply (Black's move) -- 25,600,000,000 possible positions
So we can see that after just eight plies (four moves), a chess computer program would need to evaluate over twenty-five billion positions to determine a course of action. That's just not possible, even on today's fastest PC hardware.
Chessplaying programs handle this by "pruning the search tree"; they cut out unlikely and unpromising courses of action early in the search. In our hypothetical chess position, the chess engine would likely try to "see" everything out to a depth of about five plies, select three to five initial White moves that look the most promising at that point, then ignore the other fifteen to seventeen possible White moves. It will then go back, do the same for Black's replies, and continue the process throughout its search.
Let's look at how this changes the numbers; we'll assume five likely (i.e. "candidate") moves at each step of the search process:
- After the 1st ply (White's move) -- 5 possible positions
- After the 2nd ply (Black's move) -- 25 possible positions
- After the 3rd ply (White's move) -- 125 possible positions
- After the 4th ply (Black's move) -- 625 possible positions
- After the 5th ply (White's move) -- 3,125 possible positions
- After the 6th ply (Black's move) -- 15,625 possible positions
- After the 7th ply (White's move) -- 78,125 possible positions
- After the 8th ply (Black's move) -- 390,625 possible positions
You can easily see a huge difference between the sizes of the two search trees. While 390,000+ positions is still a lot to evaluate, it's well within the realm of possibility for a chess program running on present-day PC hardware.
However, there is a trade-off here. A chessplaying program looks deeper into a position by ignoring moves early in the search but risks "missing something" that might prove critical later. A Queen sacrifice which looks like it loses material after a three-to five ply search might actually be a game-winning continuation if the search was extended deeper -- but the chess engine won't "see" this because it chose to ignore the move due to its initial "unpromising" nature. This is precisely why chess engines don't play "perfect" chess (see Myth #1 above).
MYTH #3 -- ALL CHESS PROGRAMS PLAY THE SAME MOVES
That's just plain wrong. Different chess programs are programmed by different people and each programmer chooses to tackle the task in different ways. Some programs primarily look for tactical shots that will blow a game wide open. Other programs tend to play less aggressively (at least in the early middlegame) to set up a more solid position.
Some chess programs are just plain better than others. I've been involved in the chess software business for over a decade; when I started in the early 1990's it was a big deal for a chess program to beat a human International Master under tournament conditions (in fact, you can still download old DOS-based chessplaying programs from the 1980's which have a hard time defeating a Class A player). Today's top software can routinely defeat all but the highest-ranked Grandmasters; this is why some programmers deliberately create weaker programs -- to give the average player a shot at success against a computer.
Now it's time to look at some facts about chessplaying engines.
FACT #1 -- COMPUTER SPEED AFFECTS THE STRENGTH OF A CHESS ENGINE
While not as crucial as it was in the mid-1990's, processor speed does affect a chess engine's
performance. In general, the more positions a program can evaluate the better it will play -- and the faster the processor, the more positions it can evaluate. This is why ChessBase creates and markets special multi-processor versions of some of their chess engines: in order to take advantage of the better processing power of multiple chip machines.
FACT #2 -- THE LONGER YOU ALLOW AN ENGINE TO ANALYZE A POSITION THE BETTER THE MOVES IT RECOMMENDS
This also is generally true. The more time you give an engine for analysis, the better the result. But here again there's a tradeoff due to the exponential nature of the search tree (see Myth #2 above). As an engine goes deeper into a search, more time is required to complete the evaluation of each successive ply (since the number of possible positions increases exponentially with each additional ply). In theory you'll get a better move/variation if you let a program chew for days on a position than if you let it run for a matter of minutes. In practice, however, the recommended move/variation won't be all that much better -- usually not good enough to justify the additional time expenditure.
Keeping all of the above in mind, let's return to the specifics of using a chess engine within ChessBase 9. The ChessBase program isn't a chessplaying program -- it's a database program. Its purpose is to let you easily find and play through games chosen/selected/searched for in a huge library of stored chess games. Consequently, the main reason you'll be using ChessBase is to find and play through games that will help you increase your understanding of the game and help you become a better chessplayer.
So why will we be using a chess engine within ChessBase? As you play through games from your database you'll frequently find yourself asking a couple of questions (especially when you're playing through top-level grandmaster games): "Why did he play that? Why didn't he play this?" Using a chess engine as a "consultant" while you replay games will help you to answer those questions.
In light of the above myths and facts about chessplaying engines, we can already make a crucial determination about using engines in ChessBase 9:
You don't use a chess engine to find the "perfect" move; you use it to help you find a better move than what you might come up with on your own. And a chessplaying program will always show you the best move it finds within the time limit in which you allow it to think about a position.
With that bit of business out of the way, it's time to learn the specifics of how to use a chess engine within ChessBase 9.
The rest of this article can be obtaining FREE by purchasing any one of these
fine ChessBase products:
Chessbase 9.0
Mega Package
Chessbase 9.0
Starter Package
Fritz 8 Champion
Deep Fritz 8
Shredder 9
Deep
Shredder 9
Junior 9
Deep Junior 9
Hiarcs 9
Steve Lopez is a professional chess writer from Maryland who has been writing about and supporting chess software for more than a decade. He's also written and edited several chess books and training CDs, some of which are available from Chess Central.
|