Reaching observation data and pass them to the learning process

3 ビュー (過去 30 日間)
Esan freedom
Esan freedom 2024 年 3 月 21 日
コメント済み: Esan freedom 2024 年 3 月 24 日
Hi everyone,
I'm wondering if I can have access to observation data and take actions based on the first observed observations in every time step.
Something that I need is like here:
like here:
obsInfo = rlNumericSpec([8 1]);
if obsInfo.input(1)<0
actInfo= rlNumericSpec([4 1],...
LowerLimit=[-inf -inf -inf -inf]',...
UpperLimit=[0 0 0 0]');
obsInfo.input(1)>0
actInfo= rlNumericSpec([4 1],...
LowerLimit=[0 0 0 0]',...
UpperLimit=[inf inf inf inf]');
else
end

採用された回答

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2024 年 3 月 21 日
編集済み: Emmanouil Tzorakoleftherakis 2024 年 3 月 21 日
In general, you cannot change the observation/action space definition once they are defined. That said, it seems to me that what you are trying to accomplish can be done in a different way. Depending on whether your environment is in MATLAB or Simulink, you can check whether the last observation was positive or negative and adjust the agent's output as needed.
If you are using an off-policy agent, it would be a good idea to also make sure this adjustment is reflected in the experience buffer as well. You can use, e.g. the last action port for that.
  1 件のコメント
Esan freedom
Esan freedom 2024 年 3 月 24 日
Thank you so much,
As I'm using Simulink I did it the way you mentioned. Regards.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by