QDpy
Loading...
Searching...
No Matches
qed.py File Reference

Illuminate an archive of controllers by their sampled training environments. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.qed._EnvironmentTrial
class  qdpy.algorithms.qed.QEDResult
 Report the environment repertoire and exact evaluation counts. More...

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.qed.quality_environment_diversity (archive, evaluate, *, sample_environment, describe_environment, sample, mutate, budget, initial_samples=16, seed=0)
 Run MAP-Elites using training environment coordinates as descriptors.

Detailed Description

Illuminate an archive of controllers by their sampled training environments.

See also
https://arxiv.org/abs/2003.02341

Definition in file qed.py.

Function Documentation

◆ quality_environment_diversity()

qdpy.algorithms.qed.quality_environment_diversity ( archive,
evaluate,
* ,
sample_environment,
describe_environment,
sample,
mutate,
budget,
initial_samples = 16,
seed = 0 )

Run MAP-Elites using training environment coordinates as descriptors.

Returns
QEDResult with the supplied archive and the number of complete trials.
Generate one training environment per candidate and retain its best trials.

The report grid uses environmental features such as friction or sensor
noise. Separate random streams for environments, variation, and rollout
seeds make the sequence of training conditions independent of parent
selection. Export the native archive or pass it to MBOA for measured
adaptation to new conditions.

:param archive: Empty parentless best-only Grid or CVTGrid with one objective.
    Set fitness_weights explicitly to choose the objective direction.
:param evaluate: Callable (genome, environment, rollout_seed) returning
    one finite scalar fitness or None for a failed trial.
:param sample_environment: Callable (rng) drawing one environment specification.
:param describe_environment: Callable (environment) returning its finite grid coordinates.
:param sample: Callable (rng) returning an initial controller genome iterable.
:param mutate: Callable (genome, rng) returning the next controller genome.
    Treat genome elements as immutable.
:param budget: Total evaluator calls, including the initial phase.
:param initial_samples: Number of attempts before drawing parents from the archive.
:param seed: Seed for independent environment, controller, and rollout streams.

Definition at line 43 of file qed.py.