66
CS325 Artificial Intelligence Ch. 5, Games! Cengiz Günay, Emory Univ. vs. Spring 2013 Günay Ch. 5, Games! Spring 2013 1 / 19

CS325ArtificialIntelligence Ch.5,Games!

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS325ArtificialIntelligence Ch.5,Games!

CS325 Artificial IntelligenceCh. 5, Games!

Cengiz Günay, Emory Univ.

vs.

Spring 2013

Günay Ch. 5, Games! Spring 2013 1 / 19

Page 2: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

AdversariesSimulated reality (non-playablecharacters, world reaction toplayer).Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 3: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

AdversariesSimulated reality (non-playablecharacters, world reaction toplayer).Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 4: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

AdversariesSimulated reality (non-playablecharacters, world reaction toplayer).Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 5: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

zerg rush

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

Adversaries

Simulated reality (non-playablecharacters, world reaction toplayer).Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 6: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

zerg rush

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

AdversariesSimulated reality (non-playablecharacters, world reaction toplayer).

Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 7: CS325ArtificialIntelligence Ch.5,Games!

AI in Games

zerg rush

A lot of work is done on it. Why?

Fun, provide entertainmentAlso, simpler than life: toyproblems

Types of game AIs:

AdversariesSimulated reality (non-playablecharacters, world reaction toplayer).Game theory (next class)

Günay Ch. 5, Games! Spring 2013 2 / 19

Page 8: CS325ArtificialIntelligence Ch.5,Games!

Entry/Exit Surveys

Exit survey: Hidden Markov ModelsIn the mining robot example, when is the uncertainty of the robot’strajectories reduced?How is Particle Filtering like and unlike a water filter?

Entry survey: Adversarial Games (0.25 points of final grade)What algorithm would be useful in games? Give examples with twodifferent algorithms you learned in class.How would you help an agent solve a problem against an adversary?Think of a game like chess or checkers for starters.

Günay Ch. 5, Games! Spring 2013 3 / 19

Page 9: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent:

vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 10: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a maze

Bayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 11: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets:

card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 12: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card games

Machine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 13: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning:

guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 14: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user moves

Logic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 15: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning:

board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 16: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)

MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 17: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning:

pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 18: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zerg

HMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 19: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter:

state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 20: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 21: CS325ArtificialIntelligence Ch.5,Games!

Previously on AI for Games. . .

Can previous algorithms help in games?Single-state agent: vacuum world, solving a mazeBayes Nets: card gamesMachine Learning: guessing games, learning user movesLogic, planning: board game with complex rules (Machinarium)MDPs, Reinforcement Learning: pathfinding, optimal strategy for zergHMMs, Particle Filter: state estimation and future prediction, partiallyobservable environment with traps (sonic?)

None for adversaries?

Günay Ch. 5, Games! Spring 2013 4 / 19

Page 22: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameChess, CheckersRobot SoccerPokerHide-and-go-seekStarcraftBattle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 23: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

Robot SoccerPokerHide-and-go-seekStarcraftBattle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 24: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerPokerHide-and-go-seekStarcraftBattle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 25: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

Hide-and-go-seekStarcraftBattle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 26: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

X X X X Hide-and-go-seekStarcraftBattle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 27: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

X X X X Hide-and-go-seekX X Starcraft

Battle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 28: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

X X X X Hide-and-go-seekX X Starcraft

X X X Battle for WesnothHalo/CoD/MoHSolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 29: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

X X X X Hide-and-go-seekX X Starcraft

X X X Battle for WesnothX X X Halo/CoD/MoH

SolitaireMinesweeperZuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 30: CS325ArtificialIntelligence Ch.5,Games!

Properties of Games as Agent Environment

Stochastic Part.-Observ. Unknown Adversarial GameX Chess, Checkers

X X X Robot SoccerX X Poker

X X X X Hide-and-go-seekX X Starcraft

X X X Battle for WesnothX X X Halo/CoD/MoH

