Tic Tac Toe Neural Net

Ed3c6659f2e450588f856ebebd79d4c9
0
ned4akpakwu 101 Feb 09, 2005 at 14:44

hi,
i’m having a little problem wit a tic tac toe game i wrote using a bac-propagation neural network as the opponent (A.I) the thing is, the network has to train itself with each board state i.e whenever i make a move, it trains itself using the current state of the board as inputs (i used the following rules. 1 means the point is occupied by an O, -1 means its occupied by an X (the human player) while zero stands for an empty cell. My question is, since this training takes time will it be possible for me to just train the network once using all possible board configurations? currently i train once AND still train each time i make a move.
b.t.w my current training set is about 500 lines of code :D like this :

0, 1, -1
1, 0, 0
1, -1, 0

i’ll be really grateful if anyone could help out with this problem.

5 Replies

Please log in or register to post a reply.

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Feb 09, 2005 at 16:11

why not have code automatically play games with it (random moves)? If you do that enough, surely the network will learn to beat most strategies

Ed3c6659f2e450588f856ebebd79d4c9
0
ned4akpakwu 101 Feb 10, 2005 at 13:59

ok, i’ll try it. Im not so sure how to go about doing that though (the random moves thing).. :D

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Feb 10, 2005 at 16:43

Have the smart computer take its turn, then have the dumb computer just place its x anywhere.

Df0edc8d0f85d69e84fcab7c5fabfcb7
0
rego 101 Feb 12, 2005 at 13:08

@Ed Mack

Have the smart computer take its turn, then have the dumb computer just place its x anywhere. [snapback]15975[/snapback]

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Feb 12, 2005 at 17:19

??