Presentation is loading. Please wait.

Presentation is loading. Please wait.

Game Trees and Minimax Algorithm

Similar presentations


Presentation on theme: "Game Trees and Minimax Algorithm"— Presentation transcript:

1 Game Trees and Minimax Algorithm
J.-S. Roger Jang (張智星) MIR Lab, CSIE Dept. National Taiwan University 2019/5/24

2 Game trees Game trees Minimax algorithm a-b pruning
A tree to represent the progression of states during a two-player game Minimax algorithm A way of finding an optimal move in a two-player game (or in a game tree) a-b pruning A way of speeding up minimax algorithm

3 MinMax Rule: Game Tree of Tic-Tac-Toc
O’s move! 1: O wins 0: Draw -1: O loses X X O Max O X O -1 -1 X’s move! X X O X X O X X O Min O O O O O X O X O O X O 1 -1 -1 1 X X O X X O X X O X X O X X O X X O Max O O X O O X O O X X O O O O X O X O X X O O X O O X O X O X 1 1 X X O X X O X X O X X O Min O O X O O O O O X O O O X O O X O X X O O X O X

4 Example: a-b Pruning in a Game Tree (1/3)
Source Max Min Max Min 8 7 3 9 9 8 2 4 1 8 8 9 9 9 3 4

5 Example: a-b Pruning in a Game Tree (2/3)
Source Stey-by-step DFS! Max Min Max Min 3 17 2 12 15 25 2 5 3 2 14

6 Example: a-b Pruning in a Game Tree (3/3)
Source

7 Exercise 1: a-b Pruning in a Game Tree
Display how the search can be reduced via a-b Pruning Max Min Max Min 5 7 3 9 6 5 2 4 1 8 1 6 4 9 3 4

8 Exercise 2: a-b Pruning in a Game Tree
Display how the search can be reduced via a-b Pruning Max Min Max Min 8 7 3 9 2 5 5 4 1 8 6 1 4 9 3 4


Download ppt "Game Trees and Minimax Algorithm"

Similar presentations


Ads by Google