Chess Bellin and Ponzetto - Mastering the Kings Indian Defense
Mastering Chess
description
Transcript of Mastering Chess
Mastering ChessAn overview of common chess AI
Adam Veres
Everybody knows chess, right?
Important context on how players are rated
• Arpad Elo• Hungarian-born, American physics
professor – creator.
ELO Rating System
• Numerical system for calculating relative skill level of players
• Higher number = better player• Players avoid situations that damage
their ELO.• Picking events
• Not just chess
ELO Rating System, cont.
Senior Master 2400+Master 2200+ (This encompasses the 93-98th percentile of all rated players in America)Expert 2000+‘A’ Player 1800+‘B’ Player 1600+‘C’ Player 1400+‘D’ Player 1200+‘E’ Player 1000+‘F’ Player 800+‘G’ Player 600+‘H’ Player 400+‘I’ Player -400
USCF Rating Tiers
Some history on computers playing chess• ~1770• The Turk• Fake automaton• Wolfgang von Kempelen
Hungarian inventor
Computer chess!
• 1951 developed, on paper, a program capable of playing a full game of chess
• Work backwards from ‘win’ conditions and accept moves that work towards that goal
• Turing assumed infinite processing power and storage space
• Ratio W/B
Alan Turing
• 1986 - The Chessmaster 2000• The manufacturer rated the game at 2000 Elo
USCF, in reality it plays at approximately 1750-1800 USCF.
• This is “B” rated in 1986!• Best selling
Chess seriesof all time.
Chessmaster
1997 IBM’s Deep Blue defeats Gary Kasparov after a six game match.Deep Blue relied on hardware for to evaluate over 200 million moves per second
Deep Blue
• Deep Fritz version 10 ran on a machine running two Intel Core 2 Duo processors.
• 8 million moves per second• Average depth search of 17-18 using heuristics
to evaluate choices• About 6 billion possible positions observed
before actually making a move• Vladimir Krammik loses 2-4 to Deep Fritz• 5 piece tablebase allowed for end-game, 6
piece widely available
Beyond Deep Blue
• SSDF – Swedish Chess Computer Association
• Tests computer chess programs and produces a rating
• 2012 “Deep Rybka 4 x64” 3221 rating
• Tested on x64 2GB Q6600 2,4 GHz
Computer chess ratings
Board Representation• List of all pieces• 8x8 2D array• 0x88
2 boards next to each other. Makes move-legality checks a simple AND with the hex number 0x88
• Bitboard 64 bit sequence of bits. Series of bitboards.
• Stream based• Huffman Encoding
More common chess positions (pawns/empties) stored with less bits
Algorithmic Considerations
• Type A Brute Force. Checks bad and trivial
moves unnecessarily.• Type B
Quiescent Search – evaluate minimax game trees
Only a few moves are evaluated
Main Search Types
• Alpha-beta pruning widely used to reduce search space
• Negascout – directional search algorithm to find minimax value of a node in a tree
Type B
• Nalimov endgame tablebase. 5 or fewer pieces is solved. USSR born programmer
• 6 pieces is solved except some trivial cases such as 5 pieces versus 1 king
• 7 pieces have been somewhat analyzed• All of these make certain assumptions to prune
the branching possibilities. Eg: Castling is no longer possible
“Tablebases”
One last interesting note:It is estimated that doubling the computer’s speed adds only 50-70 ELO to a given chess algorithm
Heuristics are much better than brute force!
Last Thoughts
• Digital computers applied to games'. n.d. AMT's contribution to 'Faster than thought', ed. B.V. Bowden, London 1953. Published by Pitman Publishing. TS with MS corrections. R.S. 1953b
• “Deep Blue”. IBM.http://www-03.ibm.com/ibm/history/ibm100/us/en/icons/deepblue/
• “The Last Man vs Machine?”. Chess News.http://en.chessbase.com/home/TabId/211/PostId/4003504
• “Important Official Rules of the Kramnik versus Fritz match”. Chess Daily News and Information. http://susanpolgar.blogspot.com/2006/11/important-official-rules-of-kramnik.html
• Levy, David; Newborn, Monty (1991), How Computers Play Chess, Computer Science Press, ISBN 0-7167-8121-2
References
• Searching for Solutions in Games and Artificial Intelligence (1994) by Victor L. Allis
• SSDF. Swedish Chess Computer Association. http://ssdf.bosjo.net/
• Some images from Wikimedia Foundation• “Did a Computer Bug Help Deep Blue beat Kasparov”.
Wired.com. http://www.wired.com/playbook/2012/09/deep-blue-computer-bug/
References