QDpy
Loading...
Searching...
No Matches
qdpy.rl.pollination.PollinationMAPElites Class Reference

Illuminate morphology space and periodically distill a shared teacher neighborhood. More...

Public Member Functions

 stats (self)
 body_for (self, individual)
 Recover the immutable body coordinates from an archived genome.
 policy_for (self, individual, *, device=None)
 Decode an independent controller for a body.
 train (self, max_env_steps)
 Spend an additional budget on offspring and scheduled distillation.

Detailed Description

Illuminate morphology space and periodically distill a shared teacher neighborhood.

Optimize numeric bodies and deterministic continuous controllers.

The archive stores a flat body followed by the policy weights. A
candidate mutates its body or its controller. A distillation round
learns from an occupied cell and up to four occupied Moore neighbors
and offers the student on those same bodies using paired reset seeds.
The initial rollout, teacher collection, and student trials all spend
from the same simulator budget.

:param env_factory: Callable of a body tuple returning an environment.
    Every body must provide the same observation and Box action layout.
:param archive: Empty, parentless, maximizing best-only two-axis Grid.
:param initial_bodies: Iterable of fixed-width finite numeric tuples.
:param body_descriptor: Function of a body giving its two bin coordinates.
:param mutate_body: Callable of a body and a NumPy generator.
:param policy: Optional continuous PolicyConfig.
:param body_mutation_probability: Fraction of offspring with body variation.
:param controller_sigma: Gaussian scale for controller-only mutations.
:param batch_size: Completed offspring per generation.
:param pollination_every: Generations between rounds. None disables distillation.
:param quality_tolerance: Allowed absolute loss on the matched teacher run.
:param distillation_epochs: Supervised passes over collected teacher records.
:param distillation_learning_rate: Student Adam step size.
:param max_episode_steps: Maximum length of a rollout.
:param seed: Root seed for independent search and distillation streams.
:param device: CPU or CUDA for the policy.

Definition at line 49 of file pollination.py.

Member Function Documentation

◆ body_for()

qdpy.rl.pollination.PollinationMAPElites.body_for ( self,
individual )

Recover the immutable body coordinates from an archived genome.

Return the body tuple accepted by the environment factory.

Definition at line 129 of file pollination.py.

◆ policy_for()

qdpy.rl.pollination.PollinationMAPElites.policy_for ( self,
individual,
* ,
device = None )

Decode an independent controller for a body.

Return a continuous controller that can be saved and loaded separately.

Definition at line 136 of file pollination.py.

◆ stats()

qdpy.rl.pollination.PollinationMAPElites.stats ( self)
Return cumulative simulator and migration counters.

Definition at line 124 of file pollination.py.

◆ train()

qdpy.rl.pollination.PollinationMAPElites.train ( self,
max_env_steps )

Spend an additional budget on offspring and scheduled distillation.

Run the search. A budget-cut distillation round commits no replacements.

Definition at line 238 of file pollination.py.


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