I\'m trying to build a tic tac toe game to demonstrate and experiment with machine learning algorithms, and i\'ve found an interesting problem.
eg: a tic tac toe board c
I don't know the proper mathematical way, but I'd do it like this. Devise a way to convert any state to one number. For instance, assign empty field to zero, O piece to 1, X piece to 2, and treat 9 digits as a number in base-3 system. Now, transform the state to all 7 remaining mirror states. Calculate their numbers too. Pick the smallest out of those 8 numbers. That's it.