Commit graph

468 commits

Author SHA1 Message Date
Antonin RAFFIN
b948b7fd5c Merge branch 'master' into sde 2020-08-03 22:50:46 +02:00
Antonin RAFFIN
cceffd5ab2
Pre-Release 0.8.0 (#134) 2020-08-03 22:38:54 +02:00
Anssi
2cd6a4f93b
Match performance with stable-baselines (discrete case) (#110)
* Fix storing correct episode dones

* Fix number of filters in NatureCNN network

* Add TF-like RMSprop for matching performance with sb2

* Remove stuff that was accidentally included

* Reformat

* Clarify variable naming

* Update changelog

* Add comment on RMSprop implementations to A2C

* Add test for RMSpropTFLike

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-08-03 22:22:51 +02:00
RaphaelWag
3253ee11e7
Update custom_policy.rst (#125)
* Update custom_policy.rst

Fixed Typo

* Update changelog.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-07-31 11:10:48 +02:00
Antonin RAFFIN
af0f3a6a95 Merge branch 'master' into sde 2020-07-30 20:50:33 +02:00
Anssi
77cb3dd0ab
Separate feature extractor networks for DQN networks (#132)
* Separate feature extractor networks for DQN networks

* [ci skip] Bump version

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-07-30 20:48:30 +02:00
Antonin RAFFIN
151104c07d Merge branch 'master' into sde 2020-07-30 09:59:49 +02:00
Andy Shih
8f9aaaebe9
fix approximate entropy calculation in PPO and A2C (#130) 2020-07-29 21:19:41 +02:00
Antonin RAFFIN
d2fb9b66b4 Merge branch 'master' into sde 2020-07-28 11:20:44 +02:00
rk37
bd2aae0c27
Fix ortho init when bias=False with custom policy (#126)
* Update policies.py

fix AttributeError occurred when use "bias=False" linear layer in custom FeaturesExtractor #124

* Update changelog.rst

 update the changelog accordingly

* Update changelog.rst

Co-authored-by: Kong Lingchao <konglingchao@gmail.com>
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-07-25 22:35:48 +02:00
Steven H. Wang
83530560b5
Fix CloudpickleWrapper load (#118)
* CloudpickleWrapper: Load using cloudpickle

* Update changelog
2020-07-21 10:12:39 +02:00
Antonin RAFFIN
e7426a1946 Fix lost import 2020-07-20 18:14:09 +02:00
Antonin RAFFIN
0781734bc6 Merge branch 'master' into sde 2020-07-20 11:22:03 +02:00
Antonin RAFFIN
41b66e33ce [ci skip] Remove whitespace 2020-07-20 11:20:12 +02:00
Stelios Tymvios
dbe8cfceb6
Optimized polyak updates (#106)
* quick polyak updates

* changelog

* typing

* reverted autoformatting

* rerverted autofmt

* Update stable_baselines3/common/utils.py

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

* parameter names in test

* cleanup

* Merge branch 'master' into polyak

* Update changelog

* Apply suggestions from code review

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

* Update stable_baselines3/common/utils.py

* Update utils.py

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-07-17 15:53:28 +02:00
Antonin RAFFIN
5db5e4738c Minor fix 2020-07-16 18:16:10 +02:00
Antonin RAFFIN
e379a7a4c8 Merge branch 'master' into sde 2020-07-16 17:58:35 +02:00
Antonin RAFFIN
45f3d57b64 Reformat 2020-07-16 17:51:02 +02:00
Antonin RAFFIN
23afedb254
Auto-formatting with black and isort (#97)
* Add auto formatting with black and isort

* Reformat code

* Ignore typing errors

* Add note about line length

* Add minimum version for isort

* Add commit-checks

* Update docker image

* Fixed lost import (during last merge)

* Fix opencv dependency
2020-07-16 16:12:16 +02:00
Antonin RAFFIN
5ff176b2f1
Implement DDPG (#92)
* Add DDPG + TD3 with any number of critics

* Allow any number of critics for SAC

* Update doc

* [ci skip] Update DDPG example

* Remove unused parameter

* Add DDPG to identity test

* Fix computation with n_critics=1,3

* Update doc

* Apply suggestions from code review

Co-authored-by: Adam Gleave <adam@gleave.me>

* Update docstrings for off-policy algos

* Add check for sde

Co-authored-by: Adam Gleave <adam@gleave.me>
2020-07-16 14:14:22 +02:00
Antonin RAFFIN
a96970c7c0 Merge branch 'master' into sde 2020-07-16 11:56:35 +02:00
Antonin RAFFIN
208890dfc8
Ignore errors from new pytype version (#107) 2020-07-16 11:54:37 +02:00
Antonin Raffin
8f5279eebe Merge branch 'master' into sde 2020-07-10 14:01:51 +02:00
Joel Joseph
3cf6e9714b
Update ppo.rst (#94)
* Update ppo.rst

minor correction from A2C to PPO

* Update changelog.rst

* Update changelog.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-07-10 10:38:35 +02:00
Antonin RAFFIN
bfa6c86f83 Merge branch 'master' into sde 2020-07-08 21:45:13 +02:00
Adam Gleave
758b140b9d
Merge pull request #91 from DLR-RM/base-review-2
Refactor BasePolicy into BaseModel + other minor changes
2020-07-08 12:18:44 -07:00
Adam Gleave
fc0b0b8824 Lint 2020-07-07 19:05:10 -07:00
Adam Gleave
e7130344de Add changelog entry 2020-07-07 19:03:46 -07:00
Adam Gleave
1dbbf75036 Merge remote-tracking branch 'origin/master' into base-review-2 2020-07-07 18:57:57 -07:00
Adam Gleave
bf73f01ee9 Merge branch 'base-class-review' of github.com:DLR-RM/stable-baselines3 into base-class-review 2020-07-07 18:57:35 -07:00
Adam Gleave
c39ed397ac
Merge pull request #89 from DLR-RM/base-class-review
Refactor and clean-up of common code
2020-07-07 18:53:51 -07:00
Adam Gleave
0345591dea Refactor BasePolicy by introducing new BaseModel ABC for Critic's to inherit from. 2020-07-07 18:51:44 -07:00
Adam Gleave
91bbc28c0f Address minor issues after clarification by @araffin 2020-07-07 18:39:55 -07:00
Antonin RAFFIN
bea1e023bb
Merge branch 'master' into base-class-review 2020-07-07 10:01:03 +02:00
Antonin RAFFIN
3756d05f72
Refactored ContinuousCritic for SAC/TD3 (#78)
* Refactored ContinuousCritic for SAC/TD3

* Address comments

* Add pybullet notebook
2020-07-07 01:02:51 +03:00
Antonin RAFFIN
c1f30acd6f Merge branch 'master' into sde 2020-07-03 21:51:44 +02:00
Adam Gleave
e61d34a6f0 Fix typing, key error 2020-07-02 21:35:06 -07:00
Adam Gleave
e9d8e05cc8 Review policies 2020-07-02 21:04:52 -07:00
Adam Gleave
cc7a58bc5f Bugfix 2020-07-02 20:28:48 -07:00
Adam Gleave
7ba48dce48 Review distributions 2020-07-02 19:18:51 -07:00
Adam Gleave
56fd89da8d Review type aliases 2020-07-02 18:51:10 -07:00
Adam Gleave
1f0443f332 Review base_class 2020-07-02 18:49:59 -07:00
Adam Gleave
2affbd6856 Fix linting and make it play nicely with venv 2020-07-02 18:14:54 -07:00
Stelios Tymvios
4aa66ed34a
Automatically create paths for saved objects (#80)
* automatically create paths for saved objects

* Minor Corrections, more tests

* linting

* typing

* Correct mode checking

* corrected tests to reflect new verbose functionality
2020-07-03 01:14:21 +03:00
Marios Koulakis
7d8ebb9e98
Udacity Reacher Project with Unity (#79)
* Add the reacher project to the sample projects

* Update the change log

* Remove github incompatible link notation

* Update changelog.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-06-30 15:03:02 +02:00
Antonin RAFFIN
75cac8480a Merge branch 'master' into sde 2020-06-29 18:08:08 +02:00
Antonin RAFFIN
08e7519381
Fix q-target in SAC (#77)
* Fix q-target in SAC

* [ci skip] Update version
2020-06-29 17:58:55 +02:00
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
JieQiang (Jay) Wei
e47da426c1
Update rl_zoo.rst (#72)
* Update rl_zoo.rst

a typo fixed.

* Update changelog.rst

Fixed a typo in zoo readme.

* Update changelog.rst

Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2020-06-25 12:14:56 +02:00
Antonin RAFFIN
c76c657f2d Merge branch 'master' into sde 2020-06-20 18:02:37 +02:00