mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-19 13:32:03 +00:00
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
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import gym
|
||||
from gym import wrappers
|
||||
|
||||
from gym import wrappers, logger
|
||||
|
||||
class RandomAgent(object):
|
||||
"""The world's simplest agent!"""
|
||||
@@ -19,19 +17,9 @@ if __name__ == '__main__':
|
||||
parser.add_argument('env_id', nargs='?', default='CartPole-v0', help='Select the environment to run')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Call `undo_logger_setup` if you want to undo Gym's logger setup
|
||||
# and configure things manually. (The default should be fine most
|
||||
# of the time.)
|
||||
gym.undo_logger_setup()
|
||||
logger = logging.getLogger()
|
||||
formatter = logging.Formatter('[%(asctime)s] %(message)s')
|
||||
handler = logging.StreamHandler(sys.stderr)
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
|
||||
# You can set the level to logging.DEBUG or logging.WARN if you
|
||||
# You can set the level to logger.DEBUG or logger.WARN if you
|
||||
# want to change the amount of output.
|
||||
logger.setLevel(logging.INFO)
|
||||
logger.set_level(logger.INFO)
|
||||
|
||||
env = gym.make(args.env_id)
|
||||
|
||||
|
Reference in New Issue
Block a user