Formula for player rank

Hi guys, I’m developping an Android client (gotten quite far now) but I can’t figure out how to determine the rank of a user (e.g. 13k or 1d) from the data available. The doc seems to be old on this point, because it states:

Note that a player’s rank is represented as an integer and converted later for display:

def display_rank(rank_val): if rank_val < 30: return "%d Kyu" % (30-rank_val) else: return "%d Dan" % ((rank_val-30)+1)

I interpreted that elvish into the following kotlin code:

private fun formatRank(rank: Int?): String {
    return when(rank) {
        null -> "?"
        in 0 .. 29 -> "${30 - rank}k"
        in 30 .. 100 -> "${(rank - 29)}d"
        else -> "???"

However, it doesn’t seem to produce the correct values when compared to the website - allenlin41 is 3k and Bifron 1d (but I’m not simply off by one, I tried):

Can someone help shed some light? Is this related to the relatively new overhaul of the ratings system this year?


If you have access to a player’s rating points, the conversion formula is

Also keep in mind that OGS always rounds down, so a 1.9d is seen as a 1d and a 9.1k is seen as a 10k.
It’s not until they hit 2.0 or 9.0 that the rank goes up.

1 Like

A 9.1 is rounded UP to 10K and Down to 9K. At least that’s how I understand how numbers work, going to a bigger number is rounding up, and going to a smaller number is rounding down (See “Significant Numbers and Rounding” in the current USP for reference). Ranks (in K) seem to be rounded up. No complaints, that’s fine with me. I have no problem with the ranking system.


You are technically correct, I was referring to the rank always being rounded down (hence why I gave two examples). As we have two number groups you could also think of the kyu ranks as negative numbers, therefore 9.1k would indeed round down to 10k but regardless of what the number reads, the “rank” is always rounded down to the weaker value until the .0 threshold is crossed.

thanks for that… so if I read it correctly, what I need is actually

rank = Math.log(rating / 850) / 0.032

I’ll try it out ASAP

1 Like

ugh… spent an hour debuggin and I finally found out what’s wrong. The formula is correct, however the egf value returned in the gamedata is the user’s live rating while the site generally displays the info from the overall rating, which is generally higher. Trouble is, that rating is not available (same as the icon of the user and other such info) unless I do a REST call for the game details . Do I have to do a REST request just for the player details? Am I missing something?

Oh. OK, I understand.
I flunked math in 6th grade, and we all know that that will cripple one’s ability to deal with numbers for life.


What is the justification for this formula? In other words, how do “we” know that this formula gives meaningful results?

Pretty sure they’re the stock numbers used with the glicko-2 rating system. My understanding is that anoek did various testing with different numbers but found the default numbers to be the best. Not surprising since they were developed by a mathematician.

Do you guys know if there is a way to get the overal rating number (and player icon URL) from the API? It’s kinda tricky orchestrating things that come from an async source with those that come from a REST API (not to mention wasteful of server resources).

If the answer is no, I think this is an oversight… who could I go to to suggest this improvement?

Pinging @anoek

That information will come to you in some responses from the api, but there isn’t a query in the interface for that explicitly.

Instead, do a HTTP GET<IDS> where <IDS> is a period separated list of user id’s, such as ?id=1.4.8194


Hi @anoek, thanks for taking the time to reply. I managed to solve it in the end by reverse engineering what the site is doing, which is call the /api/v1/games/{gameId} endpoint and using the data provided there, although it has 90% of the stuff already from the interface.

On another note, I wanted to ask you who should I talk to about releasing my new game client to the world. I’ve put some 100 developement hours in it already and I had a good time writing it but I’m nearing the point where the motivation to continue will disappear if people aren’t actually using it. I am willing to pay and put it on Google Play Store, but I don’t want to upset anybody by doing so, since I’ll actually be using the server’s resources.

So, TL;DR: who should I talk to to obtain permission to release the client?

PS: this is what the app looks right now:

1 Like

Awesome, go for it :slight_smile: