philihp / openskill.js

A faster, open-license alternative to Microsoft TrueSkill
https://www.npmjs.com/package/openskill
MIT License
203 stars 19 forks source link

Different weights for games #544

Closed lucasheim closed 4 months ago

lucasheim commented 8 months ago

Hey!

First of all, thanks a lot for the work put in, the library is awesome. I'm using it to rank players in TFT games (free-for-all 8 player games) and in general it's working very well, but I want to understand if it's possible to give a slight bigger weight to some games.

Example: in the competitive TFT circuit, there are regional tournaments and international ones. The former have higher stakes and technically could be "worth more" in terms of rate, like winning in a Grand Slam vs a ATP 250 in Tennis. Is there anyway I can setup this weight? I searched through the issues and found out about the "gamma" parameter, but I couldn't understand how to use it based on the docs.

Thanks in advance.

philihp commented 7 months ago

There is a configurable parameter BETA, which I think is what you're after. If not set, it's derived from (mu/z)/2, which if everything is left as defaults should be around 4.16666.... So for example if you wanted your quarter-finals match and semi-finals game to be rated normally, and then your finals match to hit harder, you could do something like:

[[a1, a2], [a1, a2]] = rate([[a1, a2], [b1, b2]], { beta: 4.166667 })
[[a1, a2], [a1, a2]] = rate([[a1, a2], [b1, b2]], { beta: 4.166667 })
[[a1, a2], [a1, a2]] = rate([[a1, a2], [b1, b2]], { beta: 8.333333 })

Feel free to set that Beta to be whatever you want! β is defined as for the "uncertainty of performance", so I could see how in your highest stakes games you would want this higher because you'd know that your teams are trying their hardest.

philihp commented 4 months ago

Closing from lack of response. I hope that parameter works out