-
Notifications
You must be signed in to change notification settings - Fork 8
/
doc.go
39 lines (27 loc) · 908 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
Package trueskill implements the TrueSkill™ ranking system (by Microsoft) in Go.
Create a new instance of trueskill with the default configuration:
ts := trueskill.New()
Create new players with based on the trueskill configuration:
p1 := ts.NewPlayer() // Same as trueskill.NewPlayer(25.0, 8.333)
The TrueSkill algorithm can be tweaked with configuration options:
ts := trueskill.New(
trueskill.Mu(200),
trueskill.Sigma(66.666),
trueskill.Beta(33.333),
trueskill.Tau(0.666),
trueskill.DrawProbabilityZero())
Adjust player skills:
ts := trueskill.New()
p1 := ts.NewPlayer()
p2 := ts.NewPlayer()
draw := false
newSkills, probability := ts.AdjustSkills([]Player{p1, p2}, draw)
p1 = newSkills[0]
p2 = newSkills[1]
Check the conservative TrueSkill of a player:
ts := trueskill.New()
p1 := trueskill.NewPlayer(30, 1)
fmt.Println(ts.TrueSkill(p1)) // 27
*/
package trueskill