Skip to content

Erlang implementation of classic TrueSkill and TrueSkill2

License

Notifications You must be signed in to change notification settings

mmooyyii/trueskill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erlang CI Coverage Status

trueskill

Erlang implementation of TrueSkill

TrueSkill Algorithm

TrueSkill is a kind of Bayesian inference algorithm for game rank and match, has been used on Xbox Live. TrueSkill support 1:1,N:M, N:M:J:K game.

Build

rebar3 compile

Quick Start

# create player
1> P1 = trueskill:new_player().
{ts_player,25,8.333333333333334,0.014399999999999998,
           0.35999999999999993,0}
2> P2 = trueskill:new_player().
{ts_player,25,8.333333333333334,0.014399999999999998,
           0.35999999999999993,0}

# create team
Team1 = [P1].
Team2 = [P2].
Team3 = [trueskill:new_player(), trueskill:new_player()].

# show the quality of the game
6> trueskill:vs([Team1, Team2]).
0.44721359549995787

# adjust player's rank by game result, 
# in this case, Team1 get rank 1 and Team2 get rank 2
7> trueskill:adjust([Team1, Team2],[1,2]).
[[{ts_player,29.39583201999916,7.171475587326195,
             0.019443880858302023,0.5715690555275234,0}],
 [{ts_player,20.604167980000835,7.171475587326195,
             0.019443880858302023,0.4006249873875777,0}]]

License

MIT

About

Erlang implementation of classic TrueSkill and TrueSkill2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages