QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.elite_replay.EliteReplay Class Reference

Illuminate a fixed set of verified strategies for each problem. More...

Public Member Functions

 stats (self)
 dataset (self)
 Freeze the current elites for use during post-training.
 offer (self, problem, solution, verify)
 Verify and place a candidate at its achieved descriptor.
 run (self, propose, verify, *, budget, guided=True)
 Allocate proposals to problems and sparsely explored targets.

Detailed Description

Illuminate a fixed set of verified strategies for each problem.

Build EliteReplay's pre-training solution data with generic callbacks.

:param targets: Mapping from problem IDs to ordered distinct strategy
    descriptors. Each descriptor is a string or tuple of string labels.
:param length: Callback (solution) returning its positive token count
    or another integer cost. The default counts characters.
:param seed: Seed for proposal randomness and cross-cell parent selection.

Definition at line 120 of file elite_replay.py.

Member Function Documentation

◆ dataset()

qdpy.algorithms.elite_replay.EliteReplay.dataset ( self)

Freeze the current elites for use during post-training.

Return an independent replay snapshot in declared problem order.

Definition at line 151 of file elite_replay.py.

◆ offer()

qdpy.algorithms.elite_replay.EliteReplay.offer ( self,
problem,
solution,
verify )

Verify and place a candidate at its achieved descriptor.

Return whether the verified solution filled a cell or shortened its elite.

verify(problem, solution) independently checks correctness and
returns a declared achieved descriptor or None on failure.

Definition at line 156 of file elite_replay.py.

◆ run()

qdpy.algorithms.elite_replay.EliteReplay.run ( self,
propose,
verify,
* ,
budget,
guided = True )

Allocate proposals to problems and sparsely explored targets.

Return a replay snapshot after budget additional proposal attempts.

propose(problem, target, parent, rng) returns solution text or
None. When guided, request an uncovered target first, with ties
favoring the least attempted target, and pass a verified parent
from another cell if available. In the independent control both
target and parent are None. Each attempt counts against budget.

Definition at line 182 of file elite_replay.py.

◆ stats()

qdpy.algorithms.elite_replay.EliteReplay.stats ( self)
Return cumulative proposal, verifier call, success, and admission counts.

Definition at line 146 of file elite_replay.py.


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