Why reinforcement learning has different results of action between sim() and getAction()?

조회 수: 1 (최근 30일)
Hi Matlab reinforcement learning team
I have a well-trained PPO actor-critic agent and turned UseExplorationPolicy to 0 to obtain actions from sim() and getAction() respectively without any random setting in env. They share the same observations and agents.
However, the actions obtained from sim() and getAction() are different, though the actions can be reproduced respectively.
Thus, I would like to know how sim() generates actions. Does action come from actor network? If so, why the results are different with the same network?
code
actoraction = getAction(saved_agent,{testobstate});
ResetHandleT = @() myResetFunctionCNsim(testData,testobstate);
StepHandleT = @(Action,StockSaved) myStepFunctionCNsim(Action,StockSaved,testData,testobstate);
envT = rlFunctionEnv(observationInfo,actionInfo,StepHandleT,ResetHandleT);
experience = sim(envT,saved_agent,simOpts);
Look forward to your reply.
Sincerely,
Shuyue

답변 (1개)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 9월 25일
Hi,
Which release are you using? We tried in R2023a and R2023b with UseExplorationPolicy =0 and getAction and sim provide the same results. A reproduction model would be great.

카테고리

Help CenterFile Exchange에서 Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by