QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.cardinality.CardinalityMAPElites Class Reference

Use independent bit flips and keep the best solution for each subset size. More...

Public Member Functions

 best_at_most (self, max_items)
 Return the highest-quality measured elite within a cardinality limit.
 run (self, evaluate, budget, *, proposal_limit=None)
 Spend an objective budget and a separate proposal cap.

Static Public Member Functions

 subset (individual)
 Return selected item indices from one archived bit vector.

Detailed Description

Use independent bit flips and keep the best solution for each subset size.

Search bit vectors indexed by the number of selected coordinates.

The first measurement is the empty subset. Subsequent proposals flip
each bit independently with probability 1 / dimension by default.
The evaluator receives a tuple containing the indices of selected
items. Inspect the bit-vector elites through archive or use
best_at_most() to choose an option for one cardinality budget.

:param dimension: Number of items available for selection.
:param max_items: Largest allowed cardinality. Defaults to dimension.
:param mutation_probability: Optional independent per-bit flip probability.
:param fitness_domain: Closed interval of admissible raw objective values.
:param fitness_weight: Nonzero finite sign and magnitude of the objective.
:param seed: Private proposal seed.

Definition at line 49 of file cardinality.py.

Member Function Documentation

◆ best_at_most()

qdpy.algorithms.cardinality.CardinalityMAPElites.best_at_most ( self,
max_items )

Return the highest-quality measured elite within a cardinality limit.

Return an archived Individual, or None when no measured option fits.

Definition at line 81 of file cardinality.py.

◆ run()

qdpy.algorithms.cardinality.CardinalityMAPElites.run ( self,
evaluate,
budget,
* ,
proposal_limit = None )

Spend an objective budget and a separate proposal cap.

Parameters
evaluateCallable mapping an ordered tuple of selected indices to raw scalar fitness.
budgetMaximum objective evaluations, including repeated admissible subsets.
proposal_limitMaximum mutation attempts. Defaults to ten times budget.
Returns
CardinalitySearchStats with the costs and accepted updates.
Continue search and keep exact-cardinality elites in native grid cells.

Definition at line 94 of file cardinality.py.

◆ subset()

qdpy.algorithms.cardinality.CardinalityMAPElites.subset ( individual)
static

Return selected item indices from one archived bit vector.

Translate the binary genome to its sorted tuple of indices.

Definition at line 76 of file cardinality.py.


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