1 / 8

# Chapter 5 - PowerPoint PPT Presentation

Chapter 5. Game Playing. Games as search. Board games (e.g., Chess, Checkers, Go) Two player games High branching factors Opponent player Contingency problem Opponent is assumed to do their best (our worst) Game environment Accessible complete access to the environment state

Related searches for Chapter 5

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Chapter 5' - Leo

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Chapter 5

Game Playing

• Board games (e.g., Chess, Checkers, Go)

• Two player games

• High branching factors

• Opponent player

• Contingency problem

• Opponent is assumed to do their best (our worst)

• Game environment

• Accessible

• Deterministic

• Next state determined by move and current state

• Episodic: no; Static: yes (for us); Discrete: yes

• Initial state

• Configuration of board at start, and which player starts

• Operators

• Legal moves that a player can make

• Goal or “terminal” test

• goal states called terminal states

• Utility function

• quality value for terminal states from rules of game

• not an estimate if game play reaches this state

• Mini-max algorithm can be used to propagate values up search tree for estimates of utility of non-terminal states

• Root node

• player 1 or “max”

• trying to maximize score

• Immediate children of root

• player 2, or “min”

• trying to minimize score

• Next layer, max

• Next layer, min, etc.

• A layer or possible move by a player is a “ply”

• Complexity too high for practical game playing

• Could use

• Depth limited search

• Iterative deepening

• Means that we cannot generally use minimax propagation of utility values

• Quiescent states

• States that are unlikely to exhibit large changes

• Next state can be a checkmate, not quiescent

• Horizon problem

• Failing to take action because of depth limit on search

• Evaluation function: h(n) for games

• Heuristic estimate of the expected utility of a given game state

• Material advantage function in chess

• Integer value for type of board piece

• Quality of game state given by sum of material advantage values of all pieces

• Example of a weighted linear sum

EVAL(s) = w1p1 + w2p2 + w3p3 + …

w’s are the weights; p’s are the counts of a piece type

• E.g., p1 = 3 pawns w1 for pawn is 1; p2 = 2 knight or rook, w2 for knight or rook is 3

• Eliminating branches from tree in search

• Alpha-beta pruning

• pruning with mini-max

• don’t follow branches that cannot influence decision

• still accurate within evaluation function

• Principle: “If you have an idea that is surely bad, do not take time to see how truly awful it is.” (P. H. Winston)

1

1

7

2

3

5

3

2

9

3

9

7

1

9

6

2

2

16

6

2

5

4

6

1

4

2

max

min

max

Example from P. H. Winston