How to save state in reinforcement learning

8 views (last 30 days)
ryunosuke tazawa
ryunosuke tazawa on 18 Oct 2021
Answered: Harsh on 23 Jan 2025 at 7:15
I wanna know the way to save information of agent's state in reinforcement learning.

Answers (1)

Harsh
Harsh on 23 Jan 2025 at 7:15
Hi Ryunosuke,
To save an agent while training you can use “SaveAgentCriteria”, “SaveAgentValue” and “SaveAgentDirectory” properties of “rlTrainingOptions” object to control when and where to save an agent while training.
“SaveAgentCriteria” is used to specify the condition for saving agents during training. “SaveAgentValue” is used to specify the critical value of condition for saving agents. “SaveAgentDirectory” is used to specify the directory for saved agents.
Please refer to the following documentation to understand more regarding “rlTrainingOptions” object and its properties - https://www.mathworks.com/help/reinforcement-learning/ref/rl.option.rltrainingoptions.html?s_tid=doc_ta
After training your agent, you can save it using the “save” function. Please refer to the following MATLAB answer for more information - https://www.mathworks.com/matlabcentral/answers/816585-saving-trained-rl-agent-after-training

Community Treasure Hunt

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

Start Hunting!