Obtaining Information from Reinforcement Learning while Training

3 次查看(过去 30 天)
While training my custom environment using a DQN, I want to be able to store the reward and another value at the end of each episode somewhere so that I may look at it at the end of training. How may I do that?

回答(1 个)

Stephan
Stephan 2020-8-16
The reward of each training episode is stored in the trainsStats struct which is the output argument of the train function. Inside this struct you find a bunch of informations regarding the training process. See here for what is strored int this struct.
If you want to store additional information you have to do some more effort. For example you could save additional informations inside a .mat-file always if the isDone flag is true in your step function.
The disadvantage of this apporach is, that loading a .mat-file, adding one or more values to it and saving it again can be a time consuming operation. Since you would do this only one time each episode (if the episode is over, indicated by the isDone flag), maybe this is an acceptable way to learn more about your agents behaviour during the training process.

类别

Help CenterFile Exchange 中查找有关 Training and Simulation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by