mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-20 05:52:03 +00:00
Fix readme example, documentation and error messages
This commit is contained in:
@@ -188,7 +188,7 @@ Toy environments which are text-based. There's no extra dependency to install, s
|
|||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
import gym
|
import gym
|
||||||
env = gym.make('FrozenLake')
|
env = gym.make('FrozenLake-v0')
|
||||||
env.reset()
|
env.reset()
|
||||||
env.render()
|
env.render()
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ from gym import utils
|
|||||||
try:
|
try:
|
||||||
import atari_py
|
import atari_py
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise error.DependencyNotInstalled("{}. (HINT: you can install Atari dependencies with 'pip install gym[atari].)'")
|
raise error.DependencyNotInstalled("{}. (HINT: you can install Atari dependencies with 'pip install gym[atari]'.)")
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@@ -3,7 +3,7 @@ try:
|
|||||||
import pachi_py
|
import pachi_py
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
# The dependency group [pachi] should match the name is setup.py.
|
# The dependency group [pachi] should match the name is setup.py.
|
||||||
raise error.DependencyNotInstalled('{}. (HINT: you may need to install the Go dependencies via "pip install gym[pachi].)"'.format(e))
|
raise error.DependencyNotInstalled('{}. (HINT: you may need to install the Go dependencies via "pip install gym[pachi]".)'.format(e))
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import gym
|
import gym
|
||||||
|
@@ -7,7 +7,7 @@ from gym import error, spaces
|
|||||||
try:
|
try:
|
||||||
import mujoco_py
|
import mujoco_py
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
raise error.DependencyNotInstalled("{}. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)'".format(e))
|
raise error.DependencyNotInstalled("{}. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)".format(e))
|
||||||
|
|
||||||
BIG=10000
|
BIG=10000
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ class Monitor(object):
|
|||||||
to record every 100 episodes. ('count' is how many episodes have completed)
|
to record every 100 episodes. ('count' is how many episodes have completed)
|
||||||
|
|
||||||
Depending on the environment, video can slow down execution. You
|
Depending on the environment, video can slow down execution. You
|
||||||
can also use 'monitor.configure(video=lambda count: False)' to disable
|
can also use 'monitor.configure(video_callable=lambda count: False)' to disable
|
||||||
video.
|
video.
|
||||||
|
|
||||||
Monitor supports multiple threads and multiple processes writing
|
Monitor supports multiple threads and multiple processes writing
|
||||||
|
Reference in New Issue
Block a user