Skip to content

Commit

Permalink
udpate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Nov 8, 2024
1 parent 43cc3c6 commit c7638b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ original Glicko-2 rating system. The following changes have been made:
- Optimized default parameters based on Lichess data. Optimal parameters
depend on the application, so this will not be ideal for all use cases.
- All rating components are clamped to specific ranges, so that even
pathological scenarios cannot cause degenerate results.
pathological scenarios cannot cause ratings to degenerate.
- Glicko-2 updates ratings in bulk in discrete *rating periods*. Lichess
instead updates pairs of ratings, so that ratings can be immediately
updated after each game.
- Lichess keeps the time decay of rating deviations, but generalizes it
to work with fractional rating periods.
to work with fractional rating periods. This implementation further
changes this approach to do a fractional update of both players, followed
by a traditional Glicko-2 update.
- Allows considering an inherent advantage for the first player in a game.

Documentation
Expand Down
25 changes: 20 additions & 5 deletions research/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ I don't know how to avoid it.
* Its not clear that sampling players does not introduce bias (for example,
how often players around a specific rating meet).

Encounters
----------
Prepare or download encounters
------------------------------

Condense PGNs from https://database.lichess.org to CSV files with relevant
data.
Expand All @@ -33,10 +33,25 @@ wget https://database.lichess.org/standard-encounters-until-2024-09.csv.zst # 73
pzstd -d standard-encounters-until-2024-09.csv.zst # 287G
```

Replay
------
Replay with `glicko2`
---------------------

Replay previously prepared encounters.
Replay previously prepared encounters with the third-party `glicko2` crate,
which implements the original Glicko-2.

```sh
cat encounters.csv | cargo run --release --bin replay_vanilla_glicko2
```

Note that the implementation is deliberately unoptimized to avoid
possible bugs.

Replay with `liglicko2`
-----------------------

Replay previously prepared encounters with the `liglicko2` implementation.
See `../README.md` for differences from Glicko-2 and Lichess's current
implementation.

```sh
cat encounters.csv | cargo run --release --bin replay_encounters -- --min-deviation 30,45 --first-advantage 0,11
Expand Down

0 comments on commit c7638b8

Please sign in to comment.