preventing the evaluation agent from getting stuck in bad policies by updating from the global network during episodes
This commit is contained in:
1 parent
d3c6860421
commit
39cf78074c
2 files changed
+6
No files matched your search
@@ -457,6 +457,11 @@ class Agent:
|
||||
while not episode_ended:
|
||||
episode_ended = self.act(phase=RunPhase.TEST)
|
||||
|
||||
if keep_networks_synced \
|
||||
and self.total_steps_counter % self.tp.agent.update_evaluation_agent_network_after_every_num_steps:
|
||||
for network in self.networks:
|
||||
network.sync()
|
||||
|
||||
if self.tp.visualization.dump_gifs and self.total_reward_in_current_episode > max_reward_achieved:
|
||||
max_reward_achieved = self.total_reward_in_current_episode
|
||||
frame_skipping = int(5/self.tp.env.frame_skip)
|
||||
|
||||
Reference in new issue
Block a user