+12
AGENTS.md
···+**Important**: The system uses Glicko-2 ratings with **proper rating periods** to avoid last-submitter bias:+- This eliminates path-dependency where identical algorithms get different ratings based on submission order+- Each player's rating considers ALL their opponents' ratings at the start of the rating period+**Manual recalculation**: Run `./battleship-arena recalculate-ratings` or `make recalculate-ratings` to recompute all ratings from scratch.
+16
-10
Makefile
···
battleship-arena
This is a binary file and will not be displayed.
+13
cmd/battleship-arena/main.go
···
+9
-8
internal/runner/runner.go
···-matchID, err := storage.AddMatch(newSub.ID, opponent.ID, winnerID, player1Wins, player2Wins, avgMoves, avgMoves)+_, err := storage.AddMatch(newSub.ID, opponent.ID, winnerID, player1Wins, player2Wins, avgMoves, avgMoves)-if err := storage.UpdateGlicko2Ratings(newSub.ID, opponent.ID, player1Wins, player2Wins); err != nil {
+105
-3
internal/storage/database.go
············+rows, err := DB.Query("SELECT id FROM submissions WHERE is_active = 1 AND status = 'completed'")+"UPDATE submissions SET glicko_rating = ?, glicko_rd = ?, glicko_volatility = ? WHERE id = ?",