Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes error in setting explorer in DQN ALE example. #423

Merged
merged 2 commits into from
Mar 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/ale/train_dqn_ale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down