Reinforcement learning: learning a game

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 件)

カテゴリ

ヘルプ センター および File ExchangeVideo games についてさらに検索

製品

リリース

R2019b

質問済み:

2020 年 7 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by