Skip to content

PPOActorEnvironmentState ​

python
PPOActorEnvironmentState(state: np.ndarray | None = None, episode_reward: float = 0.0, episode_length: int = 0, action_counts: list[int] = list(), trajectory_session: ActiveTrajectorySession = ActiveTrajectorySession.normal(), previous_potential: float | None = None) -> None

State tracked per-environment in the PPO actor.

Source

Methods ​

reset ​

python
reset(observation: np.ndarray | None, trajectory_session: ActiveTrajectorySession | None = None) -> None

Reset the environment state for a new episode.

Parameters:

  • observation (ndarray | None) – The initial observation, if needed for the next step plan.
  • trajectory_session (ActiveTrajectorySession | None) – The trajectory source state for the new episode, or None for a normal episode.

Source

Values ​

action_counts ​

python
action_counts: list[int] = field(default_factory=list, repr=False)

Executed action counts for the current episode.

Source

episode_length ​

python
episode_length: int = 0

Number of steps in the current episode.

Source

episode_reward ​

python
episode_reward: float = 0.0

Cumulative reward for the current episode.

Source

previous_potential ​

python
previous_potential: float | None = None

Potential Phis of the previous step's cell, for potential-based reward shaping. None until the first step of an episode.

Source

state ​

python
state: np.ndarray | None = field(default=None, repr=False)

Current state observation.

Source

trajectory_session ​

python
trajectory_session: ActiveTrajectorySession = field(default_factory=ActiveTrajectorySession.normal, repr=False)

Trajectory source state for the current episode.

Source