QDpy
Loading...
Searching...
No Matches
qdhf.py File Reference

Learn descriptor coordinates from behavior-similarity triplets. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.qdhf.TripletProjector
 Learn a linear map using a squared-Euclidean triplet margin. More...
class  qdpy.algorithms.qdhf.QDHFTrial
 An immutable behavior record shown to a feedback provider. More...
class  qdpy.algorithms.qdhf.TripletJudgment
 The requested triplet's attempt IDs and the provider's response. More...
class  qdpy.algorithms.qdhf.QDHFResult
 Final QDHF search state and independent evaluation and annotation counts. More...

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.qdhf.qdhf_search (evaluate, archive, *, feedback, budget, feedback_budget, dimension, raw_feature_size, ind_domain=(0., 1.), warmup=64, refit_every=112, feedback_batch=24, fit_steps=128, seed=0)
 Run MAP-Elites with offline or periodically trained triplet descriptors.

Detailed Description

Learn descriptor coordinates from behavior-similarity triplets.

Definition in file qdhf.py.

Function Documentation

◆ qdhf_search()

qdpy.algorithms.qdhf.qdhf_search ( evaluate,
archive,
* ,
feedback,
budget,
feedback_budget,
dimension,
raw_feature_size,
ind_domain = (0., 1.),
warmup = 64,
refit_every = 112,
feedback_batch = 24,
fit_steps = 128,
seed = 0 )

Run MAP-Elites with offline or periodically trained triplet descriptors.

Learn a descriptor on random trials and optionally on the evolving archive.

:param evaluate: Function of a genome tuple returning scalar fitness and a
    raw feature vector in fixed units.
:param archive: Empty, parentless, one-elite rectangular Grid used as
    a template. Learned coordinates use its existing descriptor bounds.
:param feedback: Function of three QDHFTrial records. Return 0 for the
    second record, 1 for the third, or None to abstain.
:param budget: Hard budget of attempted evaluator calls, including warm-up.
:param feedback_budget: Hard budget of feedback calls, including abstentions.
:param dimension: Number of bounded real genome coordinates.
:param raw_feature_size: Length of the evaluator's raw feature vector.
:param ind_domain: Shared lower and upper genome bounds.
:param warmup: Number of uniform candidate attempts before the first fit.
:param refit_every: Attempts between online feedback rounds. None requests
    the entire annotation budget at warm-up and freezes the projection.
:param feedback_batch: Maximum number of requests per online feedback round.
:param fit_steps: Adam update steps per fit.
:param seed: Root seed for independent variation and feedback streams.
:returns: Final archive, projector, attempted evaluations, failures, and labels.

Definition at line 193 of file qdhf.py.