AI reinforcement learning

I imagine that this is an assignment from your teacher?

I think that he wants you to work with a table to store moves for tic tac toe or whatever so your small AI acts based on that data and gets better.

When you google the AI stuff you come across approaches with neural networks. That confuses you. Stick with the concept of your teacher and forget YouTube/google for now.

Neural networks are much harder to do.

To get real help, tell us about the project and show some code.

Example: Tic Tac Toe

The way I would do it for tic tac toe: (Problem is that you first need the game itself. How to make a move there etc.)

My idea would be that the AI stores the game in a table on the hard drive:

  • When it looses, all the moves it made are noted with score -1, when it wins +1, when it’s a Draw 0.

Now when playing check the table:

  • When you find the board (also by rotation or mirroring but that’s hard) and the score is -1 or 0 avoid the move, otherwise make the move.
  • When you don’t find the board, random move.

Add moves/game to the table when new.

To train this let the AI play against itself as fast as possible for a night.

Then play against the AI.

(check out the forum and the processing YouTube channel for more)

Chrisir

1 Like