We would like to create a model that which when given a game state, it predicts the best move.
Lets say our game is the simple Tic Tac Toe. It is a small game and we can train the AI for it in a handful of minutes.
Here is our example neural network, reduced the number of hidden layer to avoid cluttering.
In the above network, the inputs are going to be board states. For example,
Lets assume the neural networks always predicts from the perspective of that the turn is of player -1.
If we can build a neural network, we can just flip the board and predict for the opposite player, easy peasy.