Why I get the warning "Referencing of the same agent object by multiple RL Agent blocks " when doing RL training ?
6 views (last 30 days)
Show older comments
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 Comments
Lin
on 12 Jan 2024
Hello,I have the same question,have you solved the problem?If it did, can you tell me how it worked out?
Thank you.
Answers (0)
See Also
Categories
Find more on Training and Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!