... one of the main strengths of chess AI is that it has a huge bank of previous games in its memory, and so can look at a situation and find the same or an analogous situation and understand how certain moves might play out for each player.
Chess programs don't actually do that. What you described is case-based reasoning, and it is an AI technique suitable for some ill-defined domains, but not chess. (Real chess programs do come with large opening books, which are simply canned lines fed into it, representing the best theoretical knowledge acquired by humans and/or computers over centuries, but they don't reason over their books.)
Chess falls under the umbrella of perfect-information two-player turn-based games, which includes checkers, xiangchi, shogi, jetan, and klin zha kinta, but not Stratego (hidden knowledge) or Monopoly (random die rolls). For this category of games, the uber-method is adversarial search, more specifically minimax with alpha-beta pruning (and many chess-specific heuristics, e.g. board-encoding representations to detect repetitions, which become loops in your search tree). It's ultimately just a brute-force expansion of an exponential search space. At the cut-off depth, you apply a static eval function to the board to boil it down to one score. Then you bubble these up the tree, and play I-cut-you-choose at each level, flipping back and forth between the two players' perspectives, so that each of them, at every level, can only choose the least-worst of their opponents' best subtrees. It's pure computation, all math and data structures, absolutely nothing smarter than that. To use your clock time most efficiently, you search the full tree to depth 1, then to depth 2, then ..., then to depth i, which is called iterative deepening. It's trivial to prove that the total time for the first N-1 depths combined is a tiny fraction of the cost to search at depth N, for all N (remember: exponential trees are weird that way, like the puzzle with the lily pads), so this simple scheme is optimal for any finite time limit.
Any "chess knowledge" from human experts must be encoded into the static eval function. This is where they can be wrong and have bugs appear -- not a bug in the minimax algorithm, but a bug in "how it plays this chess-like game".
- A common flaw in strong commercial chess programs is that they will not accept a draw when they think they're ahead in material. They would rather make a suicidal pawn move, allowing a catastrophic breakthrough, than just settle for a draw. Exploit: Start hundreds of games, resign instantly if the pawn structure is not "lockable". When you finally lure it into a "lockable" pawn structure, arrange the pawns so that all 16 pawns survive, blockade each other, and have no captures. Trade off most of the pieces, then just stall behind your pawn wall. American GM Hikaru Nakamura went through a phase in 2007-2008 where he goofed off doing this, playing hundreds of games on ICC (a popular chess server that attracts high GMs).
- The 50-move draw rule means: after 50 moves without a pawn move or capture, draw. Hence, Nakamura times it perfectly to dangle an exchange (his Rook = 5 pawns for the program's Bishop or Knight = 3 pawns) at the 50-move limit. The program always accepts, and thereafter is sure that it's "winning". On the 50th move after this capture, the program will push a pawn rather than stall. Nakamura wins the ensuing suicidal pawn-racing, breaks through with his King, eats all of the computer's pawns from behind ... and then has fun underpromoting to ridiculous piece mixes. He has:
- Crafty (computer) vs. Nakamura, 2007, with six promoted knights and nothing else: http://www.chessgames.com/perl/chessgame?gid=1480850
- Rybka (computer) vs. Nakamura, 2008, with five promoted bishops and nothing else: http://www.chessgames.com/perl/chessgame?gid=1497429
- He got blacklisted by each programs' author for abusing ICC courtesy rules when playing vs. these programs. He must have lost 500 games to get these 2 trophy wins. Think of him as a beta tester of chess programs, and it's only a little less weird
Computer chess power does not translate readily to any other domain, because it's based entirely on minimax search, and most problems just can't be shoehorned into a simple tree of positions with a simple algorithm crawling over it.