receiving different training results while running the same code

1 回表示 (過去 30 日間)
Sourabh
Sourabh 2023 年 6 月 2 日
I ran the training of my RL model but forgot to save so i thought i would run the same script again
but i am getting a slightly changed response ?
shouldnt i get the same training results?
also what is relation b/w different sampling times of like actor and agent.
  3 件のコメント
Sourabh
Sourabh 2023 年 6 月 2 日
okay so does it mean higher sample time of my agent better control or what ?
also in training if max steps is 100 does it mean the simulation is running for 100 sec / episode ?
Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023 年 6 月 5 日
max steps will depend on your agent sample time. If it's 100, it means thatthe total episode duration will be 100* ts where ts is the agent sample time.
Also, smaller sample time does not necessarily mean better control. As a rule of thumb, your sample time should only be as small as needed to get good results, not smaller than that to avoid wasting computational resources.

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

採用された回答

Steven Lord
Steven Lord 2023 年 6 月 2 日
Are random numbers involved in the process of creating or training your RL model? [My guess is most likely yes.] One way to check this would be to set the state of the random number generator to a known, fixed value using rng then run your code. Reset the generator to that same known, fixed value and run your code again.
rng(0, 'twister');
x = rand(1, 5)
x = 1×5
0.8147 0.9058 0.1270 0.9134 0.6324
y = rand(1, 5) % not the same as x
y = 1×5
0.0975 0.2785 0.5469 0.9575 0.9649
isequal(x, y)
ans = logical
0
rng(0, 'twister');
y = rand(1, 5) % the same as x
y = 1×5
0.8147 0.9058 0.1270 0.9134 0.6324
isequal(x, y)
ans = logical
1

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by