question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Why is the environment instantiated differently for DDPG and DQN?

See original GitHub issue

Hello,

Thanks a lot for this amazing code.

I noticed that the environment is instantiated differently when using either DQN or DDPG. Specifically at line 249 of train.py, the env is created with:

env = gym.make(env_id, **env_kwargs)
env.seed(args.seed)

in the case of DQN and DDPG whereas it is created with the make_env helper:

env = DummyVecEnv([make_env(env_id, 0, args.seed, wrapper_class=env_wrapper, log_dir=log_dir, env_kwargs=env_kwargs)])

for all the other algorithms.

This means that the environment is not vectorized, it is not possible to specify the log directory and to monitor the training. Why did you make a special case for DQN and DDPG?

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
PierreExetercommented, Apr 15, 2020

I meant: do you have a script somewhere or you wrote the latex file manually?

It’s a template I use for writing report. It’s pretty basic but here it is if that can be of any use.

DQN-DDPG_vec_noVec.zip

1reaction
PierreExetercommented, Apr 15, 2020

FYI,

Vectorizing DQN or DDPG does not seem to affect the training, the average return or the training time significantly, see results attached.

comparison_vec_noVec.pdf

Read more comments on GitHub >

github_iconTop Results From Across the Web

a comparison between deep q-learning and ... - DiVA Portal
This thesis investigates how the performance between Deep Q-Network (DQN) with a contin- uous and discrete state- and action space, respectively ...
Read more >
DDPG or DQN - Which to use? - LinkedIn
The primary difference would be that DQN is just a value based learning method, whereas DDPG is an actor-critic method. The DQN network...
Read more >
In a DQN, why not train Q against actual discounted rewards?
1 Answer 1 · It requires no knowledge of a model of the environment, you don't need access to the game rules. ·...
Read more >
Deep Reinforcement learning: DQN, Double DQN, Dueling ...
In general, reinforcement learning has different parts. An agent, agent's action, an environment within which an agent takes actions and the ...
Read more >
Using Deep Reinforcement Learning for the Continuous ...
can be applied to a broad range of environments with different dynamics ... The DQN training method therefore introduces a target Q-network, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found