|
QDpy
|
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. | |
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.
| 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.
| qdpy.algorithms.cardinality.CardinalityMAPElites.run | ( | self, | |
| evaluate, | |||
| budget, | |||
| * | , | ||
| proposal_limit = None ) |
Spend an objective budget and a separate proposal cap.
| evaluate | Callable mapping an ordered tuple of selected indices to raw scalar fitness. |
| budget | Maximum objective evaluations, including repeated admissible subsets. |
| proposal_limit | Maximum mutation attempts. Defaults to ten times budget. |
Continue search and keep exact-cardinality elites in native grid cells.
Definition at line 94 of file cardinality.py.
|
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.