Obtaining Information from Reinforcement Learning while Training
4 次查看(过去 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?
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!