Skip to content

mafredri/go-trueskilld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

go-trueskilld

A simple http API for go-trueskill.

If the game configuration is not provided in the JSON request, the default configuration for TrueSkill™ is used.

Example

POST http://localhost:8495/rate

{
  "players": [
    {
      "mu": 25.000,
      "sigma": 8.333
    },
	{
      "mu": 25.000,
      "sigma": 8.333
    }
  ]
}

Response

{
  "players": [
    {
      "mu": 29.396,
      "sigma": 7.171,
      "trueskill": 7.882
    },
    {
      "mu": 20.604,
      "sigma": 7.171,
      "trueskill": 0
    }
  ],
  "probability_of_outcome": 47.759
}

NOTE: If you provide the game configuration in your request, you might encounter rounding errors without sufficient precision. Example (compare probability of outcome to above):

POST

{
  "mu": 25.0,
  "sigma": 8.333,
  "beta": 4.166,
  "tau": 0.083,
  "draw_probability": 10,
  "players": [
    {
      "mu": 25.000,
      "sigma": 8.333
    },
    {
      "mu": 25.000,
      "sigma": 8.333
    }
  ]
}

Response

{
  "players": [
    {
      "mu": 29.396,
      "sigma": 7.171,
      "trueskill": 7.882
    },
    {
      "mu": 20.604,
      "sigma": 7.171,
      "trueskill": 0
    }
  ],
  "probability_of_outcome": 47.76
}

Releases

No releases published

Packages

No packages published

Languages