Skip to content

Commit

Permalink
TimeLimit refactor with Monitor Simplification (openai#482)
Browse files Browse the repository at this point in the history
* fix double reset, as suggested by @jietang

* better floors and ceilings

* add convenience methods to monitor

* add wrappers to gym namespace

* allow playing Atari games, with potentially more coming in the future

* simplify example in docs

* Move play out of the Env

* fix tests

* no more deprecation warnings

* remove env.monitor

* monitor simplification

* monitor simplifications

* monitor related fixes

* a few changes suggested by linter

* timestep_limit fixes

* keep track of gym env variables for future compatibility

* timestep_limit => max_episode_timesteps

* don't apply TimeLimit wrapper in make for VNC envs

* Respect old timestep_limit argument

* Pass max_episode_seconds through registration

* Don't include deprecation warnings yet
  • Loading branch information
nottombrown authored Feb 1, 2017
1 parent c17ac6c commit d337f4e
Show file tree
Hide file tree
Showing 19 changed files with 689 additions and 521 deletions.
3 changes: 2 additions & 1 deletion gym/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ def sanity_check_dependencies():
from gym.benchmarks import benchmark_spec
from gym.envs import make, spec
from gym.scoreboard.api import upload
from gym import wrappers

__all__ = ["Env", "Space", "Wrapper", "make", "spec", "upload"]
__all__ = ["Env", "Space", "Wrapper", "make", "spec", "upload", "wrappers"]
14 changes: 14 additions & 0 deletions gym/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,30 +269,44 @@
{'env_id': 'HalfCheetah-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': -280.0,
'reward_ceiling': 4000.0,
},
{'env_id': 'Hopper-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': 16.0,
'reward_ceiling': 4000.0,
},
{'env_id': 'InvertedDoublePendulum-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': 53.0,
'reward_ceiling': 10000.0,
},
{'env_id': 'InvertedPendulum-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': 5.6,
'reward_ceiling': 1000.0,
},
{'env_id': 'Reacher-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': -43.0,
'reward_ceiling': -0.5,
},
{'env_id': 'Swimmer-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': 0.23,
'reward_ceiling': 500.0,
},
{'env_id': 'Walker2d-v1',
'trials': 3,
'max_timesteps': 1000000,
'reward_floor': 1.6,
'reward_ceiling': 5500.0,
}
])

Expand Down
2 changes: 0 additions & 2 deletions gym/configuration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import sys

import gym

logger = logging.getLogger(__name__)

root_logger = logging.getLogger()
Expand Down
Loading

0 comments on commit d337f4e

Please sign in to comment.