Trying to load previously saved agent fails (Reinforcement Learning Toolbox)

Hello,
I have problems to load an agent, that I have trained before. When I try to open the preconfigured examples from Mathworks (e.g. the Watertank model) I can load the existing agent and everything works fine. However, when I train the model first, save the agent and then load this agent I get a warning saying: "Warning: Variable 'agent' not found."
This happens also for other models and I don´t understand why... Can somebody help me out on this?

 채택된 답변

Jooo
Jooo 2020년 8월 17일
Just managed to solve this problem by myself.
In case anyone else has the same problem:
In order to load your saved agent you have to use the following code snippet:
load('Agent123.mat','saved_agent');
agent = saved_agent;

댓글 수: 4

Solved, thanks a lot
This was my problem, thanks a lot.
  • Wouldn't that work if it was
load(' agent123.mat ')
I get this error of saved_agent
Please help

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Reinforcement Learning Toolbox에 대해 자세히 알아보기

질문:

2020년 8월 17일

댓글:

2021년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by