learning othello the quest for general strategy building

21
Learning Othello The quest for general strategy building.

Upload: theresa-king

Post on 14-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learning Othello The quest for general strategy building

Learning Othello

The quest for general strategy building.

Page 2: Learning Othello The quest for general strategy building

Objectives and Goals

• Develop a program that is capable of learning to play Othello.

• More interested in how the program learns.

• Learn which techniques are more affective than others

• NOT building Deep Blue!

Page 3: Learning Othello The quest for general strategy building

The Big Picture

• Just a small piece in a much bigger puzzle.

• Using games to explore building a general strategy ontology.

• Is it possible to find patterns in different games to form similar, working strategies?

Page 4: Learning Othello The quest for general strategy building

What is Othello?

• Two player grid-based game.• Black and white discs used.• Must move if you can, skip turn if you

can’t.• Object is to “outflank” opponent’s discs and

convert them to yours.• Game over when no more moves possible.• Winner is player with most discs.

Page 5: Learning Othello The quest for general strategy building

The Board

Page 6: Learning Othello The quest for general strategy building

System Design

Knowledge Base

LearningAgent(GA)

Strategy Strategy

GameControllerPlayer

AgentPlayerAgent

GUI Display Text Display

Page 7: Learning Othello The quest for general strategy building

System Developed Iteratively

• Iteration 1– Knowledge base will contain moves and

genetic algorithm information.

• Iteration 2– Game logic contained in controller moved to

knowledge base.

• Iteration 3– All player logic stored in knowledge base.

Page 8: Learning Othello The quest for general strategy building

Game Controller

• Initialize all components of the system.

• Setup the default board.

• Prepare the display.

• Use learning agent to prepare player strategies.

• Control game flow.

• Control training sessions.

Page 9: Learning Othello The quest for general strategy building

System Design

Knowledge Base

LearningAgent(GA)

Strategy Strategy

GameControllerPlayer

AgentPlayerAgent

GUI Display Text Display

Page 10: Learning Othello The quest for general strategy building

Game Controller Cont.

• Iteration 1– Present player agent with list of possible

moves.– Take move from player agent and control

board.

• In iteration 2, a lot of this logic will be contained in the KB.

Page 11: Learning Othello The quest for general strategy building

Player Agent

• Consult strategy to return a move to the Game Controller.

• Iteration 1– Game Controller will give agent all possible

moves to chose from.

• Iteration 2– Game controller will give agent copy of the

board, and the agent will find and chose move.

Page 12: Learning Othello The quest for general strategy building

System Design

Knowledge Base

LearningAgent(GA)

Strategy Strategy

GameControllerPlayer

AgentPlayerAgent

GUI Display Text Display

Page 13: Learning Othello The quest for general strategy building

Learning Agent

• Majority of the focus for the project and iteration 1.

• Uses genetic algorithm approach for building strategy.

• Moderate risk because not directly applicable to the problem domain.

Page 14: Learning Othello The quest for general strategy building

Steps for GA

• Encode problem in terms of chromosomes.

• Define fitness function for chromosomes.

• Generate initial population.

• Measure fitness and select fittest to “mate.”– Cross over– Mutation

• Repeat

Page 15: Learning Othello The quest for general strategy building

The Genetics of Othello

• Moves will be the genes.– Horizontal_skip, Horizontal_jump– Vertical_skip, Vertical_jump– Diagonal_skip, Diagonal_jump– Hybrid (?)

• In iteration 1, a chromosome will contain all possible moves.

• Iteration 2, a chromosome may not contain all moves.

Page 16: Learning Othello The quest for general strategy building

Fitness

• Simplest measure is your fit if you win.

• More complicated, and possibly more accurate is a measure of the number of discs taken.– Scoring system from online game.

Page 17: Learning Othello The quest for general strategy building

The Birds and Bees of Othello

• Crossover– Swapping the order of the moves in a

chromosome.– Need to avoid duplicates.

• Mutation– Change the jump/skip value.– True mutation because of the coupling?– Defined differently in hybrid moves?

Page 18: Learning Othello The quest for general strategy building

Knowledge Base

• Iteration 1– Contain the definition of the genetic operators (crossover

and mutation)– Contain the moves and their relation to the genetic

operators

• Iteration 2– More game logic stored so fitness functions can be

defined and tied closer to the genetic algorithm information

• Iteration 3– All game logic contained in KB.

Page 19: Learning Othello The quest for general strategy building

Overall Application Flow

• Game controller started and components initialized.

• Learning agent populates initial chromosome base.

• Game controller directs games.

• Learning agent “mates” chromosomes based on game outcomes.

Page 20: Learning Othello The quest for general strategy building

Issues

• Defining a strategy simply by moves may be too simplistic

• How exactly to mate the chromosomes– One chromosome that is operated on

• Might work if it contains all moves

– Multiple chromosomes to mix and match• How play multiple simultaneous games

• Encoding the game knowledge to make it “computational”

Page 21: Learning Othello The quest for general strategy building

Summary

• Good first step towards a very complex problem.

• Allows the ability to explore different areas of AI with the same infrastructure.– Swappable learning agents