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/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, 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,