P
P
Prizm2021-04-07 22:44:12
Neural networks
Prizm, 2021-04-07 22:44:12

How to implement reinforcement learning with these tools?

I already have:

  1. A neural network class of the feed-forward type (with built-in gradient calculation on an arbitrary model, etc.).
  2. Pair data class (supervised data pairs)
  3. The tic-tac-toe field class with methods for a standard move (by cell number), the getNextStates() method, which returns a list of possible future states (respectively, the tic-tac-toe are swapped so that the field is "on behalf of the opponent"), the getAsVector() method , which returns the state of the field as a vector of 9 values ​​+-1 or 0 depending on what is in the cell.


So - how to properly train a tic-tac-toe bot with reinforcement learning? (provided that the course of the neural network will consist in calculating the V-function for all future states of the board and choosing the "worst" state from the point of view of the opponent).

PS I do not use any libraries, so please provide the algorithm in pseudocode.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question