I’m currently working on the Tic Tac Toe project, and I’m stuck with where to even begin? I understand that the most effective method for writing a decent AI for this would be using some sort of min max algorithm. However, I haven’t been able to find a decent example of a min max algorithm for tic tac toe that explains it from the ground up.
From what I’m understanding, a min max algorithm would essentially look at all possible moves the computer could make, then all the possible moves the other play could make, then could be made from there, and so on and so forth. Then it would figure out if any of those lead to it, within the next turn winning. If so, do that. If not, is there any plays with the other player could make which would result in them winning? If so, block that. Then try and find the next optimal move.
Any help would be greatly appreciated!