QDpy
Loading...
Searching...
No Matches
qdpy.rl.ppo.PPO Class Reference

Train PPO in a categorical or bounded continuous action space. More...

Public Member Functions

 stats (self)
 train (self, max_env_steps)
 Spend an additional environment-step budget and return cumulative statistics.

Detailed Description

Train PPO in a categorical or bounded continuous action space.

Train an actor with fresh rollouts, GAE, and the clipped PPO objective.

:param env_factory: Callable returning a fresh Gymnasium environment.
:param policy: Actor architecture as a :class:`PolicyConfig`.
:param config: Sampling and optimizer settings as a :class:`PPOConfig`.
:param max_episode_steps: External safety horizon, treated as truncation.
:param seed: Seed for initialization, actions, minibatches, and resets.
:param device: CPU or CUDA device for the actor and value network.

Definition at line 166 of file ppo.py.

Member Function Documentation

◆ stats()

qdpy.rl.ppo.PPO.stats ( self)
Return a snapshot of cumulative running costs.

Definition at line 193 of file ppo.py.

◆ train()

qdpy.rl.ppo.PPO.train ( self,
max_env_steps )

Spend an additional environment-step budget and return cumulative statistics.

Continue the actor and optimizer in a fresh environment instance.

Definition at line 198 of file ppo.py.


The documentation for this class was generated from the following file: