narla.environments
ActionSpace
- class narla.environments.ActionSpace(number_of_actions)[source]
Bases:
object
ActionSpace for the Environment
- Parameters
number_of_actions (
int
) – Number of available actions in the environment
- property number_of_actions: int
Get the number of actions
- Return type
int
- property shape: Tuple[int, ...]
Shape of the ActionSpace
- Return type
Tuple
[int
, …]
AvailableEnvironments
Environment
- class narla.environments.Environment(name, render=False)[source]
Bases:
object
Environment base class
- Parameters
name (
AvailableEnvironments
) – Name of the environmentrender (
bool
) – IfTrue
will visualize the environment
- property action_space: narla.environments.action_space.ActionSpace
Get the Environment’s ActionSpace
- Return type
- property episode_reward: float
Get the total reward from the current episode
- Return type
float
- abstract has_been_solved(episode_rewards)[source]
Checks if the Environment has been solved based on historical rewards
- Parameters
episode_rewards (
List
[float
]) – List of past of rewards- Return type
bool
- property observation_size: int
Access the size of the observation that the Environment produces
- Return type
int
GymEnvironment
- class narla.environments.GymEnvironment(name, render=False)[source]
Bases:
narla.environments.environment.Environment
Wrapper on Gymnasium Environments
- Parameters
name (
AvailableEnvironments
) – Name of the environmentrender (
bool
) – IfTrue
will visualize the environment
- has_been_solved(episode_rewards)[source]
Checks if the Environment has been solved based on historical rewards
- Parameters
episode_rewards (
list
) – List of past of rewards- Return type
bool
- property observation_size: int
Access the size of the observation that the Environment produces
- Return type
int