From 42b177354ce527ca671b5ea02cbfeaa40e81d533 Mon Sep 17 00:00:00 2001 From: suryadheeshjith Date: Wed, 21 Apr 2021 02:40:19 +0530 Subject: [PATCH 1/2] Updated Epsilon in main_dqn for testing without changing parameter value --- DQN/main_dqn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DQN/main_dqn.py b/DQN/main_dqn.py index 2d9884c..c83cbae 100644 --- a/DQN/main_dqn.py +++ b/DQN/main_dqn.py @@ -11,7 +11,11 @@ load_checkpoint = False n_games = 250 - agent = DQNAgent(gamma=0.99, epsilon=1, lr=0.0001, + eps = 1 + if load_checkpoint: + eps=0.1 + + agent = DQNAgent(gamma=0.99, epsilon=eps, lr=0.0001, input_dims=(env.observation_space.shape), n_actions=env.action_space.n, mem_size=50000, eps_min=0.1, batch_size=32, replace=1000, eps_dec=1e-5, From f6d5a575e2a331d14a9c9f53259f263738bc5e82 Mon Sep 17 00:00:00 2001 From: suryadheeshjith Date: Wed, 21 Apr 2021 03:01:52 +0530 Subject: [PATCH 2/2] Updated Epsilon for testing in all the models main.py --- DDQN/main_ddqn.py | 6 +++++- DuelingDDQN/main_dueling_ddqn.py | 5 ++++- DuelingDQN/main_dueling_dqn.py | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/DDQN/main_ddqn.py b/DDQN/main_ddqn.py index f6be8c9..a1bcd62 100644 --- a/DDQN/main_ddqn.py +++ b/DDQN/main_ddqn.py @@ -8,7 +8,11 @@ best_score = -np.inf load_checkpoint = False n_games = 100 - agent = DDQNAgent(gamma=0.99, epsilon=1.0, lr=0.0001, + + eps = 1 + if load_checkpoint: + eps=0.1 + agent = DDQNAgent(gamma=0.99, epsilon=eps, lr=0.0001, input_dims=(env.observation_space.shape), n_actions=env.action_space.n, mem_size=50000, eps_min=0.1, batch_size=32, replace=10000, eps_dec=1e-5, diff --git a/DuelingDDQN/main_dueling_ddqn.py b/DuelingDDQN/main_dueling_ddqn.py index 1d9cd42..17c1b95 100644 --- a/DuelingDDQN/main_dueling_ddqn.py +++ b/DuelingDDQN/main_dueling_ddqn.py @@ -9,7 +9,10 @@ best_score = -np.inf load_checkpoint = False n_games = 20 - agent = DuelingDDQNAgent(gamma=0.99, epsilon=1.0, lr=0.0001, + eps = 1 + if load_checkpoint: + eps=0.1 + agent = DuelingDDQNAgent(gamma=0.99, epsilon=eps, lr=0.0001, input_dims=(env.observation_space.shape), n_actions=env.action_space.n, mem_size=50000, eps_min=0.1, batch_size=32, replace=10000, eps_dec=1e-5, diff --git a/DuelingDQN/main_dueling_dqn.py b/DuelingDQN/main_dueling_dqn.py index 373ec44..117802a 100644 --- a/DuelingDQN/main_dueling_dqn.py +++ b/DuelingDQN/main_dueling_dqn.py @@ -8,7 +8,10 @@ best_score = -np.inf load_checkpoint = False n_games = 20 - agent = DuelingDQNAgent(gamma=0.99, epsilon=1.0, lr=0.0001, + eps = 1 + if load_checkpoint: + eps=0.1 + agent = DuelingDQNAgent(gamma=0.99, epsilon=eps, lr=0.0001, input_dims=(env.observation_space.shape), n_actions=env.action_space.n, mem_size=50000, eps_min=0.1, batch_size=32, replace=10000, eps_dec=1e-5,