Reinforcement learning: learning a game

1 view (last 30 days)
Anne Tscheliessnig
Anne Tscheliessnig on 27 Jul 2020
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?

Answers (0)

Categories

Find more on Video games in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!