Docsity

Alpha Beta Trees Pruning - Lecture Notes | CAP 5635, Study notes of Computer Science

Toggle sidebar
bg1
Alpha-Beta Tree Pruning
Increases the speed at which a tree is searched by
pruning of sections of the tree which need not be evaluated
2 7
Min
Max
Steps:
1. Minimax the leftmost subtree
2. The worst the player can do is โ€œ2โ€ if she takes the left branch
3. Evaluate the next node:
If < 2 ?
If > 2 ?
Applying This to a Larger Tree:
7 8 3 9 1 6 2 4 1 1 3 5 3 9 2 6 5 4 1 2 3 9 7 2 16 6 5
Max
Min
Max
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Alpha Beta Trees Pruning - Lecture Notes | CAP 5635 and more Study notes Computer Science in PDF only on Docsity!

Alpha-Beta Tree Pruning

Increases the speed at which a tree is searched by

pruning of sections of the tree which need not be evaluated

Min

Max

Steps:

1. Minimax the leftmost subtree

2. The worst the player can do is โ€œ2โ€if she takes the left branch

3. Evaluate the next node:

If < 2?

If > 2?

Applying This to a Larger Tree:

Max

Min

Max

Applying This to a Larger Tree:

Max Min Max

Applying This to a Larger Tree:

Max Min 8 Max

Applying This to a Larger Tree:

Max Min 8 Max

Applying This to a Larger Tree:

Max Min 8 Max

Applying This to a Larger Tree:

Max Min 8 9 Max

Applying This to a Larger Tree:

Max Min 8 9 Max

Applying This to a Larger Tree:

Max Min 8 9 2 Max

Applying This to a Larger Tree:

Max Min 8 9 2 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 6 Max

Applying This to a Larger Tree:

Max Min 8 9 2 5 3 6 Max

Same Tree but with Min at top:

Min

Max

Min

Slight Variation:

Min

Max

Min

Another Example:

Max

Min

Max

A Variation:

Min

Max

Min

How much can Alpha-Beta save?

# of

Node

Evals

Depth of Search

704 b = 2

b = 3

with

without

How much can Alpha-Beta save?

# of

Node

Evals

Depth of Search

704 b = 2

b = 3

with

without

How much can Alpha-Beta save?

# of

Node

Evals

Depth of Search

704 b = 2

b = 3

with

without

Critical Nodes

Type 1: Root node and all first successors of type 1s

Type 2: All further successors of type 1s and

all successors of type 3s

Type 3: First successors of type 2s