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

Relevance-guided unsupervised discovery of abilities. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.ruda.RUDAEntry
 An evaluated behavior and its descriptor in the current encoder. More...
class  qdpy.algorithms.ruda.RUDAResult
 Final unstructured archive, live encoder and search accounting. More...

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.ruda.ruda_search (evaluate, solve_task, *, dimension, budget, capacity=128, descriptor_size=2, ind_domain=(0., 1.), novelty_threshold=.12, task_period=32, useful_capacity=64, neighbors=5, distance_floor=.02, guidance=True, fit_period=64, training_capacity=1024, encoder_factory=None, initial_samples=16, seed=0)
 Learn descriptors and update admissions from a bounded downstream-use buffer.

Detailed Description

Relevance-guided unsupervised discovery of abilities.

See also
https://doi.org/10.1145/3512290.3528837

Definition in file ruda.py.

Function Documentation

◆ ruda_search()

qdpy.algorithms.ruda.ruda_search ( evaluate,
solve_task,
* ,
dimension,
budget,
capacity = 128,
descriptor_size = 2,
ind_domain = (0., 1.),
novelty_threshold = .12,
task_period = 32,
useful_capacity = 64,
neighbors = 5,
distance_floor = .02,
guidance = True,
fit_period = 64,
training_capacity = 1024,
encoder_factory = None,
initial_samples = 16,
seed = 0 )

Learn descriptors and update admissions from a bounded downstream-use buffer.

Parameters
evaluateCallable (genome) returning (fitness, observation), or None for failure.
solve_taskCallable (archive_snapshot, rng) returning indices of useful entries.
dimensionReal genome width.
budgetNumber of attempted behavior evaluations.
capacityHard repertoire size.
descriptor_sizeLatent dimension.
ind_domainCommon finite bounds for genome coordinates.
novelty_thresholdMinimum directional separation for a new entry.
task_periodEvaluations between calls to the downstream solver.
useful_capacityNumber of previously used behaviors retained.
neighborsNearest useful observations included in relevance.
distance_floorPositive floor on the mean distance in relevance.
guidanceWhether downstream feedback changes archive admission.
fit_periodEvaluations between encoder fits, or None for fixed observations.
training_capacityMaximum number of raw observations for encoder fitting.
encoder_factoryOptional callable returning a fresh fit/transform encoder.
initial_samplesNumber of uniform draws before archive-based variation.
seedPrivate variation and task-solving seed.
Returns
RUDAResult with separate counts of search and downstream tasks.
Use directed distances from each candidate to the current archive.

Scale distance by the inverse mean distance to the closest useful
behaviors. The task solver returns indices from the provided immutable
snapshot. Retrain a fresh PCA encoder by default, then re-encode the
entire repertoire and useful buffer from raw observations. Supply an
encoder factory to use a different representation learner.

Before fitting, use the first descriptor_size observation coordinates.
An exact-size bound uses directed spacing to evict a crowded incumbent.
Fitness is maximized when a close proposal competes with a neighbor.

Definition at line 109 of file ruda.py.