Train one shared policy encoder and archive lightweight decision heads.
Run RefQD with continuous Box actions and replay-based variation.
Reuse a caller's empty Grid or CVTGrid as reporting geometry. The
training archive stores ranked heads according to their last measured
returns. Periodic refreshes replace selected measurements using the
current shared encoder. Use audit() to measure current performance.
:param env_factory: Callable returning a fresh single environment.
:param archive: Empty, parentless, best-only reporting geometry.
:param descriptor: Function of a completed episode returning descriptor coordinates.
:param policy: ContinuousPolicy configuration with at least one hidden layer.
:param td3: Optional TD3Config.
:param depth: Maximum decision heads in each cell.
:param refresh_top: Number of highest-ranked heads to reevaluate per occupied cell.
:param refresh_every: Number of generations between re-evaluations.
:param batch_size: Offspring per generation.
:param critic_steps: TD3 updates per eligible generation.
:param pg_steps: Updates for each gradient offspring.
:param pg_learning_rate: Adam step size for gradient offspring.
:param encoder_decay: Per-generation multiplier for the encoder learning rate.
:param max_episode_steps: Hard horizon for one evaluation.
:param seed: Local root random seed.
:param device: CPU or CUDA for policy and learner networks.
Definition at line 103 of file refqd.py.