필터 지우기
필터 지우기

Why I get the warning "Referencing of the same agent object by multiple RL Agent blocks " when doing RL training ?

조회 수: 10 (최근 30일)
I got the warning "Referencing of the same agent object by multiple RL Agent blocks" when when doing RL training refer to"Train Multiple Agents to Perform Collaborative Task". I got this warning when using “rlSimulinkEnv” to create a multi-agent environment and my Simulink files actually did not contain same agent objects (The two agents are named differently). Does anyone know what mistake I might have made?
Here is the environment creating part of the training code:
mdl = 'xxx';
blks = ["xxx/.../RL Agent 4","xxx/.../RL Agent 16"];
open_system(mdl)
obsInfo = rlNumericSpec([6 1],...
'LowerLimit',[-inf 0 -10 -inf -inf -inf]',...
'UpperLimit',[ inf inf 10 inf inf inf]');
numObservations = obsInfo.Dimension(1);
actInfo = rlNumericSpec([1 1],...
'LowerLimit',0,...
'UpperLimit',5);
numActions = actInfo.Dimension(1);
obsInfos = {obsInfo,obsInfo};
actInfos = {actInfo,actInfo};
env = rlSimulinkEnv(mdl,blks,obsInfos,actInfos);
env.ResetFcn = @(in)localResetFcn(in);
  댓글 수: 2
Lin
Lin 2024년 1월 12일
Hello,I have the same question,have you solved the problem?If it did, can you tell me how it worked out?
Thank you.
katuysha
katuysha 2024년 4월 17일
Hello Lin,
I'm glad to tell you that I have solved this warning problem later in my simulink model.
If you still haven't solved it, here is the solution:
  1. Open your ***.slx model, find your RL Agent blocks and double-click to open one.
  2. You will see the name of your agent in "Agent - Agent object". Set it to the same name as the agent in the training program.
  3. Perform the same operations for other RL Agent blocks.
  4. If the Agent object values of the agents are different, there is no such warning generated.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Training and Simulation에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by