250 likes | 903 Views
Parallel Applications of the Minimax Algorithm. Jeff Shelburg Adam Whaley. Overview. Game Trees Minimax Algorithm Minimax Efficiency Improvements Parallel Minimax Parallel Minimax Efficiency Improvements Speedup/Efficiency Results Randomized Best-First Minimax Speedup Results.
E N D
Parallel Applications of the MinimaxAlgorithm Jeff Shelburg Adam Whaley
Overview • Game Trees • Minimax Algorithm • Minimax Efficiency Improvements • Parallel Minimax • Parallel Minimax Efficiency Improvements • Speedup/Efficiency Results • Randomized Best-First Minimax • Speedup Results
Game Trees • Used to represent the state space of a game • Each successive depth in the tree represents the next at-turn player’s move decision • Shows all possible legal moves at every point in a game • Allows for search algorithms to intelligently decide the next best move
Minimax Algorithm • Used in two-player, zero-sum games (such as Chess and Tic Tac Toe) • Estimates best move to perform for a given game state • Uses state evaluation heuristic to assign values to game states • Assumes opponent will choose best move during their turn
MinimaxAlgorithm Child node state values denoted by x1, x2, …, xn General Algorithm: • Root Node: Return action associated with best child state value (either max or min, depending on the player) • Max Node: Return max(x1, x2, …, xn) • Min Node: Return min(x1, x2, …, xn) • Leaf Node: Return state value using state evaluation heuristic
Minimax Efficiency Improvements • Alpha-beta pruning • Prunes branches of game tree to cut down the effective search space • Move ordering • Uses history table of previously seen moves to order move evaluations in such a way to encourage pruning • Iterative deepening • Cuts down on effective search space when paired with alpha-beta pruning
Why is this important? • Chess is has expansive state space • Chess game tree has average branching factor of 35 • IBM’s Deep Blue beat Chess Grandmaster Garry Kasparov in 1996
Parallel Minimax • Two General Methods • Principal Variation Splitting • Randomized Best-First Minimax Search
Principal Variation Splitting (PVSplit) • Recursively expands leftmost nodes in game tree to find bound on alpha value • Splits up game tree into sub-trees by recursing back up the tree and distributing remaining branches to other processes • Each process performs Minimax algorithm on their sub-tree
PVSplit Efficiency Disadvantages • On distributed memory systems, the processors collectively analyze more game tree nodes than sequential methods • Extremely large communication overhead • Each processor is not able to take advantage of information found by other processors • On all parallel systems, processors with smaller sub-trees finish early • Wasted CPU cycles
Parallel Minimax Speedup Chess implemented on an Intel Core 2 Duo
Parallel Minimax Efficiency Chess implemented on an Intel Core 2 Duo
Parallel Minimax Speedup 4x4 Tic-Tac-Toe on a 5 processor multicomputer platform
Parallel Minimax Efficiency 4x4 Tic-Tac-Toe on a 5 processor multicomputer platform
Communication vs Computation 4x4 Tic-Tac-Toe on a 5 processor multicomputer platform
Randomized Best-First Minimax • Master process broadcasts root node of game tree to other processes • All processes repeatedly selects random child nodes of the game tree with a probability distribution • Child nodes with the highest game state value the highest chance of being selected
Randomized Best-First Minimax • Allows the parallel system to explore many of the game tree’s most promising move sequences • Has a low chance of any two processes analyzing that exact same two paths • Maintains a linear speedup with up to 64 processors
Questions? Sources [1] Plamenka Borovska and Milena Lazarova. 2007. Efficiency of Parallel Minimax Algorithm for Game Tree Search. Proceedings of the 2007 international conference on Computer systems and technologies (CompSysTech '07), Boris Rachev, Angel Smrikarov, and Dimo Dimov (Eds.). ACM, New York, NY, USA, Article 14, 1-6. [2] Brian Greskamp. 2003. Parallelizing a Simple Chess Program. University of Illinois, Urbana-Champaign, Illinois, 1-7. [3] Yaron Shoham and Sivan Toledo. 2002. Parallel Randomized Best-First Minimax Search. Artificial Intelligence. 137, 1-2 (May 2002), 165-196. [4] Matthew Guidry and Charles McClendon. Techniques to Parallelize Chess. Florida State University, Tallahassee, Florida, 1-7.