Commit Graph

20 Commits

Author SHA1 Message Date
Dan Timbrell
3bd5ef71c2 Clean some docstrings (#1854)
* add type of argument

* fix typos

* split lines for formatting

* reformat string, add ellipsis, remove r string

* make docstring stylistically consistent

* make docstrings a little more elaboratet

* reduce by 1 space

* make line wrap 120

* remove unnecessary line

* add returns to docstring

* add docstring, make code more pep8 and delete some unused print functions

* more pep8

* file docstring instead of comments

* delete unused variables, add file docstring and add some pep8 spring cleaning

* add file docstring, fix typos and add some pep8 correections

Co-authored-by: Dan <daniel.timbrell@ing.com>
2020-04-24 16:10:27 -05:00
Xingdong Zuo
a14e1c7292 Fix unnecessary warnings (#1800)
* Update pendulum.py

* Update continuous_mountain_car.py

* Update cartpole.py

* Update mujoco_env.py

* Update mountain_car.py

* Update acrobot.py
2020-02-29 01:11:29 +01:00
Julien Jerphanion
5ea025d87d Replace np.cos, np.sin, np.pi for readability (#1733)
Remove the `np.` prefix as those two functions and this constant are imported directly.
2019-11-08 14:22:50 -08:00
Abhinav Sagar
13f32c7689 Update acrobot.py 2019-06-14 14:29:03 -07:00
Arash Rowshan
f0909baaf7 corrects typo in AcrobotEnv description (#1272) 2019-02-08 16:37:37 -08:00
Antonin RAFFIN
cdd212db4b Fix autodetect dtype warnings (#1234)
* Fix autodetect dtype warnings

* Use warnings module for gym logger

* Fix warning in tests
2018-11-28 17:27:27 -08:00
Charles Packer
094e6b8e6a CartPole/Acrobot rendering fix (#1189)
* Fixed rendering to properly display modifications to length etc

* 'self.length is half the pole's length'

* Explicitly base viewer size on Acrobot link size

* Made correct polygon rendering work for different link lengths
2018-10-18 14:30:18 -07:00
cfperez
243226bee0 Fix env.close() to allow re-opening window (#1155) 2018-09-14 13:36:57 -07:00
4d55397500
16c35274dc unused local variable acrobot (#900) 2018-02-27 10:18:07 -08:00
John Schulman
4c460ba6c8 Cleanup, removal of unmaintained code (#836)
* add dtype to Box

* remove board_game, debugging, safety, parameter_tuning environments

* massive set of breaking changes
- remove python logging module
- _step, _reset, _seed, _close => non underscored method
- remove benchmark and scoring folder

* Improve render("human"), now resizable, closable window.

* get rid of default step and reset in wrappers, so it doesn’t silently fail for people with underscore methods

* CubeCrash unit test environment

* followup fixes

* MemorizeDigits unit test envrionment

* refactored spaces a bit
fixed indentation
disabled test_env_semantics

* fix unit tests

* fixes

* CubeCrash, MemorizeDigits tested

* gym backwards compatibility patch

* gym backwards compatibility, followup fixes

* changelist, add spaces to main namespaces

* undo_logger_setup for backwards compat

* remove configuration.py
2018-01-25 18:20:14 -08:00
Florentin Hennecker
88ca75b945 Fix acrobot doc (#608)
* [fix] acrobot documentation on state was wrong

* [fix] acrobot doc typos
2017-06-14 13:27:21 -07:00
Trevor Blackwell
8c6468b34d Don't crash if render called before reset 2017-02-27 10:00:48 -08:00
John Schulman
a84edbc78b avoid opening window on close 2016-08-25 17:19:54 -07:00
John Schulman
5ba5cb7e2d minor changes to cartpole+acrobot, upgrade to v1 (#260)
* change cartpole timestep limit to 500
change acrobot to take cos/sin of angles, and increase timestep limit so it gets solved by random exploration

* restore CartPole-v0

* Oops, fix threshold on cartpole
2016-08-06 00:15:50 -07:00
Oleg Klimov
72d89cb22f Faster video recording (#119)
* Faster video recording

* rendering.py: return_rgb_array default to False, for other environments not to break
2016-06-06 00:06:26 -07:00
Greg Brockman
8a535ca6f2 Switch to a global PRNG for action/observation spaces (#144)
cf 58e6aa95e5 (commitcomment-17669277)
2016-05-30 18:07:59 -07:00
Greg Brockman
58e6aa95e5 [WIP] add support for seeding environments (#135)
* Make environments seedable

* Fix monitor bugs

- Set monitor_id before setting the infix. This was a bug that would yield incorrect results with multiple monitors.
- Remove extra pid from stats recorder filename. This should be purely cosmetic.

* Start uploading seeds in episode_batch

* Fix _bigint_from_bytes for python3

* Set seed explicitly in random_agent

* Pass through seed argument

* Also pass through random state to spaces

* Pass random state into the observation/action spaces

* Make all _seed methods return the list of used seeds

* Switch over to np.random where possible

* Start hashing seeds, and also seed doom engine

* Fixup seeding determinism in many cases

* Seed before loading the ROM

* Make seeding more Python3 friendly

* Make the MuJoCo skipping a bit more forgiving

* Remove debugging PDB calls

* Make setInt argument into raw bytes

* Validate and upload seeds

* Skip box2d

* Make seeds smaller, and change representation of seeds in upload

* Handle long seeds

* Fix RandomAgent example to be deterministic

* Handle integer types correctly in Python2 and Python3

* Try caching pip

* Try adding swap

* Add df and free calls

* Bump swap

* Bump swap size

* Try setting overcommit

* Try other sysctls

* Try fixing overcommit

* Try just setting overcommit_memory=1

* Add explanatory comment

* Add what's new section to readme

* BUG: Mark ElevatorAction-ram-v0 as non-deterministic for now

* Document seed

* Move nondetermistic check into spec
2016-05-29 09:07:09 -07:00
Greg Brockman
2ae0dbc846 Discard viewer object after render with close=True
Fixes #95
2016-05-15 17:22:38 -07:00
Josh Marlow
9529fa731b Replaced is string comparison with == (#77) 2016-05-09 17:51:04 -07:00
Greg Brockman
e8f2980603 Initial release. Hello world :). 2016-04-27 08:00:58 -07:00