|
| | pools (self) |
| | embedding_scale (self) |
| | cluster_centers (self) |
| | stats (self) |
| | observation (self, design, observation) |
| | Condition a policy input on a design embedding.
|
| | cluster (self, design) |
| | Assign an unseen design to the nearest learned cluster center.
|
| | train (self, max_env_steps) |
| | Spend an additional budget in complete round-robin design and PPO updates.
|
| | policy (self, cluster, *, seed=0, device=None) |
| | Return an independent serializable actor for a cluster.
|
| | evaluate (self, designs=None, *, episodes_per_design=8, seed=1337) |
| | Audit designs with fresh episodes and their assigned cluster policies.
|
Co-design over a finite catalog with local competition and shared PPO policies.
Train one controller and value model per cluster of design embeddings.
A round visits one cluster and takes one on-policy PPO update across
the current design pool. At configured intervals, evaluate uniformly
sampled non-pool designs and incumbents on the current actor using
common seeds. Replace the worst incumbents with the best sampled
designs before training. Each episode sees its design embedding as
part of the observation.
:param designs: Finite ordered catalog of distinct immutable design identifiers.
:param env_factory: Callable (design) returning a fresh single Gymnasium environment.
:param descriptor: Callable (design) returning a real vector for clustering and policy conditioning.
:param clusters: Number of k-means clusters.
:param pool_size: Maximum live designs per cluster.
:param search_period: Rounds per cluster between replacements, or None for static pools.
:param proposals: Maximum new designs measured in a search round.
:param replace_count: Maximum number of incumbents replaced in a search round.
:param evaluation_episodes: Common-seed episodes per design during competition.
:param max_episode_steps: Shared episode horizon.
:param ppo: PPOConfig for the shared actor and critic.
:param policy: PolicyConfig for hidden layers.
:param seed: Private seed for clustering, proposal draws, training, and evaluation.
:param device: PyTorch device.
Definition at line 100 of file loki.py.