carl.envs.gymnasium.classic_control.carl_cartpole¶
Classes¶
|
Interfaces¶
- class carl.envs.gymnasium.classic_control.carl_cartpole.CARLCartPole(env=None, contexts=None, obs_context_features=None, obs_context_as_dict=True, context_selector=None, context_selector_kwargs=None, **kwargs)[source]¶
Bases:
CARLGymnasiumEnv
- static get_context_features()[source]¶
Get the context features
Defined per environment.
- Returns:
Context feature definitions
- Return type:
dict[str, ContextFeature]
- reset(*, seed=None, options=None)[source]¶
Reset the environment.
First, we progress the instance, i.e. select a new context with the context selector. Then we update the context in the wrapped environment. Finally, we reset the underlying environment and add context information to the observation.
- Parameters:
seed (int | None, optional) – Seed, by default None
options (dict[str, Any] | None, optional) – Options, by default None
- Returns:
Observation, info.
- Return type:
tuple[Any, dict[str, Any]]