Observation specification must be scalar if not created by bus2RLSpec. Simulink Environment for Reinforcement Learning
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to define a Simulink Environment for Reinforcement Learning describing a System. In particular, I would like to consider 3 observations (image, velocity and acceleration) and only 1 continues action as manipulated variable.
% Define observation specifications.
obsBus = Simulink.Bus();
obsBus.Elements(1) = Simulink.BusElement;
obsBus.Elements(1).Name = "image";
obsBus.Elements(1).Dimensions = [12,12,4];
obsBus.Elements(2) = Simulink.BusElement;
obsBus.Elements(2).Name = "scalarObservation1";
obsBus.Elements(3) = Simulink.BusElement;
obsBus.Elements(3).Name = "scalarObservation2";
NobsInfo = bus2RLSpec('obsBus','Model',mdl);
NobsInfo=allObsInfo;
I get this error:
Error using rl.train.marl.MultiAgentTrainer/run
Error in '
rlAreaCoverage32024/Agent A (Red)': Failed to evaluate mask initialization commands.
Error in rl.train.TrainingManager/train (line 429)
run(trainer);
Error in
rl.train.TrainingManager/run (line 218)
train(this);
Error in
rl.agent.AbstractAgent/train (line 83)
trainingResult = run(trainMgr,checkpoint);
Caused by:
Error using rl.env.internal.reportSimulinkSimError
Observation specification must be scalar if not created by bus2RLSpec.
The code and Simulink files are in the files attached below.
Thank you for your attention, I'll wait for your help
3 Kommentare
Altaïr
am 5 Dez. 2024
Hi @Alen,
The attached 'TESTIN1.mlx' livescript seems to have some variables such as 'allObsInfo' and 'obsSize' which are not defined. Please verify if the right files are attached.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!