From 38ae4c6303433bd3139c4748ba6957f5d01eae60 Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 24 Apr 2026 17:29:36 -0400 Subject: [PATCH] fix(worker): use winner identity for Glicko-2 pairwise scoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raw game scores (capture points) are tied in most matches since the winner is determined by an energy/bots-alive tiebreaker. This caused Glicko-2 delta=0, leaving rating_mu frozen at 1500 for all bots. Now winner gets 1.0, non-winners 0.0, draws 0.5 — correct pairwise win/loss signal for Glicko-2 convergence. Co-Authored-By: Claude Sonnet 4.6 --- cmd/acb-worker/main.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/acb-worker/main.go b/cmd/acb-worker/main.go index eab2be2..d1aed50 100644 --- a/cmd/acb-worker/main.go +++ b/cmd/acb-worker/main.go @@ -452,8 +452,16 @@ func (w *Worker) computeRatingUpdates(claimData *JobClaimData, result *MatchResu Phi: p.RatingPhiBefore, Sigma: p.RatingSigmaBefore, } - // Normalize scores for Glicko-2 (higher is better) - scores[i] = float64(result.Scores[p.BotID]) + // Use winner identity for pairwise Glicko-2 scoring. + // Raw game scores (captures) are often tied, so we use the declared + // winner as the discriminator: winner=1.0, others=0.0, draw=0.5. + if result.WinnerID == "" { + scores[i] = 0.5 + } else if result.WinnerID == p.BotID { + scores[i] = 1.0 + } else { + scores[i] = 0.0 + } } // Compute rating updates