X SolitaireX MinesweeperX Zuma

Günay Ch. 5, Games! Spring 2013 5 / 19

Page 31: CS325ArtificialIntelligence Ch.5,Games!

Single Player Games

→ → → ← ← ←

Deterministic, single-state agent → Single-player game using tree searchinitial stateplayer statepossible actionsresults of actionsutility valuesgoal test

Günay Ch. 5, Games! Spring 2013 6 / 19

Page 32: CS325ArtificialIntelligence Ch.5,Games!

Adversarial Games

Adversarial Games1 Start by adapting single-state agent to games2 Define adversary as someone who wants you to lose3 And makes decisions based on the outcome of your moves

2-player games:DeterministicZero-sum: Rewarddistributed between playersMinimax algorithm:max & min playerschoose +/- utility, resp.

Günay Ch. 5, Games! Spring 2013 7 / 19

Page 33: CS325ArtificialIntelligence Ch.5,Games!

Adversarial Games

Adversarial Games1 Start by adapting single-state agent to games2 Define adversary as someone who wants you to lose3 And makes decisions based on the outcome of your moves

2-player games:DeterministicZero-sum: Rewarddistributed between playersMinimax algorithm:max & min playerschoose +/- utility, resp.

Günay Ch. 5, Games! Spring 2013 7 / 19

Page 34: CS325ArtificialIntelligence Ch.5,Games!

Adversarial Games

Adversarial Games1 Start by adapting single-state agent to games2 Define adversary as someone who wants you to lose3 And makes decisions based on the outcome of your moves

2-player games:DeterministicZero-sum: Rewarddistributed between playersMinimax algorithm:max & min playerschoose +/- utility, resp.

Günay Ch. 5, Games! Spring 2013 7 / 19

Page 35: CS325ArtificialIntelligence Ch.5,Games!

2-Player Value Function

defun value(s):if s is �: U(s)if s is M: maxValue(s)if s is O: minValue(s)

defun m = maxValue(s):m = −∞for (a, s ′) in successors(s):

v = value(s ′)m = maxValue(m, v)

Assumes opponent is perfect!

Günay Ch. 5, Games! Spring 2013 8 / 19

Page 36: CS325ArtificialIntelligence Ch.5,Games!

2-Player Value Function

defun value(s):if s is �: U(s)if s is M: maxValue(s)if s is O: minValue(s)

defun m = maxValue(s):m = −∞for (a, s ′) in successors(s):

v = value(s ′)m = maxValue(m, v)

Assumes opponent is perfect!

Günay Ch. 5, Games! Spring 2013 8 / 19

Page 37: CS325ArtificialIntelligence Ch.5,Games!

2-Player Value Function

defun value(s):if s is �: U(s)if s is M: maxValue(s)if s is O: minValue(s)

defun m = maxValue(s):m = −∞for (a, s ′) in successors(s):

v = value(s ′)m = maxValue(m, v)

Assumes opponent is perfect!

Günay Ch. 5, Games! Spring 2013 8 / 19

Page 38: CS325ArtificialIntelligence Ch.5,Games!

Time Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

For chess: b ' 30, m ' 40How long would it take with:

1 billion processors ×1billion/s evals?

1 seconds2 minutes3 hours4 years5 forever

Günay Ch. 5, Games! Spring 2013 9 / 19

Page 39: CS325ArtificialIntelligence Ch.5,Games!

Time Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

For chess: b ' 30, m ' 40How long would it take with:

1 billion processors ×1billion/s evals?

1 seconds2 minutes3 hours4 years5 forever

Günay Ch. 5, Games! Spring 2013 9 / 19

Page 40: CS325ArtificialIntelligence Ch.5,Games!

Time Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

For chess: b ' 30, m ' 40How long would it take with:

1 billion processors ×1billion/s evals?

1 seconds2 minutes3 hours4 years5 forever

Günay Ch. 5, Games! Spring 2013 9 / 19

Page 41: CS325ArtificialIntelligence Ch.5,Games!

