how is a neural network used in reinforcement learning?

Viewed 24

so far i have a game, i run 1000 rounds of the game performing random moves. The state of the board , the reward and the action taken are all stored.

then the same game is played, but befor each action is chosen, a comparison check is done to see which previous observations were similar to this one.

Then when a list of similar observations are created, the list is divided into lists for each action taken after that observation.

the list with the highest average reward is then chosen and that action is taken. (this takes like 10 seconds for a single choice).

Ive built plenty of neural networks with tensorflow but never from complete scratch.

ive made a few layers of neurons, just not sure how to employ them.

1 Answers

A neural network can be used in multiple ways in reinforcement learning.

Some networks are trained such that for a given state and action they will output the reward that you will get from that state by doing that action. Then, having this network, for each state you can just simply select in a greedy way the action that leads to the highest reward.

Other networks are trained such that for each state they will provide a distribution over the actions and then you chose the action with the highest probability.

For your case, one way of using the network will be to learn how to map from the board state and the action to your rewards.

Related