diff --git a/agents/.DS_Store b/agents/.DS_Store index ede64cb..660298b 100644 Binary files a/agents/.DS_Store and b/agents/.DS_Store differ diff --git a/agents/ppo/agent.py b/agents/ppo/agent.py index b7215c0..a245bf8 100644 --- a/agents/ppo/agent.py +++ b/agents/ppo/agent.py @@ -104,14 +104,16 @@ class Agent: T.nn.utils.clip_grad_norm_( self.actor.parameters(), max_norm=2) + T.nn.utils.clip_grad_norm_( self.critic.parameters(), max_norm=2) # Calculate the gradient norms for both networks actor_grad_norm = T.nn.utils.clip_grad_norm_( - self.actor.parameters(), max_norm=1) + self.actor.parameters(), max_norm=2) + critic_grad_norm = T.nn.utils.clip_grad_norm_( - self.critic.parameters(), max_norm=1) + self.critic.parameters(), max_norm=2) # Log or print the gradient norms print(f"Actor Gradient Norm: {actor_grad_norm}") diff --git a/agents/saved_models/A0 b/agents/saved_models/A0 new file mode 100644 index 0000000..f675985 Binary files /dev/null and b/agents/saved_models/A0 differ diff --git a/agents/saved_models/C0 b/agents/saved_models/C0 new file mode 100644 index 0000000..8ae113c Binary files /dev/null and b/agents/saved_models/C0 differ diff --git a/figures/older_figures/actor_loss.png b/figures/older_figures/actor_loss.png index 58db36e..d12160e 100644 Binary files a/figures/older_figures/actor_loss.png and b/figures/older_figures/actor_loss.png differ diff --git a/figures/older_figures/critic_loss.png b/figures/older_figures/critic_loss.png index a364bc1..af6a27e 100644 Binary files a/figures/older_figures/critic_loss.png and b/figures/older_figures/critic_loss.png differ diff --git a/figures/older_figures/score.png b/figures/older_figures/score.png index 7e8f973..4987f79 100644 Binary files a/figures/older_figures/score.png and b/figures/older_figures/score.png differ diff --git a/figures/older_figures/total_loss.png b/figures/older_figures/total_loss.png index 2636dcb..88a6bd4 100644 Binary files a/figures/older_figures/total_loss.png and b/figures/older_figures/total_loss.png differ diff --git a/figures/score.png b/figures/score.png index b4ab992..f025931 100644 Binary files a/figures/score.png and b/figures/score.png differ diff --git a/figures/total_loss.png b/figures/total_loss.png index 41c1ce0..2ff68c3 100644 Binary files a/figures/total_loss.png and b/figures/total_loss.png differ