フィルターのクリア

How to set multiple stopping or saving criteria for RL agent?

3 ビュー (過去 30 日間)
Yihao Wan
Yihao Wan 2023 年 5 月 26 日
コメント済み: Yihao Wan 2023 年 6 月 29 日
Hello, I wondered if it is possible to set multiple stopping or saving criteria for RL agent? E.g. Save the agent for average episode reward after 100 episodes.
Thanks in advance.

採用された回答

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023 年 5 月 26 日
編集済み: Emmanouil Tzorakoleftherakis 2023 年 5 月 26 日
This is currently not possible but keep an eye out on future releases - the development team has been working on this functionality

その他の回答 (1 件)

Lance
Lance 2023 年 6 月 23 日
編集済み: Lance 2023 年 6 月 29 日
From what I understand, the only other work around would be to write another training command. You would have to predfine this for every "checkpoint" ie. 10,20,30 episodes. The training-progress graph will continue to be actively updated. (Note I am using R2022a)
% Define all agents, observations, actions, environment, etc....
maxepisodes=500;
trainingOpts=rlMultiAgentTrainingOptions;
trainingOpts.SaveAgentCriteria="EpisodeCount";
trainingOpts.SaveAgentValue=maxepisodes
trainingStats=train([agent1,agent2],environment,trainingOpts); % Will train to max episodes and save agent
% Edit Trainingoptions to increase maxepisodes and save agent value
trainingStats(1,1).TrainingOptions.MaxEpisodes=1000;
trainingStats(1,1).TrainingOptions.SaveAgentValue=[1000,1000];
trainnigStats(1,1).TrainingOptions.StopTrainingValue=[1000,1000];
trainingStats(1,2).TrainingOptions.MaxEpisodes=1000;
trainingStats(1,2).TrainingOptions.SaveAgentValue=[1000,1000];
trainnigStats(1,2).TrainingOptions.StopTrainingValue=[1000,1000];
% Resume training -- Will train to 1000 episodes and save agent again
trainingStats2=train([agent1,agent2],environment,trainingStats) %Note you use trainingStats here not trainingOpts
Let me know if this helps!
  1 件のコメント
Yihao Wan
Yihao Wan 2023 年 6 月 29 日
Sure, thanks a lot, Lance. I will try this first.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by