ANONYMOUS wrote:
> I understand Alpha Beta pruning can help us to be more efficient but I don't quite understand the lecture example and the workings of it.
>
> B being a Min Node and nodes below it are Max Nodes. Why do we eliminate C branch when nodes below it have potential of value 14? what if Branch C is just Branch D but in reverse?
Hi Anon,
This is my understanding of the algorithm.
At the start it's max's turn and it needs to choose either B, C or D. When it makes a choice, it's now min's turn. Min will then choose the child node with the lowest value.
Max knows that once it chooses a node, it's min's turn. It knows min will choose the node with the lowest value.
Max explores B, realizing if it chooses B, min will choose the node with value 3 (as min wants to minimise the value). It then looks at C, sees the first node, which is a lower value then 3, and decides it's not worth exploring. Max wants to maximise the minimum value chosen by min, if max chose node B, min will choose 3, if max chose node C, min will choose 2. Therefore, if max wants to maximise the value, chosing C would be a bad option. It then looks at D, sees the first node is 14, which is greater then 3, so it continues to explore D,and finds 5 which is greater then 3, but then finds 2, which is less then 3. So, in the end, Max chooses B, to maximise the value.
If that makes sense.