|
| | stats (self) |
| | initialization_cost (self) |
| | round_cost (self) |
| | elites (self) |
| | train (self, max_env_steps) |
| | Spend an additional hard environment-step budget in complete rounds.
|
| | policies (self, *, seed=0, device=None) |
| | Reconstruct independent serializable actors from retained archive entries.
|
| | evaluate (self, *, episodes_per_policy=8, seed=1337) |
| | Audit retained policies using a shared panel of fresh seeds.
|
Train PPO learners for reward, then diversify copies of archived policies.
Run a synchronous continuous-action variant of Jiang et al.'s PDO.
Each reward phase updates live PPO learners and evaluates them in
the environment. Periodically replace the worst live learner with
a copy of a randomly chosen archive entry. The diversity phase
trains copies of the best archive entries using shared observations
from the reward phase and no additional environment interactions.
It evaluates those copies before offering them to the archive.
Pass a native best-only Grid or CVTGrid for descriptor-local
competition. Omit it for a bounded reward-priority archive. The
determinant uses diagonal Gaussian distances before tanh squashing.
:param env_factory: Callable returning a fresh single Gymnasium environment.
:param archive: Optional initially empty Grid or CVTGrid maximizing return.
:param descriptor: Optional callable (Episode) returning a fixed-length descriptor.
Required with a grid.
:param archive_size: Capacity of the reward-priority archive.
:param population_size: Number of live PPO learners.
:param evaluation_episodes: Episodes per archive measurement.
:param reward_updates: Number of PPO rollout updates per learner and round.
:param diversity_updates: Auxiliary optimization steps per round, zero for a PBT control.
:param diversity_batch_size: Maximum saved observations per auxiliary step.
:param diversity_learning_rate: Learning rate for the auxiliary Adam optimizer.
:param bandwidth: Gaussian similarity kernel length in latent action units.
:param smoothing: Weight on the similarity matrix in the regularized determinant.
:param exploit_period: Completed reward rounds between PBT replacements.
:param ppo: Optional PPOConfig.
:param policy: Optional PolicyConfig.
:param max_episode_steps: Evaluation horizon and maximum environment steps per episode.
:param seed: Private seed for all training operations.
:param device: PyTorch device.
Definition at line 75 of file pdo.py.