Comprehension problem: Unable to reset RL Agent (DDPG)

1 次查看(过去 30 天)
I have trained an RL agent and can confirm that its behavior is close to a possible solution. Now I want to reset the knowledge of the agent (empty experience buffer, reset weights of the neural network of critic and actor) and therefore used
agent = reset(agent).
I can confirm the empty experience buffer, but the behavior is still the same. What have I missed here and how can I reset the policies?
And no, I did not save the progress of the agent (consciously).
Many thanks in advance!

回答(1 个)

Poorna
Poorna 2023-9-1
Hi,
I understand that you would like to reset the agent by using the “reset” function. However, it should be noted that using the reset function on agent will not reset the weights.
To reset the weights, you must explicitly reinitialize the actor and critic networks of the agent.
You can do as below:
agent = reset(agent);
critic = rlQValueFunction(criticNet,obsInfo,actInfo);
actor = rlContinuousDeterministicActor(actorNet,obsInfo,actInfo);
agent.critic = critic;
agent.actor = actor;
You can modify the initialization of critic and actor as required.
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by