openskill.js icon indicating copy to clipboard operation
openskill.js copied to clipboard

Different weights for games

Open lucasheim opened this issue 2 years ago • 1 comments

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.

lucasheim avatar Feb 27 '24 11:02 lucasheim

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 avatar Apr 17 '24 00:04 philihp

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

philihp avatar Jul 12 '24 20:07 philihp