Artificial Intelligence and the Making of IBM's Deep Blue
Total Page:16
File Type:pdf, Size:1020Kb
The Deep Blue Chess Computer Randy Moulic, PhD(EE), IEEE Life Fellow Associate Professor, Computer Science and Engineering University of Alaska-Anchorage June 26th, 2014 For 1000s of Years Man Built Machines to Enhance and Extend Human Capabilities in the Physical World Man’s intelligence, creativity and autonomous nature have been at the core of these advancements “Machines for the Mind” Computers Enrich Our Daily Lives, and Free Our Minds by Handling Tedious, Repetitious Tasks ….. can computers exhibit such human-like intelligence, creativity and autonomous behaviors? Chess: an Olympic Sport for the Mind • Critical thinking • Comprehension • Creativity • Analysis • Knowledge and memory Winning at chess; being the world champion has been a measure of a highly developed, creative mind ! Could a machine beat the best human chess player in the world? …a Machine that Appears to Think, Solve and Create, Like the Human Mind ? The Turk (1770 – 1854) Charles Babbage (1864) • In 1864, Charles Babbage described how chess could be programmed on his unique, special purpose, Analytical Engine • Babbage was never able to raise funding to build the Analytical Engine Oh, by the way it was a “computer” design Claude E. Shannon Computational Requirements of Chess 3 major computational tasks are necessary in a computer chess “engine”: • Move generation of all possible legal moves • “Move tree” search • Evaluation Computational Requirements of Chess Move option #30 Move option #3 Move option #2 Move option #1 ~30 possible moves per player per ply, a depth of 12 ply requires the generation, searching and evaluation, of 4.7 x 10 20 positions !! “Move tree” A Deeper Look Into The Computational Tasks Simple “Material” Based Evaluation • Evaluation function for a move based on C. Shannon’s work can be defined as : f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ... • Where: K, Q, R, B, N, P are the number of white kings, queens, rooks, bishops, knights and pawns on the board. D, S, I are doubled, blocked or isolated pawns. M is mobility or number of legal moves available. * from C. Shannon’s original work Min-Max Move Tree Searching Minimax: Assume that both White and Black play their best moves. •Perform a depth-first search and evaluate the leaf nodes •Choose child node with highest value if it is White to move •Choose child node with lowest value if it is Black to move Ply 0 White White Black Black Ply 1 White White Ply 2 (Stored or chosen “move” ) Alpha-Beta Pruning Position is so good for White (or Black) that the opponent with best play that some branches of the tree would never be followed – and can be “pruned” •Alpha value: White’s guaranteed score or better ( start at infinity) •Beta value: Black’s guaranteed score or less ( start at infinity) •If Beta is less than Alpha, then position will never be occur •If search tree below is evaluated left to right, then search can skip searching further along the greyed-out sub trees, as they will not influence the root node score White Whi Ply 0 te Blac Black k Whi Ply 1 te Wh Ply 2 White ite Computational Requirements of Chess Move option #30 Move option #3 Move option #2 Move option #1 ~30 possible moves per player per ply, Clever a depth ofsearch 12 ply requires techniques the can reduce generation, searching and evaluation, of 4.7 x 10 20 positions e.g. “prune” !! the search to ~ 1 x 10 11 positions “Move tree” How Fast Does a Computer Need To Be To Analyze 1 x 10 11 Board Positions ? • A computer chess program, like “Deep Blue” needs to execute about 1,000 instructions to generate, search and evaluate a chess position • ( 1 x 10 11 board positions ) x ( 1,000 computer instructions ) = 1 x 10 14 instructions • In tournament play, 40 moves must be completed in first 90 minutes, or ~ 2 minutes/move computation rate required is ~ 10 12 instructions, or ops/sec Computer Performance Trends 1.E+18 1.E+17 1.E+16 1.E+15 1.E+14 Supercomputers 1.E+13 Estimated compute 1.E+12 requirement to play world class chess Desktop PCs 1.E+11 Peak Computing Capacity, ops/sec Capacity, Computing Peak 1.E+10 1.E+09 Smartphones 1990 1995 2000 2005 2010 2015 Year Development Time Line for Deep Blue ChipTest, Deep Thought (Carnegie-Mellon, 1985-1989) Deep Thought II (IBM Research 1989 – 1991) Deep Blue ( IBM Research 1991 – 1997) “Chiptest”: Custom, chess-specific chip Building Deep Blue: Chess-specific VLSI chip • Massive searching capacity, leveraging both hardware and software • Special function chip which provided move generation, search, and evaluation capabilities • Evaluation function includes simple “material”, but also position, King safety, and temp of the game. Building Deep Blue: 8 way- Parallel Chess-Specific PCI Board • Massive searching capacity, leveraging both hardware and software • Special function chip which provided move generation, search, and evaluation capabilities • Evaluation function includes simple “material”, but also position, King safety, and temp of the game. Building Deep Blue: 480 way Parallel Chess-Specific Supercomputer • Massively parallel search (29 general purpose computer cluster and 480 chess-specific processors) • Large opening, extended books, and endgame database of previous games experience Kasparov vs IBMs Deep Blue, New York, 1997 Is Deep Blue Intelligent? “… (Deep Blue has) a weird kind (of intelligence) …” Garry Kasparov, 1996 “I used to think chess required thought. Now, I realize it doesn’t.” Douglas Hofstadter, 1997 “Does it really matter if unbounded brute force analysis can achieve similar results? “ Randy Moulic For more information about Deep Blue, please look at : “Deep Blue”, Murray Campbell, Joe Hoane, Feng-Hsuing Hsu, Artificial Intelligence, 134, (2002), p57-83. .