Use current simulation data to initialize new simulation - RL training
Ältere Kommentare anzeigen
In the context of PPO Agent training, I would like to use Welford algorithm to calculate the runninig average & and standard deviation of my observations, in order to standardize them and improve the convergence of actor & critic neural networks.
I implemented the algorithm, but I don't know how to keep track of the current running statistics (average and standard deviation) every time a new simulation starts, during the training. This is what I would like to do:
- Whenever a simulation terminates (i.e. "isDone" flag is set to 1) , save the current value of runnig statistics in Matlab workspace
- While initializing the new simulation, set the starting value of the running statistics to match the values just saved in Matlab workspace
Note that I'm using the standard "train" function to run the training, so the transition between one simulation and the next one is handled automatically and I don't have much flexibility in this sense.
I thought about using the "ResetFcn" function handle within my "SimulinkEnvWithAgent" object to accomplish the task, but I am still not able to programmatically save the last value of my signal to the Workspace at the end of a simulation, and then pass it to the ResetFcn as additional argument in order to initialize the next one
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Deep Learning with Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!