|
QDpy
|
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. | |
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.
| 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 ) |
| axes | Named DescriptorAxis objects in display order. |
| fitness_domain | Inclusive bounds for feasible fitness. |
| sample | Callable (rng) returning a seed genome. |
| mutate | Callable (genome, rng) returning a new genome. |
| crossover | Optional callable (left, right, rng) returning a parent for mutation. |
| maximize | Whether higher raw fitness is preferable. |
| cell_capacity | Maximum number of breeders in each grid cell. |
| initial_samples | Warm-up attempts that use the initializer when the editor anchor is skipped. |
| anchor_probability | Probability of breeding from the last accepted editor input. |
| seed | Seed for proposals, evaluation seeds, and tournaments. |
Definition at line 56 of file interactive_constrained.py.
| 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.
| qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.run | ( | self, | |
| evaluate, | |||
| budget ) |
Run additional proposals using the current archive geometry and editor input.
| evaluate | Callable (genome, seed) with the same contract as submit. |
| budget | Additional evaluation attempts, including failed evaluations. |
Definition at line 171 of file interactive_constrained.py.
| qdpy.algorithms.interactive_constrained.InteractiveConstrainedMAPElites.submit | ( | self, | |
| genome, | |||
| evaluate ) |
Measure an edited genome immediately and make it the current breeding anchor.
| genome | Immutable sequence representing the editor's design. |
| evaluate | Callable (genome, seed) returning (fitness, named measurements, residuals) or None. |
Definition at line 136 of file interactive_constrained.py.