Repository navigation
Elemental Showdown: the scoring function (#161) - #172
Merged
Merged
Conversation
jacobcheatley
added this pull request to stack #182
September 22, 2026 00:37
jacobcheatley
marked this pull request as ready for review
September 22, 2026 00:38
One pure function turns a Matchup's count, sum(value) and sum(value²) into the numbers the reveal, the Stats, the Stories and Matchup selection all read: its Effectiveness from the lower-id Element's side, its Confidence, the shrunk mean Vote, the polarisation and the selection weight. The Dirichlet-multinomial posterior behind them, the prior, the cuts and the verdict gate live here by name and nowhere else. A Matchup nobody has voted on needs no special case: the prior alone scores it as faint Neutral. Mirroring turns the lower-id Element's call into the higher-id one's, and the headline reads the Voter's own Vote against the crowd's step once the Matchup has enough Votes to have one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVEtgjCoEbaNHrYfzyCRNH
jacobcheatley
force-pushed
the
feat/161-scoring-function
branch
from
September 22, 2026 01:08
53d77f8 to
db1f9e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #161. Part of #158.
scoreMatchupturns a Matchup's three sums (count,sum(value),sum(value²)) into a typed score: Effectiveness, Confidence, the shrunk meanm, polarisationPand the selection weight, with the prior and every cut as a named constant.mirrorEffectivenessreads a call from the higher-id Element's side, andheadlineForgives the reveal's headline kind for a Voter's Vote. Pure and browser-safe; zero Votes score as faint Neutral from the prior alone.Verification
Pure tests on both sides of every cut (
|m|at 0.5 and 1.5,Pat 0.6,hat 0.25 and 0.5) using crowds built from real Votes so the sums cannot disagree, plus the headline at 1, 4 and 5 Votes and at distances 0, 1 and 2.bun run checkandbun run testgreen.🤖 Generated with Claude Code
https://claude.ai/code/session_01AVEtgjCoEbaNHrYfzyCRNH