Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Using Epsilon Greedy Policy
policy = EpsGreedyQPolicy()
# Using Sequential memory with limit of 50000
memory = SequentialMemory(limit=50000, window_length=1)
# Initializing DQNAgent
dqn = DQNAgent(model=model, nb_actions=nb_actions, memory=memory, nb_steps_warmup=10, target_model_update=1e-2, policy=policy)
dqn.compile(Adam(lr=1e-3), metrics=['mae'])
# Fit data to the model we initialized.
dqn.fit(env, nb_steps=30000, visualize=True, verbose=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.