Skip to content

Commit

Permalink
Update custom env doc to match gym API (#597)
Browse files Browse the repository at this point in the history
* Update to use new close API

* Update custom env documentation to reflect new gym close API

* Update changelog.rst

* Clarifies what reset returns

* Update changelog.rst
  • Loading branch information
jkterry1 authored and araffin committed Dec 4, 2019
1 parent 6039b89 commit aaf9f41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/guide/custom_env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ That is to say, your environment must implement the following methods (and inher
def step(self, action):
...
return observation, reward, done, info
def reset(self):
...
def render(self, mode='human', close=False):
return observation # reward, done, info can't be included
def render(self, mode='human'):
...
def close (self):
...
Expand Down
4 changes: 3 additions & 1 deletion docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Documentation:
- Fix outdated source documentation for load_results
- Add PPO_CPP project (@Antymon)
- Add section on C++ portability of Tensorflow models (@Antymon)
- Update custom env documentation to reflect new gym API for the `close()` method (@justinkterry)
- Update custom env documentation to clarify what step and reset return (@justinkterry)

Release 2.8.0 (2019-09-29)
--------------------------
Expand Down Expand Up @@ -547,4 +549,4 @@ Thanks to @bjmuld @iambenzo @iandanforth @r7vme @brendenpetersen @huvar @abhiskk
@EliasHasle @mrakgr @Bleyddyn @antoine-galataud @junhyeokahn @AdamGleave @keshaviyengar @tperol
@XMaster96 @kantneel @Pastafarianist @GerardMaggiolino @PatrickWalter214 @yutingsz @sc420 @Aaahh @billtubbs
@Miffyli @dwiel @miguelrass @qxcv @jaberkow @eavelardev @ruifeng96150 @pedrohbtp @srivatsankrishnan @evilsocket
@MarvineGothic @jdossgollin @SyllogismRXS @rusu24edward @jbulow @Antymon @seheevic
@MarvineGothic @jdossgollin @SyllogismRXS @rusu24edward @jbulow @Antymon @seheevic @justinkterry

0 comments on commit aaf9f41

Please sign in to comment.