Create a sparse frozen adaptive replay reservoir
Source:R/adaptive_replay_reservoir.R
make_adaptive_replay_reservoir.RdEach allowed unordered edge has exactly one observed presentation and binary outcome. Subset to the primary observation layer before construction; exclude held-out edges and separate reversal audits. The allowed graph must connect every panel item. Reservoir replay supports ordinary within-set runs only.
Arguments
- outcomes
Data frame with character
A_id, characterB_id, and binaryY(one means presented A wins).Yaccepts logical, numeric zero/one, or character"0"/"1"; factors, missing values, and other values are rejected.- item_ids
Unique non-blank character IDs for the active panel, with at least two items. IDs must match the adaptive state's item IDs.
Value
A pairwiseLLM_replay_reservoir object for replay_reservoir in
adaptive_rank_start() or adaptive_rank(), and for
make_adaptive_judge_replay().
Details
All strategies and warm-start modes share a seeded spanning-tree bootstrap of
N - 1 allowed edges. Subsequent selection uses unused allowed edges, and
commits their stored presentation without reversing or complementing outcomes.
Consumption follows committed history, so discarded/failed transactions do
not consume observations. Existing statistical stopping rules still apply.
State stores an outcome-free manifest and identity; retain the reservoir to recreate the judge on resume. Identity includes the panel, edge membership, presentation and Y, but excludes row order and ancillary metadata. Changed identities are rejected before replay. Do not edit a constructed reservoir. IDs that make distinct allowed edges collide in the existing colon-separated adaptive history keys are rejected; use unambiguous panel IDs in that case.
Examples
ids <- c("a", "b", "c", "d")
frozen <- data.frame(A_id = c("b", "a", "d", "c"),
B_id = c("a", "c", "a", "d"), Y = c(1L, 0L, 1L, 1L))
reservoir <- make_adaptive_replay_reservoir(frozen, ids)
state <- adaptive_rank_start(ids, seed = 42, replay_reservoir = reservoir,
adaptive_config = list(pairing_strategy = "random"))
state <- adaptive_rank_run_live(state, make_adaptive_judge_replay(reservoir),
n_steps = 4L, progress = "none")