Jump to content


Tic Tac Toe Neural Net


5 replies to this topic

#1 ned4akpakwu

    New Member

  • Members
  • Pip
  • 2 posts

Posted 09 February 2005 - 02:44 PM

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.

#2 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 09 February 2005 - 04:11 PM

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

#3 ned4akpakwu

    New Member

  • Members
  • Pip
  • 2 posts

Posted 10 February 2005 - 01:59 PM

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

#4 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 10 February 2005 - 04:43 PM

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

#5 rego

    Member

  • Members
  • PipPip
  • 46 posts

Posted 12 February 2005 - 01:08 PM

Ed Mack said:

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

View Post



#6 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 12 February 2005 - 05:19 PM

??





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users