Time Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

For chess: b ' 30, m ' 40How long would it take with:

1 billion processors ×1billion/s evals?

1 seconds2 minutes3 hours4 years5 forever

Günay Ch. 5, Games! Spring 2013 9 / 19

Page 42: CS325ArtificialIntelligence Ch.5,Games!

Space Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

Do not need more than total num-ber of nodes.

Günay Ch. 5, Games! Spring 2013 10 / 19

Page 43: CS325ArtificialIntelligence Ch.5,Games!

Space Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

Do not need more than total num-ber of nodes.

Günay Ch. 5, Games! Spring 2013 10 / 19

Page 44: CS325ArtificialIntelligence Ch.5,Games!

Space Complexity

For a tree withbranching factor, b, and depth, m?

1 O(bm)

2 O(bm)

3 O(mb)

Do not need more than total num-ber of nodes.

Günay Ch. 5, Games! Spring 2013 10 / 19

Page 45: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction?

How to do it?1 Reduce b2 Reduce m3 Tree → graph

All of the above!

Günay Ch. 5, Games! Spring 2013 11 / 19

Page 46: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction?

How to do it?1 Reduce b2 Reduce m3 Tree → graph

All of the above!

Günay Ch. 5, Games! Spring 2013 11 / 19

Page 47: CS325ArtificialIntelligence Ch.5,Games!

Example

defun value(s):if s is �: U(s)if s is M: maxValue(s)if s is O: minValue(s)

defun m = maxValue(s):m = −∞for (a, s ′) in successors(s):

v = value(s ′)m = maxValue(m, v)

Günay Ch. 5, Games! Spring 2013 12 / 19

Page 48: CS325ArtificialIntelligence Ch.5,Games!

Example

defun value(s):if s is �: U(s)if s is M: maxValue(s)if s is O: minValue(s)

defun m = maxValue(s):m = −∞for (a, s ′) in successors(s):

v = value(s ′)m = maxValue(m, v)

Günay Ch. 5, Games! Spring 2013 12 / 19

Page 49: CS325ArtificialIntelligence Ch.5,Games!

Reducing Branching Factor, b

Which one to prune?

Günay Ch. 5, Games! Spring 2013 13 / 19

Page 50: CS325ArtificialIntelligence Ch.5,Games!

Reducing Branching Factor, b

Which one to prune?

Günay Ch. 5, Games! Spring 2013 13 / 19

Page 51: CS325ArtificialIntelligence Ch.5,Games!

Reducing Branching Factor, b

Which one to prune?

Günay Ch. 5, Games! Spring 2013 13 / 19

Page 52: CS325ArtificialIntelligence Ch.5,Games!

Reducing Branching Factor, b

Which one to prune?

Günay Ch. 5, Games! Spring 2013 13 / 19

Page 53: CS325ArtificialIntelligence Ch.5,Games!

Reducing Branching Factor, b

Which one to prune?

Günay Ch. 5, Games! Spring 2013 13 / 19

Page 54: CS325ArtificialIntelligence Ch.5,Games!

Reducing Depth, m

Select a cutoff:Limit m (e.g., plan 3 steps ahead in chess)Estimate terminal nodes’ utility with evaluation function

like heuristics

Learn from experienceIn chess, use board state, value of pieces, etc.For value of pieces:eval(s) =

∑i wipi

can use machine learning for wi

Günay Ch. 5, Games! Spring 2013 14 / 19

Page 55: CS325ArtificialIntelligence Ch.5,Games!

Formalize as Alpha-Beta Pruning

defun value(s):cutoff at depth m′: eval(s)if s is �: U(s)if s is M: maxValue(s, depth, α, β)if s is O: minValue(s, depth, α, β)

where α, β are overall max and min values,resp.

defun v = maxValue(s, depth, α, β):v = −∞for (a, s ′) in successors(s):

v = max(v , value(s ′, depth + 1, α, β))if v > β return vα = max(α, v)

