Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Move ratings from Elo to Glicko-2

Aperta
#18 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js

Direzione di ricerca

Start with backend/elo.js to map the current rating cases and calculatePartialCreditRatings, then inspect backend/db.js and battles_history for migration and backtest inputs. Read the linked Glicko-2 paper and build the worked-example unit test first. Done means the migration is idempotent, the feature flag keeps Elo as default, the specified tests and boundary check pass, and the pull request reports the requested backtest and rating-change distribution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

Ratings use Elo with stepped K-factors (backend/elo.js). Elo has no notion of how sure it is about a rating. A player returning after six months and a player with 500 games in the last week move by the same amount, and new players take many games to land where they belong.

Glicko-2 tracks rating, rating deviation and volatility. It fixes all of that, and it lets matchmaking prefer opponents whose ratings are confident.

What to do

  • Implement Glicko-2 in a new backend/glicko2.js with a pure API, following the paper exactly. Include the paper's worked example as a unit test that must match to 4 decimal places.
  • Support the cases elo.js handles today: win, loss, tie and partial credit (calculatePartialCreditRatings). For partial credit, map the test-pass ratio to an actual score in [0, 1] and document the choice.
  • Inactivity: rating deviation grows over time without games, per the paper's rating-period step.
  • Migrate existing players: seed rating from current Elo, rating deviation from games played and last-played date. Write it as a migration in backend/db.js that is safe to run twice.
  • Keep getRankTier and getRankDivision on the displayed rating so tiers do not change meaning.
  • Show "provisional" next to ratings whose deviation is high.

Evidence required in the pull request

  • Backtest on real history: replay battles_history in order under both systems and report how well each predicts the next result (log loss or Brier score). Glicko-2 must do at least as well as Elo, or the pull request should explain why it is still worth it.
  • Distribution of rating changes before and after for a typical week.

Definition of done

  • Behind a flag (CODEARENA_RATING=glicko2) until the backtest is reviewed. Elo stays the default.
  • npm test and node scripts/check-boundary.js pass.
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.