A little background: as a way to learn multinode trees in C++, I decided to generate all possible TicTacToe boards and store them in a tree such that the branch beginning at a n
The (usually) correct way to implement AI based on a decision tree is to use the "Minimax" algorithm:
Work your way up the tree, applying the following rules to each node:
Of course, even and odd might need to be reversed, depending on who you decide goes first.
You can read more at: