Error while training a two-agent environment: Action specification of agent at index 2 incompatible with environment

8 Ansichten (letzte 30 Tage)
I am trying to simulate a two-agent system, using the following structure, and I am no using a reset function at all.
out = sim(envNoLA,[agentTray agentGains],simOpts);
But I get this error:
Error using rl.util.validateAgentsWithEnv>localValidateForSim
Action specification of agent at index 2 incompatible with environment.
Verify the action specification of the agents and environment using
getActionInfo.
Error in rl.util.validateAgentsWithEnv (line 23)
localValidateForSim(agents,env);
Error in rl.env.AbstractEnv/sim (line 67)
rl.util.validateAgentsWithEnv(policies,env);
After checking the specifications for each agent I received:
getActionInfo(agentTray)
ans =
rlNumericSpec with properties:
LowerLimit: -0.0349
UpperLimit: 1.0472
Name: "Trajectories"
Description: [0×0 string]
Dimension: [8 1]
DataType: "double"
And
getActionInfo(agentGains)
ans =
rlNumericSpec with properties:
LowerLimit: -2
UpperLimit: 50
Name: "Trajectories"
Description: [0×0 string]
Dimension: [24 1]
DataType: "double"
The stablished options are:
simOpts = rlSimulationOptions('MaxSteps',1000,...
'NumSimulations',3);
How can I correct this issue?

Antworten (1)

Emmanouil Tzorakoleftherakis
The issue seems to be that the action specifications do not match what the environment model expects. Whether you are using Simulink or MATLAB to model the environment, make sure that the environment input matches what the agent outputs, primarily the dimensions of those actions

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by