Don’t know anything about Lua or Torch, and not so much about machine learning. Little project to get going.
Thought I’d give a simple tic tac toe playing guy a go. The structure is play a bunch of totally random games, collect up all the winning games. Then the problem is a classification problem where the categories are the next move (1-9).
Then used the stock nn neural network package to learn on it. Had a tough time finding clear docs. I am unimpressed.
Then use trained neural network to play against the random component.
The win stats increased from ~28% to ~45% (with some fluctuations run to run of a couple percent). Not bad. Especially since going second is disadvantageous. Okay, as I wrote that I realized it’s easy to try flipping that. Going first the stats go from 59% to 69%.
Hmmm. Maybe I should look at draws?
Also, a smart strategy for the moves would be to use the suggested moves according to their rank, not using the top suggested move then if that is invalid using a random move.