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

33 views (last 30 days)
Jooo on 17 Aug 2020
Commented: Kushal Gowda N on 9 Jul 2021
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?

Accepted Answer

Jooo on 17 Aug 2020
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:
agent = saved_agent;

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!