QDpy
Loading...
Searching...
No Matches
qdpy.containers.pareto.LocalParetoArchive Class Reference

Store locally nondominated solutions in continuous descriptor space. More...

Inheritance diagram for qdpy.containers.pareto.LocalParetoArchive:
qdpy.containers.base.Container qdpy.containers.base.ContainerLike qdpy.base.Summarisable qdpy.base.Copyable qdpy.base.CreatableFromConfig

Protected Member Functions

 _check_if_can_be_added (self, individual)
 _add_internal (self, individual, raise_if_not_added_to_parents, only_to_parents)
 Check local dominance and commit the surviving measurement.
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)

Additional Inherited Members

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)
None discard (self, IndividualLike individual, bool also_from_parents=False)
int update (self, Iterable iterable, bool ignore_exceptions=True, bool issue_warning=False)
None clear (self, bool also_from_parents=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)
float qd_score (self, bool normalized=True)
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)

Detailed Description

Store locally nondominated solutions in continuous descriptor space.

Apply the fixed-radius MOUR-QD admission rule in descriptor units.

Each candidate competes with incumbents at Euclidean distance strictly
below the radius. A dominated candidate leaves the archive unchanged.
Otherwise it enters and removes every incumbent it dominates nearby.
Equal genomes keep their first retained evaluation. Distinct genomes
with equal objective values can coexist.

:param iterable: Initial candidates, admitted in the supplied order.
:param radius: Positive finite distance threshold.
:param descriptor_size: Number of finite descriptor coordinates.
:param fitness_weights: Two or more signed, finite nonzero weights.
:param fitness_domain: Optional intervals in raw objective units.
:param capacity: Optional limit on archive entries. At capacity,
    a new entry must replace at least one incumbent.
:param name: Display name used by loggers.

Definition at line 275 of file pareto.py.

Member Function Documentation

◆ _add_internal()

qdpy.containers.pareto.LocalParetoArchive._add_internal ( self,
individual,
raise_if_not_added_to_parents,
only_to_parents )
protected

Check local dominance and commit the surviving measurement.

Parameters
individualValidated candidate to compare with neighbors.
raise_if_not_added_to_parentsBase admission option.
only_to_parentsDecline parent-only offers.

Reimplemented from qdpy.containers.base.Container.

Definition at line 336 of file pareto.py.

◆ _check_if_can_be_added()

qdpy.containers.pareto.LocalParetoArchive._check_if_can_be_added ( self,
individual )
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 324 of file pareto.py.


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