Priority
Rank eligible checkpoints using collected evidence. Implement Priority.__call__(node) or use FIFO, expected critic-error reduction, or token entropy. Search schedules continuations and owns phase budgets and branching caps.
Priority
Section titled “Priority”Rank candidate checkpoints; the search continues the highest one. Implement __call__ and return a score, or None when the checkpoint should not be continued.
This priority continues the shallowest checkpoints first. Ties go to the earlier node. Set requires_critic = True when the score reads node.prior, so a collector without a critic rejects the search.
Definition
Fields
Priority.call
Section titled “Priority.call”Required implementation.
Score one candidate checkpoint. Higher scores are continued first; None, NaN, or negative infinity mark the checkpoint ineligible for now.
ErrorReduction
Section titled “ErrorReduction”Continue where one more outcome is expected to reduce critic error most. The gain combines the critic’s estimated squared error at the checkpoint with the variance of its outcomes, and shrinks as observations accumulate.
For a checkpoint with observations, including pending ones, the gain is , where is RewardConfig.value_prior_strength, the estimated squared critic error, and the outcome variance. Checkpoints with no positive gain are not continued. calibration estimates and ; the default BetaBernoulli expects returns in [0, 1], and Gaussian handles real-valued returns. Requires a critic.
Definition
ErrorReduction.init
Section titled “ErrorReduction.init”ErrorReduction.call
Section titled “ErrorReduction.call”Continue checkpoints in the order they became eligible: first in, first out. Use it to collect initial evidence before selective allocation.
The priority decides the order; the phase supplies the budget and branching caps.
Definition
Fifo.call
Section titled “Fifo.call”TokenEntropy
Section titled “TokenEntropy”Rank checkpoints by uncertainty in their children’s generated tokens. Higher token-entropy scores receive priority.
Each child edge is scored by its highest sliding-window mean of over generated tokens, and a checkpoint by the mean over its children. A checkpoint without scored children ranks first. tags chooses which turns count. The backend must return per-token log probabilities.
Definition
TokenEntropy.init
Section titled “TokenEntropy.init”TokenEntropy.call
Section titled “TokenEntropy.call”NodeInfo
Section titled “NodeInfo”What a priority may read about one candidate checkpoint: its depth, critic prior, observed outcomes, running continuations, and children.
Definition
Fields
NodeInfo.id
Section titled “NodeInfo.id”The node’s identifier in the tree.
NodeInfo.depth
Section titled “NodeInfo.depth”Edges from the root.
NodeInfo.prior
Section titled “NodeInfo.prior”The critic’s prediction at this checkpoint, or None when it was not scored.
NodeInfo.outcomes
Section titled “NodeInfo.outcomes”Running statistics of the returns observed from this checkpoint.
NodeInfo.pending
Section titled “NodeInfo.pending”Continuations from this checkpoint still running.
NodeInfo.children
Section titled “NodeInfo.children”The checkpoint’s child nodes.