Minimax and Alpha-beta pruning Flashcards

1
Q

What is a Game tree?

A

Directed graph that represents every possible outcome

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens if the entire game tree cannot be generated?

A

Generate a partial tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What type of search algorithm is the minimax algorithm?

A

DFS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the minmax Alg work?

A

alternate turns, 1st move/layer = max, next layer = min until leaf node is reached

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the Max player try to do in minimax algorithm?

A

Maximize the minimum values at a position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the Min player try to do in minimax algorithm?

A

Minimize max values at position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explanation of Minimax Alg

A

Repeat until entire tree is traversed{
if (limit is reached){ compute static value of current position relative to the appropriate player and report result }
else if (level is a minimising level){ use the minimax on the children of the current position. return min value of the results}
else{ if level is max level, use minimax on the children of the current position. return max of the results}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the advantages of Minimax?

A

Considers all possible moves = most optimal moves to be made = very accurate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the dis advantages of Minimax?

A

large branching factor for complex games = slow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the goal for Alpha Beta Pruning?

A

Remove branches that have no effect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the alpha value store of AB Algorithm

A

best already explored option along a path to the root for the max layer.
Max score the Maximizer can receive (only maximizer can change this value)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does beta store of AB Algorithm?

A

Best already explored option along the path to the root for minimizing layer
Min score the minimizer can receive (only minimizer can change this value)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When can we prune branches?

A

if A>=B (the min score is bigger or the same than the current max score)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Code for AB pruning + minimax

A

A = inf, B = -inf
if( node = leaf){ return value}
if(node = min node){
For( each of the children){ apply Minimax + ABP;
if (value returned < B) { B = value}
if(B <= A){ return B}
}
if(node = max node){
For( each of the children){ apply Minimax + ABP;
if(returned value > A){ A = value}
if(A >= B){return A}
}
return A;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly