I implemented the minimax algorithm with alpha-beta pruning to see how it works, with application to the connect four game.
My AI works fine, considering the AI is the MAX player (VS human player, which is the MIN), e.g. the Minimax root node of the tree.
However, since the root node is always the MAX player (AI), does this means that the leaf nodes, where pruning occurs, should be at an odd depth?
Whenever I use an odd number for depth, my algorithm works fine. But when I use an even number, the bottom node because a min node and AI looses the game.
Can anyone confirm that when using MAX as the root node, the depth should always be an odd number? AFAIK, it's never said explicitly in the algorithm's description.
Thanks