From 663cb2b276dbe8e99013504428ffa1f655e4bc09 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 9 Oct 2026 23:10:07 +0200 Subject: [PATCH] rugnux near ties: no frame-count tie between two lattices that both miss the floor Two candidates that both index fewer than a sixth of the validation frames (the bar the run keeps a lattice on) are not two hypotheses about the crystal; on the first 34 battery sets most scheme "ties" were 0/60 against 0/60. Log only, as before. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- rugnux/RugnuxFirstPass.cpp | 4 ++++ rugnux/RugnuxFirstPass.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rugnux/RugnuxFirstPass.cpp b/rugnux/RugnuxFirstPass.cpp index 580861825..bc6e1cd84 100644 --- a/rugnux/RugnuxFirstPass.cpp +++ b/rugnux/RugnuxFirstPass.cpp @@ -1472,6 +1472,10 @@ void Rugnux::FirstPassRun::NearTie(const std::string &decision, const std::strin void Rugnux::FirstPassRun::NearTieFrames(const std::string &decision, const std::string &a, int ka, const std::string &b, int kb) const { + // Two lattices that both index fewer frames than the bar the run keeps a lattice on (a sixth of + // the validation frames, see FirstPassRotationIndexing) are not two hypotheses about the crystal. + if (std::max(ka, kb) < static_cast(validation.size()) / 6) + return; const double n = static_cast(validation.size()); const auto var = [n](int k) { const double p = (std::max(k, 0) + 0.5) / (n + 1.0); diff --git a/rugnux/RugnuxFirstPass.h b/rugnux/RugnuxFirstPass.h index 87bd1b85b..12710dbf3 100644 --- a/rugnux/RugnuxFirstPass.h +++ b/rugnux/RugnuxFirstPass.h @@ -150,7 +150,7 @@ struct Rugnux::FirstPassRun { std::string PassTag() const; void NearTie(const std::string &decision, const std::string &a, const std::string &b, double margin, double noise, const char *model) const; - // Two frame counts, a against b. + // Two frame counts, a against b; nothing where neither reaches the run's floor of a sixth. void NearTieFrames(const std::string &decision, const std::string &a, int ka, const std::string &b, int kb) const; // A frame count against the gate it is compared with.