How to simulate saved agents?
Show older comments
trainOpts.SaveAgentCriteria = "EpisodeCount";
trainOpts.SaveAgentValue = 1;
trainOpts.SaveAgentDirectory = pwd + "\Agents";
trainingStats = train(agent,env,trainOpts);
simOpts = rlSimulationOptions(...
'MaxSteps',1000,...
'NumSimulations',3);
load Agents/Agent1.mat
xpr = sim(env,Agent1,simOpts)
I have saved agents in "Agents" folder as shown. How do I simulate these agents? Last two lines in the code above are incorrect. What is the correct way?
Answers (1)
Emmanouil Tzorakoleftherakis
on 23 Feb 2021
Hello,
load Agent1.mat
xpr = sim(env,Agent1,simOpts)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!