QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.medoid_map_elites.MedoidArchive Class Reference

Assign descriptors to the nearest fixed medoid and keep the best candidate there. More...

Public Member Functions

 fit (cls, descriptors, count, distance, *, maximize=True, max_swaps=20)
 Fit the archive's fixed medoids on reference descriptors.
 medoids (self)
 cells (self)
 index (self, descriptor)
 Resolve the nearest medoid, with ties going to the first anchor.
 add (self, genome, fitness, descriptor)
 Try to admit a measured candidate at its descriptor's niche.

Detailed Description

Assign descriptors to the nearest fixed medoid and keep the best candidate there.

A best-only archive over arbitrary immutable descriptor objects.

:param medoids: Distinct ordered representatives in the descriptor space.
:param distance: Callable symmetric dissimilarity. It must be finite and
    nonnegative, with zero for identical objects.
:param maximize: Whether higher fitness is preferred.

Definition at line 70 of file medoid_map_elites.py.

Member Function Documentation

◆ add()

qdpy.algorithms.medoid_map_elites.MedoidArchive.add ( self,
genome,
fitness,
descriptor )

Try to admit a measured candidate at its descriptor's niche.

Return whether the candidate filled its niche or strictly improved its elite.

Definition at line 145 of file medoid_map_elites.py.

◆ cells()

qdpy.algorithms.medoid_map_elites.MedoidArchive.cells ( self)
Return a snapshot of occupied niche indices and their measured elites.

Definition at line 128 of file medoid_map_elites.py.

◆ fit()

qdpy.algorithms.medoid_map_elites.MedoidArchive.fit ( cls,
descriptors,
count,
distance,
* ,
maximize = True,
max_swaps = 20 )

Fit the archive's fixed medoids on reference descriptors.

Use deterministic PAM build and swap passes on the reference panel.

Fitting uses a dense pairwise matrix. Equivalent descriptors at
distance zero share the first representative.

Definition at line 94 of file medoid_map_elites.py.

◆ index()

qdpy.algorithms.medoid_map_elites.MedoidArchive.index ( self,
descriptor )

Resolve the nearest medoid, with ties going to the first anchor.

Return the integer niche index of a descriptor.

Definition at line 139 of file medoid_map_elites.py.

◆ medoids()

qdpy.algorithms.medoid_map_elites.MedoidArchive.medoids ( self)
Return the fixed niche anchors in tie-breaking order.

Definition at line 123 of file medoid_map_elites.py.


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