From c8ecf87bec5a24f0d23645a59e2dda54d7ac7232 Mon Sep 17 00:00:00 2001 From: Prabhat Nagarajan Date: Thu, 28 Mar 2019 06:28:23 -0500 Subject: [PATCH 1/2] fixes errorwq in setting explorer --- examples/ale/train_dqn_ale.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ale/train_dqn_ale.py b/examples/ale/train_dqn_ale.py index 37b9f68b1..daafce0d4 100644 --- a/examples/ale/train_dqn_ale.py +++ b/examples/ale/train_dqn_ale.py @@ -179,6 +179,11 @@ def make_env(test): links.to_factorized_noisy(q_func) # Turn off explorer explorer = explorers.Greedy() + else: + explorer = explorers.LinearDecayEpsilonGreedy( + 1.0, args.final_epsilon, + args.final_exploration_frames, + lambda: np.random.randint(n_actions)) # Draw the computational graph and save it in the output directory. chainerrl.misc.draw_computational_graph( @@ -202,11 +207,6 @@ def make_env(test): else: rbuf = replay_buffer.ReplayBuffer(10 ** 6, args.num_step_return) - explorer = explorers.LinearDecayEpsilonGreedy( - 1.0, args.final_epsilon, - args.final_exploration_frames, - lambda: np.random.randint(n_actions)) - def phi(x): # Feature extractor return np.asarray(x, dtype=np.float32) / 255 From 53a6156824a6ef6d92e359f9574dfde415242b2c Mon Sep 17 00:00:00 2001 From: Prabhat Nagarajan Date: Fri, 29 Mar 2019 01:14:09 -0500 Subject: [PATCH 2/2] addresses flake issues --- examples/ale/train_dqn_ale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ale/train_dqn_ale.py b/examples/ale/train_dqn_ale.py index daafce0d4..a992ec2e3 100644 --- a/examples/ale/train_dqn_ale.py +++ b/examples/ale/train_dqn_ale.py @@ -181,9 +181,9 @@ def make_env(test): explorer = explorers.Greedy() else: explorer = explorers.LinearDecayEpsilonGreedy( - 1.0, args.final_epsilon, - args.final_exploration_frames, - lambda: np.random.randint(n_actions)) + 1.0, args.final_epsilon, + args.final_exploration_frames, + lambda: np.random.randint(n_actions)) # Draw the computational graph and save it in the output directory. chainerrl.misc.draw_computational_graph(