Giter Club home page Giter Club logo

rratings's Introduction

rratings (Rust Ratings)

rratings is a tool meant to be run over a set of compressed chess game PGNs to recalculate the ratings for all players, and determine the accuracy of various rating systems.

It is geared specifically towards the lichess dataset: https://database.lichess.org/

Which is both huge and free.

This is not meant to be a production tool. It's meant to assist research into practical rating systems.

Usage

  1. Download a database of PGNs with game results. The code assumes that the games inside each PGN are approximately ordered by date & time. This is true for the above dataset.
  2. bunzip2 the PGNs and recompress them with zstd. You want this because bunzip2 is rather slow to decompress and will limit the performance of the tool, especially if you're going to be running it multiple times. Alternatively, hack the source to support bzip2 directly.
  3. Change the paths in main() to point to your files.
  4. cargo run --release

The tool assumes that sorting the files gets them in date order (again, true for the lichess dataset) and will process them one by one. Ratings are kept between files, but the prediction accuracy is reset after every file. This means that you can use older files to seed historical ratings and then measure the prediction performance over (say) a month.

Note

By default only blitz games are considered. These have the largest pool of players in lichess.

Because we only need the game headers of the PGN, you can filter the PGNs through pgn-extract with some combination of --plylimit 0 and -R to throw away the unneeded moves and tags. This vastly speeds up traversing the DB.

To Do

  • Extract rating parameters into class constructors.
  • Run a global optimizer to find the optimal parameters.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.