Can cut up to O(bm/2)!

Günay Ch. 5, Games! Spring 2013 15 / 19

Page 56: CS325ArtificialIntelligence Ch.5,Games!

Formalize as Alpha-Beta Pruning

defun value(s):cutoff at depth m′: eval(s)if s is �: U(s)if s is M: maxValue(s, depth, α, β)if s is O: minValue(s, depth, α, β)

where α, β are overall max and min values,resp.

defun v = maxValue(s, depth, α, β):v = −∞for (a, s ′) in successors(s):

v = max(v , value(s ′, depth + 1, α, β))if v > β return vα = max(α, v)

Can cut up to O(bm/2)!

Günay Ch. 5, Games! Spring 2013 15 / 19

Page 57: CS325ArtificialIntelligence Ch.5,Games!

Formalize as Alpha-Beta Pruning

defun value(s):cutoff at depth m′: eval(s)if s is �: U(s)if s is M: maxValue(s, depth, α, β)if s is O: minValue(s, depth, α, β)

where α, β are overall max and min values,resp.

defun v = maxValue(s, depth, α, β):v = −∞for (a, s ′) in successors(s):

v = max(v , value(s ′, depth + 1, α, β))if v > β return vα = max(α, v)

Can cut up to O(bm/2)!

Günay Ch. 5, Games! Spring 2013 15 / 19

Page 58: CS325ArtificialIntelligence Ch.5,Games!

Formalize as Alpha-Beta Pruning

defun value(s):cutoff at depth m′: eval(s)if s is �: U(s)if s is M: maxValue(s, depth, α, β)if s is O: minValue(s, depth, α, β)

where α, β are overall max and min values,resp.

defun v = maxValue(s, depth, α, β):v = −∞for (a, s ′) in successors(s):

v = max(v , value(s ′, depth + 1, α, β))if v > β return vα = max(α, v)

Can cut up to O(bm/2)!

Günay Ch. 5, Games! Spring 2013 15 / 19

Page 59: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction by Tree → Graph

Convert into graph search problem:to reach special opening and closing statesto make and protect from killer-moves

Utility: How many food particles can pacman eat?

2-step limit causes horizon effect?

Günay Ch. 5, Games! Spring 2013 16 / 19

Page 60: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction by Tree → Graph

Convert into graph search problem:to reach special opening and closing statesto make and protect from killer-moves

Utility: How many food particles can pacman eat?

2-step limit causes horizon effect?

Günay Ch. 5, Games! Spring 2013 16 / 19

Page 61: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction by Tree → Graph

Convert into graph search problem:to reach special opening and closing statesto make and protect from killer-moves

Utility: How many food particles can pacman eat?

2-step limit causes horizon effect?

Günay Ch. 5, Games! Spring 2013 16 / 19

Page 62: CS325ArtificialIntelligence Ch.5,Games!

Complexity Reduction by Tree → Graph

Convert into graph search problem:to reach special opening and closing statesto make and protect from killer-moves

Utility: How many food particles can pacman eat?

2-step limit causes horizon effect?Günay Ch. 5, Games! Spring 2013 16 / 19

Page 63: CS325ArtificialIntelligence Ch.5,Games!

Stochastic Games

Günay Ch. 5, Games! Spring 2013 17 / 19

Page 64: CS325ArtificialIntelligence Ch.5,Games!

Stochastic Games

defun value(s):cutoff at depth m′: eval(s)if s is �: U(s)if s is M: maxValue(s, depth, α, β)if s is O: minValue(s, depth, α, β)if s is ?: expValue(s, depth, α, β)

Günay Ch. 5, Games! Spring 2013 18 / 19

Page 65: CS325ArtificialIntelligence Ch.5,Games!

Coin-flip Game

Günay Ch. 5, Games! Spring 2013 19 / 19

Page 66: CS325ArtificialIntelligence Ch.5,Games!

Coin-flip Game

Günay Ch. 5, Games! Spring 2013 19 / 19