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.