@pebg/multi-elo
TypeScript icon, indicating that this package has built-in type declarations

2.2.2 • Public • Published

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 multi-elo@v0.0.1

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.

Readme

Keywords

Package Sidebar

Install

npm i @pebg/multi-elo

Weekly Downloads

0

Version

2.2.2

License

MIT

Unpacked Size

49.9 kB

Total Files

25

Last publish

Collaborators

  • pebg