Reinforcement learning: learning a game
1 view (last 30 days)
Show older comments
Hi,
I want to learn RI by programming a game (e.g. TicTacToe) which requires 2 players. To get the action of the second player into the RI I would adapt my step function:
1) First get the initial observation and pass it on to the step function ("logged.signal")
Note: to add additional randomness, I would randomly pick Player 1 (= Agent) or Player 2 to start in the ResetFunction. If Player 2 starts, there would be a first random action performed by Player 2 before the ResetFunction ends.
----Start of StepFunction
2) Take a random action and update the observation ("nextobs")
3) Check for "IsDone" and "Reward"
4) Take another random action ( = Player 2) and update the observation ("logged.signal")
5) Check for "IsDone" and "Reward"
----- End of StepFunction
Does that sound feasible?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!