I believe the RL environment template creator has an error in the reset function but I'm not sure

1 回表示 (過去 30 日間)
when using rlCreateEnvTemplate("MyEnvironment") to create a custom template I came across this line in the reset function:
% Line 123
InitialObservation = [T0;Td0;X0;Xd0];
Initial states seem to be reversed, I believe they should be [X0;Xd0;T0;Td0]?
the same seems to apply to the example loaded with openExample('rl/MATLABCartPoleDQNExample'), although I cannot see the reset function, the example gives the same results as the template and when I tried validating these two against the environments created with openExample('rl/CreateMATLABEnvironmentUsingCustomFunctionsExample') they yield different initial states.
but I'm still kinda new to this and I'm afraid to be missing something here. Could you please clarify?

採用された回答

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2021 年 6 月 22 日
Hello,
You are correct the order is wrong. That being said, the order of states depends on your dynamics and how you set up the state vector in the step function.
Hope that helps
  1 件のコメント
Cecilia S.
Cecilia S. 2021 年 6 月 22 日
Excellent, thank you for clarifying. So, I believe in this case the starting angle would be constant throughout the episodes and the resetting randomization would be only of the X variable
Thanks!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMarkov Chain Models についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by