PDA

View Full Version : The End of Chessbrain?



CaptainMooseInc
04-28-2005, 12:59 AM
Won't Chessbrain end at some point? I assume since there are no factors of the game of chess that are considered "infinite" that Chessbrain should theorectically run out of moves to process....

You can only have a game go so many different ways before there are no other ways to do it...is this where ChessBrain ends? Why continue after EVERY possible game of chess has been played???

Or does ChessBrain get smarter as it goes? Even then, shouldn't it be able to complete every game of chess possible then be able to base its moves off of the opponent's moves and win every game?

-Jeff

rsbriggs
04-28-2005, 07:55 AM
Yes, there are a finite number of moves. I don't think that anyone has calculated it out exactly, but the number of possible moves is known to be somewhere between 10^120 and 10^150.

Just to put that number into perspective, there have been roughly 10^26 nanoseconds elapsed since the beginning of the universe, and there are about 10^75 atoms in the entire universe.

If the universe was a storage device, and you could store a complete chess position on every atom, you'd need 10^50 minimum universes just to to store the positions. That's a minimum of 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 complete universes, just to store possible positions, one per atom.... Generating a million positions per nanosecond, well, this universe will have died a heat-entropy death before you could even scratch the surface of the calculations needed to generate all those positions.....

Programs like chess brain typically evaluate a given position to a ply level of 9, or a depth of about 10^9 - about all that current technology can deal with...

FoBoT
04-28-2005, 09:29 AM
good answer rsbriggs

so even if you could calculate them all , you couldn't store them or use them. so it doesn't really work that way.

so chess programs just try to get a glimpse of which paths are most likely to get a win?

IronBits
04-28-2005, 09:33 AM
rsbriggs, thanks a lot, now I have a headache! :crazy:

rsbriggs
04-28-2005, 10:10 AM
FoBot - Right - even if you could somehow manage to calculate and store all possible moves of all possible chess games, you wouldn't have any way of using those results.

IB - here, let me see if I can make it feel better: :bonk:

Chess programs have a method, or rather methods, of evaluating positions, based on material equality or non-equality, pending checkmate, possible forced checkmate, possible forcible win of material, etc.. So, what they do is attempt to evaluate all possible positions that might arise in the next few moves, and pick the move that they calculate leads to the "best" position possible for them, assuming the best play on the part of the opponent.

Towards the end of a game when there are less pieces on the board, it is easier to calculate all the positions possible, so a computer can spend the time evaluating the position to a greater depth. This is called the end game, and can often be calculated exhaustively.

At the beginning or the game there are known sequences of moves, called openings, that have been researched for many hundreds of years. These openings are known to lead to a position with known results, advantage for White, advantage for Black, or balanced. Most of the openings only go 10 moves or so deep, and any deviation from the the opening "book" takes you out of the known openings. So, once you "run out of" the opening book moves, or deviate from a known opening series of moves, you are in uncharted territory.

If you are not in the opening, or end game, then some, or most, computer programs have to use "brute force" to evaluate the trillions of possible moves arising out of the current position, to whatever depth or ply they evaluate them to. And all of this is complicated by the fact that there are time limits imposed on each move of the game, you don't have infinite time available to evaluate a position. After x amount of time you simply have to have made your move or moves, or you lose the game.

Human players can evaluate a position strategically by looking at things like control of the more powerful center 4 squares, King safety, and similar types of things. They (at least try to) mentally reject "stupid" moves, or anti-strategic/positional moves that give up material or lead to some sort of a strategic disadvantage - Grandmasters develop a feeling for whether or not a given sequence of moves "seems right". They don't attempt to exhaustively analyze a position, they just analyze "reasonable" moves that might be made, but they can be surprised from time to time by "unreasonable" moves that turn out to be good ones.

Computers are not so good at strategy, so they can't automatically weed out 'stupid moves" - they have to try everything and then evaluate the resulting positions. So, they basically have to brute-force-calculate trillions of positions and evaluate each of them looking for the "best move" for both sides for each possible position that could result from the current position, with a very strict time limit set on how long they can calculate looking for their move....