Game trees the minimax method
Download
1 / 17

Game Trees – The Minimax Method - PowerPoint PPT Presentation


Game Trees – The Minimax Method. Anthony Brown COT 4810 January 25, 2008. Minimax. Mini mize your max imum losses Works best on: Complete information games Two Person games Zero-Sum games Opponent is logical. Minimax History. Money Money Money John Von Neumann Chess Chess Chess

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

Download Presentation

Game Trees – The Minimax Method

An Image/Link below is provided (as is) to download presentation

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


Game trees the minimax method l.jpg

Game Trees – The Minimax Method

Anthony Brown

COT 4810

January 25, 2008


Minimax l.jpg

Minimax

Minimize your maximum losses

Works best on:

Complete information games

Two Person games

Zero-Sum games

Opponent is logical


Minimax history l.jpg

Minimax History

Money Money Money

John Von Neumann

Chess Chess Chess

Claude Shannon


Minimax4 l.jpg

Minimax

Generate all nodes in a game tree

Score each leaf node

Score each MIN node with min(children)

Score each MAX node with max(children)

MAX (Player)

MIN

MAX


Minimax leaves evaluated l.jpg

Minimax – Leaves evaluated

MAX

MIN

MAX

$

3

0

9

5

0

2

4

0

3

6

1


Minimax max children l.jpg

Minimax – Max(children)

MAX

MIN

MAX

3

$

9

5

2

4

6

1

3

0

9

5

0

2

4

0

3

6

1


Minimax min children l.jpg

Minimax – Min(children)

MAX

MIN

3

5

2

1

MAX

3

$

9

5

2

4

6

1

3

0

9

5

0

2

4

0

3

6

1


Minimax final max children l.jpg

Minimax – final Max(Children)

MAX

5

MIN

3

5

2

1

MAX

3

$

9

5

2

4

6

1

3

0

9

5

0

2

4

0

3

6

1


Prisoner s dilemma non zero sum l.jpg

Prisoner’s Dilemma – non-zero sum

MAX

Keep Quiet

Rat out Prisoner B

MIN

Keep Quiet

Rat out Prisoner A

Keep Quiet

Rat out Prisoner A

A

B

6 months/

6 months

10 years/

Go free

Go free/

10 years

5 years/

5 years


Minimax pseudo code l.jpg

Minimax pseudo code

If N is a leaf

return eval(N)

If this level is a MAX

return max(children)

If this level is a MIN

return min(children)


Optimizations l.jpg

OPTIMIZATIONS

Variable cutoff levels

Alpha Beta Pruning

Heuristics – Check power moves first

Transposition Tables


Alpha beta pruning l.jpg

Alpha beta pruning

Post-order traversal of the tree

Alpha – recorded as the largest value scanned by a MAX node

Beta – recorded as the smallest value scanned by a MIN node

Prune when Alpha rises above Beta

Or

Prune when Beta falls below Alpha

Max

?

Min

A

D

Max

7

B

4

E

9

C


Large alpha beta tree l.jpg

Large Alpha Beta Tree

Max

5

Min

2

5

4

Max

7

2

5

8

4

9

Min

3

7

2

5

2

8

4

9

1

2

4

3

8

7

9

2

5

6

2

8

4

9

1

2

6


Alpha beta efficiency l.jpg

Alpha Beta Efficiency

Pruning can reduce the number of leaf nodes scanned by the square root of non-pruned Minimax trees.

Best Case:

O(bd/2)

b = # of children

d = # of recursions (turns)


Transposition tables l.jpg

Transposition Tables

Used when many moves can reach the same position

Positions are stored in a hash table for speed

Takes up much more memory


Homework questions l.jpg

Homework Questions

Find the path to the best position using the Minimax algorithm on this tree.

How could Minimax fail in the real world?

Why is tic-tac-toe solvable and chess unsolvable with Minimax?

1

2

3

4

0

3

1

0

1

7

9

7

5

8

3

1


Bibliography l.jpg

Bibliography

Dewdney, A. K. The New Turing Omnibus. New York: Henry Holt, 1989. 36-41.

Shah, Rajiv Bakulesh "Minimax", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 10 January 2007. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/minimax.html


ad
  • Login