Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Move ratings from Elo to Glicko-2

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sennaicodes/codearena

All issues in sennaicodes/codearena

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.