training_ml_control.environments.utils#
Module Contents#
Classes#
Functions#
Creates instance of CartEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames. |
|
Creates instance of PendulumEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames. |
|
Creates instance of GridWorldEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames. |
|
Creates instance of InvertedPendulumEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames. |
|
Data#
API#
- training_ml_control.environments.utils.__all__#
[‘create_inverted_pendulum_environment’, ‘create_grid_world_environment’, ‘create_cart_environment’,…
- training_ml_control.environments.utils.create_cart_environment(render_mode: str | None = 'rgb_array', *, max_steps: int = 200, goal_velocity: float = 0, max_position: float = 10, max_speed: float = 10, max_force: float = 10, goal_position: float = 9.0) gymnasium.Env[source]#
Creates instance of CartEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames.
- training_ml_control.environments.utils.create_pendulum_environment(render_mode: str | None = 'rgb_array', *, max_steps: int = 200) gymnasium.Env[source]#
Creates instance of PendulumEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames.
- training_ml_control.environments.utils.create_grid_world_environment(render_mode: str | None = 'rgb_array', *, max_steps: int = 20) gymnasium.Env[source]#
Creates instance of GridWorldEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames.
- training_ml_control.environments.utils.create_inverted_pendulum_environment(render_mode: str | None = 'rgb_array', *, max_steps: int = 500, masspole: float | None = None, masscart: float | None = None, length: float | None = None, x_threshold: float = 3, theta_initial: float = 0.0, theta_threshold: float = 24, force_max: float = 10.0) gymnasium.Env[source]#
Creates instance of InvertedPendulumEnv with some wrappers to ensure correctness, limit the number of steps and store rendered frames.
Args: render_mode: Render mode for environment. max_steps: Maximum number of steps in the environment before termination. masspole: mass of the pole. masscart: mass of the cart. length: length of the pole. force_max: maximum absolute value for force applied to Cart. x_threshold: Threshold value for cart position. theta_threshold: Threshold value for pole angle.
Returns: Instantiated and wrapped environment.
- class training_ml_control.environments.utils.SimulationResults[source]#
- frames: list[numpy.typing.NDArray]#
None
- observations: numpy.typing.NDArray#
None
- estimated_observations: numpy.typing.NDArray#
None
- actions: numpy.typing.NDArray#
None
- training_ml_control.environments.utils.simulate_environment(env: gymnasium.Env, *, max_steps: int = 500, controller: training_ml_control.control.FeedbackController | None = None, observer: training_ml_control.control.Observer | None = None, seed: int = 16) training_ml_control.environments.utils.SimulationResults[source]#