Game Playing 최호연 이춘우
Overview Intro: Games as search problems Perfect decisions in 2-person games Imperfect decisions Alpha-beta pruning Games that include an element of chance State-of-the-art game program Discussion
Intro: Games as search problems Games Pure, abstract competition Environment Accessible, deterministic, small Action Small # of well-defined actions
Uncertainty Opponent Not like by throwing dice or by the weather Complexity Not enough time to calculate the exact consequence
Perfect decisions in 2-person games Two players, MAX & MIN Search problem Initial state A set of operators Terminal test(terminal states) Utility function(payoff function)
MAX wants to find a strategy that will lead to a winning terminal state regardless of what MIN does.
Minimax algorithm Generate the whole game tree Apply the utility function to the terminal Back-up values In root, MAX chooses highest value
Complete? Yes(tree is finite) Optimal? Yes(against optimal opponent) Time complexity – O(b m ) Space complexity – O(bm)
Imperfect decision No time to build complete search tree Evaluation functions Replace the utility function Estimates the expected utility value from a given position(chess – material value) Desirable properties Must agree with the utility function Must not take too long to evaluate Must accurately reflect the chance of winning
Alpha-beta pruning Pruning Pruning does not affect final result Alpha-beta pruning Good move ordering improves effectiveness of pruning Asymptotic time complexity O((b/log b) d ) With “ perfect ordering, ” time complexity O(b d/2 )
Games That Include an Element of Chance Many games mirror unpredictability by including a random element Ex) backgammon, 윷놀이
Backgammon
Game tree for a backgammon
Game tree for a backgammon (cont ’ d) Chance nodes Branches leading from each chance node denote the possible dice rolls Labelled with the roll and the chance that it will occur Expectimax value of C Expectimin value
Position evalution in games with chance nodes For minimax, any order-preserving transformation of the leaf values does not affect the choice of move With chance node, some order-preserving transformation of the leaf values does affect the choice of move
Position evalution in games with chance nodes (cont ’ d)
Complexity of expectiminimax The expectiminimax considers all the possible dice-roll sequences It takes O(b m n m ), where n is the number of distinct rolls Whereas, minimax takes O(b m ) Problems The extra cost compared to minimax is very high Alpha-beta pruning is much less effective
State-of-the-art Game Programs for Chess Chess computer would beat the human champion computer power, rather than complex strategies Ratings of human and machine chess champions
State-of-the-art Game Programs for Chess (Cont ’ d) Deep Blue Defeated Garry Ksaparov in 1997 match (2 wins 3 draws 1 lose) 32 P2SC Processors capable of searching 50 to 100 billion positions within three minutes 1000 times faster than its predecessor, Deep Thought Match clips : (multimedia clip) (text)
State-of-the-art Game Programs for the other games Checker Arthur Samuel (1952) official world champion – Chinook Othello, Backgammon, Go …
Discussion Divorced from the main stream AI Grand Prix motor racing --- car industry game --- AI Minimax works well when the leaf node evaluation is perfect misleading remedy --- probability distribution problem --- Siblings are highly correlated.
Discussion(cont ’ d) Alpha-beta prunning may generate a large, useless tree. needs a concept of “ utility of a node expansion ” meta-reasoning