Ranker for Unknown Score Ranges (Upper Bound)

40 views
Skip to first unread message

Neil Ghosh

unread,
Oct 17, 2014, 2:19:19 AM10/17/14
to google-app-en...@googlegroups.com
This code works very well when we know the max score one can get in the leaderboard. However I have a leader-board to maintain whose score can increase infinitely (Long.MAX_VALUE). I can always choose a very large value but that may just make one side of the tree heavier leading to poor performance. Any suggestions ?

Bartholomew Furrow

unread,
Oct 17, 2014, 9:39:00 AM10/17/14
to google-app-en...@googlegroups.com

That's an interesting question. What do you expect the score distribution to look like? If you're expecting something with a long tail, you could consider modifying the ranklist so that it splits logarithmically instead of linearly. So the root node, instead of

On Oct 17, 2014 6:35 AM, "Neil Ghosh" <neil....@gmail.com> wrote:
This code works very well when we know the max score one can get in the leaderboard. However I have a leader-board to maintain whose score can increase infinitely (Long.MAX_VALUE). I can always choose a very large value but that may just make one side of the tree heavier leading to poor performance. Any suggestions ?

--
You received this message because you are subscribed to the Google Groups "Google App Engine Ranklist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-app-engine-r...@googlegroups.com.
To post to this group, send email to google-app-en...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-app-engine-ranklist.
For more options, visit https://groups.google.com/d/optout.

Bartholomew Furrow

unread,
Oct 17, 2014, 9:46:56 AM10/17/14
to google-app-en...@googlegroups.com

(Sorry, toddler)

... Instead of splitting like 1e99, 2e99, 3e99,... Would split like 1, 100,1000,10000,...

The challenge regardless of whether you do this is that it's a very long way down the tree for the person with 1e100 points. I think what you'd need to do is modify the ranklist to cut off at a certain precision. So that's hard.

Actually, forget all this. Take log(score), multiply it by 1e10, and put that in. Make your ranklist go up to something like 1e14. You'll have a ton of precision, and it will automatically treat close scores as ties that you can deal with outside the ranklist. Does that work?

Bartholomew

Reply all
Reply to author
Forward
0 new messages