I have been trying to understand the working of the minimax algorithm at the intermediate states of a game of tic tac toe. But I am unable to do so. I understand that the min max algorithm returns the best possible state for the player at every step. If the states were like this
At the final stages of the game, it is easier to understand that the state that leads to an advantage or maximum points for a player is the best configuration. In this example, we can see that the state which has the score '1', at the leaf is the best state. But what happens at the intermediate stages or when the game begins.
Suppose we had 3 positions to begin with or the player could go to these states by playing a certain position. And these positions further lead to further board configurations down the tree. Each of the three branches from the initial/start node will eventually lead to victory denoted by '1' at the leaf nodes or a defeat denoted by '-1' in the leaf nodes or in some cases a draw denoted by '0'.
What does the minimax algorithm do here? Which position or branch will the minimax return after the initial node?