QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites Class Reference

Constrained MAP-Elites with a live editable design and replaceable axes. More...

Public Member Functions

 __init__ (self, axes, *, fitness_domain, sample, mutate, crossover=None, maximize=True, cell_capacity=4, initial_samples=8, anchor_probability=.2, seed=0)
 archive (self)
 Live archive of feasible solutions, with raw fitness.
 infeasible_archive (self)
 Live archive of infeasible solutions, with negative total violation as fitness.
 axes (self)
 Current descriptor geometry.
 anchor (self)
 Most recent successfully evaluated edited design.
 stats (self)
 Cumulative work across search, edits, and descriptor changes.
 submit (self, genome, evaluate)
 Measure an edited genome immediately and make it the current breeding anchor.
 reproject (self, axes)
 Reassign all currently retained designs to a new set of named axes.
 run (self, evaluate, budget)
 Run additional proposals using the current archive geometry and editor input.

Detailed Description

Constrained MAP-Elites with a live editable design and replaceable axes.

Keep separate subpopulations for good designs and near-feasible ones.

Positive constraint residuals indicate violations. Feasible individuals
compete on user-provided fitness, infeasible individuals on total positive
residual. Both grids retain the configured number of breeders per cell.
Use hashable genome sequences and emit measurements for prospective axes.

Definition at line 37 of file interactive_constrained.py.

Constructor & Destructor Documentation

◆ __init__()

qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.__init__ ( self,
axes,
* ,
fitness_domain,
sample,
mutate,
crossover = None,
maximize = True,
cell_capacity = 4,
initial_samples = 8,
anchor_probability = .2,
seed = 0 )
Parameters
axesNamed DescriptorAxis objects in display order.
fitness_domainInclusive bounds for feasible fitness.
sampleCallable (rng) returning a seed genome.
mutateCallable (genome, rng) returning a new genome.
crossoverOptional callable (left, right, rng) returning a parent for mutation.
maximizeWhether higher raw fitness is preferable.
cell_capacityMaximum number of breeders in each grid cell.
initial_samplesWarm-up attempts that use the initializer when the editor anchor is skipped.
anchor_probabilityProbability of breeding from the last accepted editor input.
seedSeed for proposals, evaluation seeds, and tournaments.

Definition at line 56 of file interactive_constrained.py.

Member Function Documentation

◆ reproject()

qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.reproject ( self,
axes )

Reassign all currently retained designs to a new set of named axes.

Reuse cached measurements. A failed rebuild leaves both live archives intact.

Definition at line 147 of file interactive_constrained.py.

◆ run()

qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.run ( self,
evaluate,
budget )

Run additional proposals using the current archive geometry and editor input.

Parameters
evaluateCallable (genome, seed) with the same contract as submit.
budgetAdditional evaluation attempts, including failed evaluations.

Definition at line 171 of file interactive_constrained.py.

◆ submit()

qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.submit ( self,
genome,
evaluate )

Measure an edited genome immediately and make it the current breeding anchor.

Parameters
genomeImmutable sequence representing the editor's design.
evaluateCallable (genome, seed) returning (fitness, named measurements, residuals) or None.

Definition at line 136 of file interactive_constrained.py.


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