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
If you care only about optimal moves:
See this systematic map of optimal tic-tac-toe moves (http://xkcd.com/832/). You can use some (col, row) indexing to identify a particular state.
If there is more than one equivalent state, use the "lowest" index (you have to define what "lowest" means; e.g. that (col,row) pair whose value 3*col+row is lowest) of all equivalent ones.