protomotions.agents.amp.agent module#

Adversarial Motion Priors (AMP) PPO agent.

The AMP-specific training behavior lives in protomotions.agents.amp.component.AMPTrainingComponent so other PPO-style agents can reuse the same discriminator reward machinery.

class protomotions.agents.amp.agent.AMP(fabric, env, config, root_dir=None)[source]#

Bases: AMPAgentMixin, PPO

PPO policy update with reusable AMP discriminator training.

config: AMPAgentConfig#
__init__(fabric, env, config, root_dir=None)[source]#

Initialize the base agent.

Sets up distributed training infrastructure, initializes tracking metrics, and creates the evaluator. Subclasses should call super().__init__() first.

Parameters:
  • fabric (MockFabric) – Lightning Fabric for distributed training and device management.

  • env (BaseEnv) – Environment instance for agent-environment interaction.

  • config – Configuration containing hyperparameters and training settings.

  • root_dir (Path | None) – Optional directory for saving outputs (uses logger dir if None).