nethackscoreboard-org / matter

NetHack Scoreboard repo for live site
https://nethackscoreboard.org
MIT License
6 stars 6 forks source link

Tied Z-scores rank handling #54

Closed vultur-cadens closed 2 years ago

vultur-cadens commented 2 years ago

https://nethackscoreboard.org/zscore.all.html

Since Z-scores increase by the reciprocal of (usually small) integers, it is common for many players to be tied in Z-score, especially for small numbers of ascensions. Currently, the Z-scores page does not skip any ranking numbers, i.e. it counts distinct Z-score values, instead of number of players.

The ranking for a given player should be 1+(number of players with better Z-score), so that a list of Z-scores like [3.0, 2.0, 2.0, 1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0] should have their respective ranks be [1, 2, 2, 4, 4, 4, 7, 7, 7, 7], instead of the current behavior, which would rank them [1, 2, 2, 3, 3, 3, 4, 4, 4, 4].