|
QDpy
|
Keep a single balanced elite per grid cell using historical objective vectors. More...
Public Member Functions | |
| anchors (self, cell) | |
| Return an immutable snapshot of a cell's raw reference objectives. | |
| tournament_score (self, cell, objectives, *, challenger=None, weights=None) | |
| Compute a raw candidate's contextual score against the current cell anchors. | |
| clear (self, also_from_parents=False) | |
| Public Member Functions inherited from qdpy.containers.grids.Grid | |
| ShapeLike | shape (self) |
| int | max_items_per_bin (self) |
| int | filled_bins (self) |
| GridSolutionsLike | solutions (self) |
| GridItemsPerBinLike | nb_items_per_bin (self) |
| GridFitnessLike | fitness (self) |
| GridFeaturesLike | features (self) |
| GridQualityLike | quality (self) |
| np.ndarray | quality_array (self) |
| Optional[GridIndexLike] | best_index (self) |
| str | filled_str (self) |
| index_grid (self, param) | |
| None | discard (self, IndividualLike individual, bool also_from_parents=False) |
| float | qd_score (self, bool normalized=True) |
| Public Member Functions inherited from qdpy.containers.base.Container | |
| float | capacity (self) |
| float | free (self) |
| int | size (self) |
| Any | best (self) |
| Optional[FitnessLike] | best_fitness (self) |
| Optional[FeaturesLike] | best_features (self) |
| int | nb_discarded (self) |
| int | nb_added (self) |
| int | nb_rejected (self) |
| int | nb_operations (self) |
| Optional[Sequence[DomainLike]] | fitness_extrema (self) |
| Optional[Sequence[DomainLike]] | features_extrema (self) |
| Sequence[IndividualLike] | all_parents_inds (self) |
| str | size_str (self) |
| bool | in_bounds (self, Any val, Any domain) |
| FeaturesLike | get_ind_features (self, IndividualLike individual, *args, **kwargs) |
| FitnessLike | get_ind_fitness (self, IndividualLike individual, *args, **kwargs) |
| set_ind_fitness (self, IndividualLike individual, FitnessLike fitness, *args, **kwargs) | |
| Optional[int] | add (self, IndividualLike individual, bool raise_if_not_added_to_parents=False) |
| int | update (self, Iterable iterable, bool ignore_exceptions=True, bool issue_warning=False) |
| None | clear_all (self) |
| novelty (self, IndividualLike individual, **kwargs) | |
| novelty_local_competition (self, IndividualLike individual, **kwargs) | |
| Any | to_grid (self, Union[ShapeLike, int] shape, int max_items_per_bin=1, Optional[float] capacity=None, **Any kwargs) |
| Public Member Functions inherited from qdpy.base.Summarisable | |
| Mapping[str, Any] | __get_summary_state__ (self) |
| str | summary (self, Optional[int] max_depth=None, Optional[int] max_entry_length=250) |
| Public Member Functions inherited from qdpy.base.CreatableFromConfig | |
| Any | from_config (cls, Mapping[str, Any] config, **Any kwargs) |
Protected Member Functions | |
| _check_if_can_be_added (self, individual) | |
| _add_to_grid (self, individual, ig, raise_if_not_added_to_parents, replacement=None) | |
| Apply a successful storage update to per-cell bookkeeping. | |
| Protected Member Functions inherited from qdpy.containers.grids.Grid | |
| None | _init_grid (self) |
| GridIndexLike | _index_grid_features (self, FeaturesLike features) |
| Generator[GridIndexLike, None, None] | _index_grid_iterator (self) |
| None | _update_quality (self, GridIndexLike ig) |
| Optional[int] | _add_internal (self, IndividualLike individual, bool raise_if_not_added_to_parents, bool only_to_parents) |
| Choose a cell and apply its admission policy. | |
| GridIndexLike | _stored_cell (self, IndividualLike individual) |
| Find the admitted cell by object identity. | |
| Protected Member Functions inherited from qdpy.containers.base.Container | |
| Optional[Sequence[DomainLike]] | _float_feature_extrema (self) |
| Tuple[bool, int] | _add_to_collection (self, BackendLike[IndividualLike] collection, IndividualLike individual) |
| None | _add_to_parents (self, IndividualLike individual, bool require_admission) |
| Forward a candidate to each immediate parent in order. | |
| _can_undo_parent_appends (self, individual) | |
| _add_to_append_only_parents (self, individual) | |
| Take a short pre-admission record and rebuild a snapshot only after rejection. | |
| _snapshot_parents (self) | |
| None | _discard_by_index (self, IndividualLike individual, Optional[int] idx=None, bool also_from_parents=False) |
Keep a single balanced elite per grid cell using historical objective vectors.
T-DominO admission following Gaier et al. (PPSN 2022). Compare challenger and incumbent to the challenger and to present and historical elites in the cell and its neighborhood. For each objective count how many anchors the candidate matches or beats, then multiply the counts. The incumbent remains on a tie. Store the raw multiobjective measurements for reporting. :param iterable: Optional measured individuals to offer in order. :param shape: Number of cells along each descriptor axis. :param fitness_domain: Raw bounds for at least two objectives. :param features_domain: Bounds for each descriptor axis. :param anchor_capacity: Maximum displaced objective vectors retained per cell. :param neighbor_radius: Maximum coordinate difference in bins to include. :param kwargs: Other Grid configuration, including fitness_weights.
Definition at line 22 of file t_domino.py.
|
protected |
Apply a successful storage update to per-cell bookkeeping.
| individual | Candidate proposed for local insertion. |
| ig | Index of the candidate's destination cell. |
| raise_if_not_added_to_parents | Whether required parent errors propagate. |
| replacement | The incumbent's position within the cell, if any. |
Translate a cell-relative replacement to a storage index. Update the cell only when storage records a new insertion. This keeps occupancy, scores, and activity aligned on duplicate offers.
Reimplemented from qdpy.containers.grids.Grid.
Definition at line 119 of file t_domino.py.
|
protected |
Validate the resolved objective and descriptor vectors. Reject invalid fitness and vectors outside declared coordinate bounds. This step runs before storage or parent forwarding.
Reimplemented from qdpy.containers.base.Container.
Definition at line 63 of file t_domino.py.
| qdpy.containers.t_domino.TDominOGrid.anchors | ( | self, | |
| cell ) |
Return an immutable snapshot of a cell's raw reference objectives.
Return current and displaced objective vectors from the cell neighborhood.
Definition at line 71 of file t_domino.py.
| qdpy.containers.t_domino.TDominOGrid.clear | ( | self, | |
| also_from_parents = False ) |
Clear both retained solutions and historical reference vectors.
Reimplemented from qdpy.containers.base.Container.
Definition at line 129 of file t_domino.py.
| qdpy.containers.t_domino.TDominOGrid.tournament_score | ( | self, | |
| cell, | |||
| objectives, | |||
| * | , | ||
| challenger = None, | |||
| weights = None ) |
Compute a raw candidate's contextual score against the current cell anchors.
Return the integer product of win counts, optionally including a challenger anchor.
Definition at line 86 of file t_domino.py.