openskill.js

Version tests Coverage Downloads License

A JavaScript / TypeScript implementation of the Weng-Lin Bayesian online skill-ranking method, described in A Bayesian Approximation Method for Online Ranking.

openskill is a faster, simpler, and patent-free alternative to TrueSkill that supports asymmetric teams, free-for-all matches, partial rankings, ties, partial play, and victory margins.

Why openskill?

Speed

ModelSpeed (higher is better)VarianceSamples
Openskill/bradleyTerryFull62,643 ops/sec±1.09%91 runs sampled
Openskill/bradleyTerryPart40,152 ops/sec±0.73%91 runs sampled
Openskill/thurstoneMostellerFull59,336 ops/sec±0.74%93 runs sampled
Openskill/thurstoneMostellerPart38,666 ops/sec±1.21%92 runs sampled
Openskill/plackettLuce23,492 ops/sec±0.26%91 runs sampled
TrueSkill2,962 ops/sec±3.23%82 runs sampled

See this post for more.

Implementations in other languages

The same algorithm has been ported to several other ecosystems. The Examples by Language section of this site shows idiomatic usage for each port.

LanguageRepository
JavaScriptphilihp/openskill.js
Pythonvivekjoshy/openskill.py
Javapocketcombats/openskill-java
Kotlinbrezinajn/openskill.kt
Elixirphilihp/openskill.ex
Luabstummer/openskill.lua
Google Apps Scripthaya14busa/gas-openskill
Google SheetsSpreadsheet template

Next