TypeScript port of the python TrueSkill package by Heungsub Lee.
TrueSkill is a rating system for players of a game. It was developed, patented, and trademarked by Microsoft Research and has been used on Xbox LIVE for ranking and matchmaking service. This system quantifies players’ TRUE skill points by the Bayesian inference algorithm. It also works well with any type of match rule including N:N team game or free-for-all. Read about how the trueskill model works
Built into es5 and published with typings. Available on npm:
npm install ts-trueskill
2 vs 2 example:
;;;// q is quality of the match with the players at their current rating;// Assumes the first team was the winner by default; // rate also takes weights of winners or draw// rated1 and rated2 are now arrays with updated scores from result of matchconsole.lograted1.toString // team 1 went up in rating// >> Rating(mu=28.108, sigma=7.774),Rating(mu=28.108, sigma=7.774)console.lograted2.toString // team 2 went down in rating// >> Rating(mu=21.892, sigma=7.774),Rating(mu=21.892, sigma=7.774)
1 vs 1 example:
using shortcut functions for 1vs1 matches
;; // 1P's skill; // 2P's skill; // quality will be low from large difference in scores; // get new ratings after p1 wins
This package is Licensed under MIT, but is a port of the BSD licensed python TrueSkill package by Heungsub Lee. The TrueSkill™ brand is not very permissive. Microsoft permits only Xbox Live games or non-commercial projects to use TrueSkill™.