commits
The previous implementation updated Glicko-2 ratings after each individual
match, violating the system's core assumption of rating periods with 10-15+
games. This caused path-dependency where identical algorithms submitted at
different times received different final ratings based on opponent rating
states during their matches.
Changes:
- Refactored RecalculateAllGlicko2Ratings() to use proper rating periods
- Batches all match results per player together
- Uses opponent ratings at the start of the rating period
- Updates each player's rating once with all results
- Modified RunRoundRobinMatches() to store matches first, then recalculate
ratings once at the end (proper rating period)
- Removed per-match UpdateGlicko2Ratings() calls
- Added manual recalculation command: ./battleship-arena recalculate-ratings
- Updated leaderboard sorting: rating DESC → wins DESC → avg_moves ASC
- Pending/broken entries use avg_moves=999 to sort to bottom
Live updates still work - SSE broadcasts match progress in real-time.
Glicko ratings update at round-robin completion using proper rating periods.
References:
- Glicko-2 paper: http://www.glicko.net/glicko/glicko2.pdf
- Instant Glicko-2 implementation notes:
https://gist.github.com/gpluscb/302d6b71a8d0fe9f4350d45bc828f802
💘 Generated with Crush
Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land>
The previous implementation updated Glicko-2 ratings after each individual
match, violating the system's core assumption of rating periods with 10-15+
games. This caused path-dependency where identical algorithms submitted at
different times received different final ratings based on opponent rating
states during their matches.
Changes:
- Refactored RecalculateAllGlicko2Ratings() to use proper rating periods
- Batches all match results per player together
- Uses opponent ratings at the start of the rating period
- Updates each player's rating once with all results
- Modified RunRoundRobinMatches() to store matches first, then recalculate
ratings once at the end (proper rating period)
- Removed per-match UpdateGlicko2Ratings() calls
- Added manual recalculation command: ./battleship-arena recalculate-ratings
- Updated leaderboard sorting: rating DESC → wins DESC → avg_moves ASC
- Pending/broken entries use avg_moves=999 to sort to bottom
Live updates still work - SSE broadcasts match progress in real-time.
Glicko ratings update at round-robin completion using proper rating periods.
References:
- Glicko-2 paper: http://www.glicko.net/glicko/glicko2.pdf
- Instant Glicko-2 implementation notes:
https://gist.github.com/gpluscb/302d6b71a8d0fe9f4350d45bc828f802
💘 Generated with Crush
Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land>