Skip to main content

policy_restore_best

Function policy_restore_best 

Source
pub fn policy_restore_best(
    params: &StabilityParameters,
    max_attempts: usize,
) -> Policy
Expand description

Build an [srbn::Policy] with the kernel’s restore-best rule (PSP-9).

OnNoDescent::Reject keeps a non-descending attempt in the trace but issues the next correction from the best accepted attempt, measuring descent against the best accepted score. This is the executable conformance oracle for the SRBN gate’s restore-best semantics; the live tool loop preserves the same semantics through crate::gate::AcceptedTrajectory, which additionally tracks Paper II’s separate rejection budget that the kernel’s total-attempt policy cannot represent.