320 likes | 514 Views
Quoridor and Artificial Intelligence. Jeremy Alberth. Quoridor. Quoridor is played on a 9x9 grid. Starting positions are shown for two players. Quoridor. Red moves his pawn down. The objective for both players is to be first to reach the opposite side. Quoridor.
E N D
Quoridor and Artificial Intelligence Jeremy Alberth
Quoridor • Quoridor is played on a 9x9 grid. • Starting positions are shown for two players.
Quoridor • Red moves his pawn down. The objective for both players is to be first to reach the opposite side.
Quoridor • Blue moves his pawn up. Players may either move their pawn or place a wall on a move.
Quoridor • Red places a wall horizontally in front of blue’s pawn. Walls must block movement from four squares.
Quoridor • Blue moves his pawn left so that he is no longer impeded on his journey upward.
Quoridor • Blue places a wall vertically to the right of red’s pawn. Wall orientations can be horizontal or vertical.
Quoridor • Red moves his pawn down.
Quoridor • Blue places a wall horizontally in front of red’s pawn. Players are limited to ten walls.
Quoridor • Red moves his pawn left, continuing on his shortest path to his goal row.
Quoridor • Blue places a wall to the left of red’s pawn, continuing his devious wall-placing behavior.
Quoridor • Blue eventually wins the game when he paths his pawn to the opposite side of the board.
My Work • Created an implementation of Quoridor • Implemented AI players using the minimax algorithm • Modified minimax and AI strategies • Analyzed performance of computer players against one another and against a random player
Minimax • Minimax is a method which finds the best move by using adversarial tree search. • The game tree represents every possible move for both players. • Branching factor is the number of moves at each step (here, branching factor = 3)
Static Evaluation • In complex games, a depth limited search will be used. • Upon reaching a depth cutoff, the search will employ a static evaluation function. • This function must give a value to a game state, often revolving around a board state and the player to move.
Managing the Tree • Branching factor is initially 132. • 5 moves ahead: 132^5 = 40074642432 states • Minimax must be modified to make use of a restricted move set. • The branching factor can be reduced to a manageable size of ~10. • 5 moves ahead: 10^5 = 100000 states
Wall Selection • Best strategy for shrinking the move set is reducing the number of walls considered. • Use a heuristic to determine which. • Walls close to or directly next to the opposing player are a way to prevent an opponent’s quick victory. • Might not consider wall placements by the opponent.
Solution • Computer players may not consider wall placements by the opponent. • Considerations should be made for repeated states. • Minimax can avoid repeating game states by assigning undesirable values to them. • The game can prevent this by forcing a draw after a certain number of repeated states.
Strategies and Evaluations • Strategies for computer players were reliant on their static evaluators. • [P] Shortest path: Considered shortest path values for both players. • [B] Bird’s eye: Considered the distance to the goal row without regard to walls. • [C] Close distance: Only one player’s path. • [PR] Shortest path with random element • [BR] Bird’s eye with random element
AI Outcomes • Strategies with random elements were the worst, followed by the bird’s eye strategy. • Shortest path and “close distance” strategies outperformed the others.
Data Trends • AIs using wall heuristic not successful • Considered walls that were not useful • Repeated state flag generated more non-draw outcomes • Shortest path was the most effective • Players not considering opponent’s walls were able to path more successfully • Randomness added variation but often removed effectiveness
References • Abramson, B. 1989. Control strategies for two-player games. ACM Comput. Surv. 21, 2 (Jun. 1989), 137-161. DOI= http://doi.acm.org/10.1145/66443.66444 • Thuente, D. J. and Jones, R. P. 1991. Beyond minimaxing for games with draws. In Proceedings of the 19th Annual Conference on Computer Science (San Antonio, Texas, United States). CSC '91. ACM Press, New York, NY, 551-557. DOI= http://doi.acm.org/10.1145/327164.328771 • Slagle, J. R. and Dixon, J. E. 1969. Experiments With Some Programs That Search Game Trees. J. ACM 16, 2 (Apr. 1969), 189-207. DOI= http://doi.acm.org/10.1145/321510.321511
Previous Quoridor Software Work • Xoridor (Java Quoridor Project) • Glendenning: Genetic algorithms research • Mertenz: AI Comparisons • Used different board representation, strategies, evaluations, and random elements