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) -> NoneState tracked per-environment in the PPO actor.
Methods
reset
python
reset(observation: np.ndarray | None, trajectory_session: ActiveTrajectorySession | None = None) -> NoneReset 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, orNonefor a normal episode.
Values
action_counts
python
action_counts: list[int] = field(default_factory=list, repr=False)Executed action counts for the current episode.
episode_length
python
episode_length: int = 0Number of steps in the current episode.
episode_reward
python
episode_reward: float = 0.0Cumulative reward for the current episode.
previous_potential
python
previous_potential: float | None = NonePotential Phis of the previous step's cell, for potential-based reward shaping. None until the first step of an episode.
state
python
state: np.ndarray | None = field(default=None, repr=False)Current state observation.
trajectory_session
python
trajectory_session: ActiveTrajectorySession = field(default_factory=ActiveTrajectorySession.normal, repr=False)Trajectory source state for the current episode.