Download presentation
Presentation is loading. Please wait.
1
Applying Genetic Programming to Stratego Ryan Albarelli
2
Overview Problem definition & Motivation Stratego Minimax Algorithm Problem Representation GP Implementation Tournament Future Work
3
Problem Definition Devise a minimax heuristic for Stratego using Genetic Programming Devise a method for evaluating heurstic against non-GP generated intelligence
4
Motivation Develop generic minimax heuristic generator for new game solutions Add another level to the man vs. machine debate Auction X-Box prize on eBay for gas money home
5
Solution Viability Determine heuristic’s playability against other types of intelligence –“by hand” heuristics –human opponents –AI tournament
6
Stratego Turn based strategy board game Pieces of increasing rank and decreasing frequency Hidden information Initial piece layout determined by each player Objective is to capture enemy flag
7
Board Layout
8
Minimax Algorithm Tree representation Branch represents possible move Leafs values generated by heuristic Depth first search of all possible moves Simple minimization/maximization at each level Alpha-Beta pruning Partial Information
9
Minimax Tree (depth=2) 6 51 612985 Each leaf contains a value generated by the game heuristic Minimize Arrows represent move candidates Maximize 6 Turn of Player 1 Turn of Player 2
10
Problem Representation Heuristic as Expression Tree Binary operations –Standard arithmetic –Custom relationships Terminals –Piece values –formulas
11
401 is my Evil Organization!
12
Experiment Methodology Each heuristic expression tree is an individual in the population Competition among individuals in the form of a full game to determine fitness. Apply genetic operations to survivors. Rinse, Repeat
13
Binary Operations Standard arithmetic operations: + - * /
14
Terminals Number of pieces in hand (of Rank X) “Center of gravity” of your/opponents pieces Position/rank of pieces on board Constants (numbers) Number of adjacent friendly/enemy pieces Distance of key pieces to enemy key pieces
15
Expression Tree * Flag count 500 / 4 CGrav +
16
Fitness Evaluation Victory against other GP individuals in the pool. Age bonus Number of moves required to win Final piece count
17
Selection / Competition Rank based Drop lowest candidates from the pool Candidates with only one loss given slight waiver
18
Genetic Operations Expression Trees Crossover –Similar sized subtree swapping –Subtree shrinking Mutation –Mutate terminals and operations –Adding a operation/terminal
19
Tournament Best solution to be competing in the CS AI tournament in December
20
Future Work Generalize GP for any board game Develop method to automatically compile expression trees for faster evaluation
21
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.