@pebg/multi-elo
v2.2.2
Published
This package implements a multiplayer extension of the popular Elo rating system
Downloads
2
Readme
multi-elo
This package implements a multiplayer extension of the popular Elo rating system.
This Package is based on djcunningham0s python implementation. For additional information, see his blog post on Towards Data Science (or try this link if you hit a paywall).
Installation
The package can be installed from GitHub or npm by using npm
.
npm install multi-elo
You can install a specific released version of the package using tag names. For example, to install release v0.0.1 you can use:
npm install [email protected]
Example Usage
The following example shows how to calculate updated Elo ratings after a matchup using the default settings in the package.
import { MultiElo } from 'multi-elo';
# player with 1200 rating beats a player with 1000 rating
MultiElo.getNewRatings([1200, 1000])
# [1207.68809835, 992.31190165]
# player with 900 rating beats player with 1000 rating
MultiElo.getNewRatings([900, 1000])
# [920.48207999, 979.51792001]
# 3-way matchup
MultiElo.getNewRatings([1200, 900, 1000])
# [1208.34629612, 910.43382278, 981.21988111]
See demo.md
for a more in-depth tutorial, including details on parameters that can be tuned in the Elo algorithm.
Methodology
For more Info on the methodology read djcunningham0s Readme.