stable-baselines3/stable_baselines3/common
Noah 96b771f24e
Implement DQN (#28)
* Created DQN template according to the paper.
Next steps:
- Create Policy
- Complete Training
- Debug

* Changed Base Class

* refactor save, to be consistence with overriding the excluded_save_params function. Do not try to exclude the parameters twice.

* Added simple DQN policy

* Finished learn and train function
- missing correct loss computation

* changed collect_rollouts to work with discrete space

* moved discrete space collect_rollouts to dqn

* basic dqn working

* deleted SDE related code

* added gradient clipping and moved greedy policy to policy

* changed policy to implement target network
and added soft update(in fact standart tau is 1 so hard update)

* fixed policy setup

* rebase target_update_intervall on _n_updates

* adapted all tests
all tests passing

* Move to stable-baseline3

* Fixes for DQN

* Fix tests + add CNNPolicy

* Allow any optimizer for DQN

* added some util functions to create a arbitrary linear schedule, fixed pickle problem with old exploration schedule

* more documentation

* changed buffer dtype

* refactor and document

* Added Sphinx Documentation
Updated changelog.rst

* removed custom collect_rollouts as it is no longer necessary

* Implemented suggestions to clean code and documentation.

* extracted some functions on tests to reduce duplicated code

* added support for exploration_fraction

* Fixed exploration_fraction

* Added documentation

* Fixed get_linear_fn -> proper progress scaling

* Merged master

* Added nature reference

* Changed default parameters to https://www.nature.com/articles/nature14236/tables/1

* Fixed n_updates to be incremented correctly

* Correct train_freq

* Doc update

* added special parameter for DQN in tests

* different fix for test_discrete

* Update docs/modules/dqn.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>

* Update docs/modules/dqn.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>

* Update docs/modules/dqn.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>

* Added RMSProp in optimizer_kwargs, as described in nature paper

* Exploration fraction is inverse of 50.000.000 (total frames) / 1.000.000 (frames with linear schedule) according to nature paper

* Changelog update for buffer dtype

* standard exlude parameters should be always excluded to assure proper saving only if intentionally included by ``include`` parameter

* slightly more iterations on test_discrete to pass the test

* added param use_rms_prop instead of mutable default argument

* forgot alpha

* using huber loss, adam and learning rate 1e-4

* account for train_freq in update_target_network

* Added memory check for both buffers

* Doc updated for buffer allocation

* Added psutil Requirement

* Adapted test_identity.py

* Fixes with new SB3 version

* Fix for tensorboard name

* Convert assert to warning and fix tests

* Refactor off-policy algorithms

* Fixes

* test: remove next_obs in replay buffer

* Update changelog

* Fix tests and use tmp_path where possible

* Fix sampling bug in buffer

* Do not store next obs on episode termination

* Fix replay buffer sampling

* Update comment

* moved epsilon from policy to model

* Update predict method

* Update atari wrappers to match SB2

* Minor edit in the buffers

* Update changelog

* Merge branch 'master' into dqn

* Update DQN to new structure

* Fix tests and remove hardcoded path

* Fix for DQN

* Disable memory efficient replay buffer by default

* Fix docstring

* Add tests for memory efficient buffer

* Update changelog

* Split collect rollout

* Move target update outside `train()` for DQN

* Update changelog

* Update linear schedule doc

* Cleanup DQN code

* Minor edit

* Update version and docker images

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-06-29 11:16:54 +02:00
..
vec_env Fixed SubprocVecEnv close. (#68) 2020-06-20 18:01:37 +02:00
__init__.py More doc + sync VecEnvs + atari 2020-05-07 16:08:23 +02:00
atari_wrappers.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00
base_class.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00
bit_flipping_env.py Sync with Stable-Baselines 2020-05-05 16:28:38 +02:00
buffers.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00
callbacks.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
cmd_util.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00
distributions.py Hotfix PPO + gSDE (#53) 2020-06-10 18:58:35 +02:00
env_checker.py Build the doc 2020-05-07 17:35:29 +02:00
evaluation.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
identity_env.py Add flake8 linter and Github CI (#19) 2020-05-12 17:55:01 +02:00
logger.py Tensorboard integration (#30) 2020-06-01 11:55:44 +02:00
monitor.py Update doc 2020-05-08 13:09:38 +02:00
noise.py Implemented Vectorized Action Noise (#34) 2020-05-27 09:53:01 +02:00
off_policy_algorithm.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00
on_policy_algorithm.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
policies.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
preprocessing.py Support for MultiBinary / MultiDiscrete spaces (#13) 2020-05-18 14:42:13 +02:00
results_plotter.py Rename to stable-baselines3 2020-05-05 15:02:35 +02:00
running_mean_std.py Rename to stable-baselines3 2020-05-05 15:02:35 +02:00
save_util.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
torch_layers.py Review of code (A2C, PPO and refactoring) (#35) 2020-06-09 13:54:18 +02:00
type_aliases.py Rename to stable-baselines3 2020-05-05 15:02:35 +02:00
utils.py Implement DQN (#28) 2020-06-29 11:16:54 +02:00