Skip to content

rexxars/catskill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catskill

Webservice that deals with skills.

Usage

/rate

Based on game outcome, get new skill

POST /rate (Content-Type: application/json)

Request body:

{
  "teams": [
    [
      {"id": 13, "mu": 23.34, "sigma": 0.96},
      {"id": 14, "mu": 20.52, "sigma": 0.96}
    ],
    [
      {"id": 37, "mu": 29.38, "sigma": 0.95},
      {"id": 17, "mu": 19.45, "sigma": 0.97}
    ]
  ]
}
  • Winning team first
  • id (player ID) is not required, but allowed
  • mu default: 25
  • sigma default: 8.333333

Result:

{
  "teams": [
    [
      {
        "id": 13,
        "mu": 23.480385477499908,
        "sigma": 0.9589357381587995
      },
      {
        "id": 14,
        "mu": 20.660385477499908,
        "sigma": 0.9589357381587995
      }
    ],
    [
      {
        "id": 37,
        "mu": 29.24250222769965,
        "sigma": 0.9491173041400933
      },
      {
        "id": 17,
        "mu": 19.306696579549747,
        "sigma": 0.9687519221160511
      }
    ]
  ]
}

/quality

Based on team composition and skill, give a percentage of chance to draw

POST /quality (Content-Type: application/json)

Request body:

{
  "teams": [
    [
      {"id": 13, "mu": 23.34, "sigma": 0.96},
      {"id": 14, "mu": 20.52, "sigma": 0.96}
    ],
    [
      {"id": 37, "mu": 29.38, "sigma": 0.95},
      {"id": 17, "mu": 19.45, "sigma": 0.97}
    ]
  ]
}

Result:

{
  "quality": 82.30453079901952
}

License

MIT-licensed. See LICENSE.

About

Python webservice dealing with skill

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages