# How is the Coding Rank calculated?

Hey don’t talk about my secret weapons like that :o

@Agade could you send us more information about what do you think the calculation is wrong (giving us your rank and the submission you’ve done for each puzzle (language, rank, etc))

We will check the problem.

I take me as an example for optimisation games :

Power of thor :

• C# : I am rank 8 on 811 : 200^((811 - 8 + 1)/811) = 191.06
• Javascript : I am rank 9 on 738 : 200^((738 - 9 + 1)/738) = 188.85
• Java : I am rank 18 on 1228 : 200^((1228 - 18 + 1)/1228) = 185.85
• C++ : I am rank 33 on 1185 : 200^((1185 - 33 + 1)/1185) = 173.34
• PHP : I am rank 19 on 390 : 200^((390 - 19 + 1)/390) = 156.62

Androids :

• C++ : I am rank 15 on 394 : 200^((394 - 15 + 1)/394) = 165.68
• Java : I am rank 18 on 442 : 200^((442 - 18 + 1)/442) = 163.13
• C# : I am rank 14 on 289 : 200^((289 - 14 + 1)/289) = 157.59
• Javascript : I am rank 16 on 282 : 200^((282 - 16 + 1)/282) = 150.88
• PHP : I am rank 9 on 145 : 200^((145 - 9 + 1)/145) = 149.31

Mars Lander : I am rank 12 on 982 : 982^((982 - 12 + 1)/982) = 909.07

Bilbo : I am rank 32 on 860 : 860^((860 - 32 + 1)/860) = 674.09

Expected total : 191.06 + 188.85 + 185.85 + 173.34 + 156.62 + 165.68 + 163.13 + 157+59 + 150+88 + 149.31 + 909.07 + 674.09 = 3411

Score in my profile : 3084

Where am i wrong ?

Ppl need a score > 0%

Oh. I’ll change my tool and re-check that.

EDIT : hmm, even by keeping only player with >0% completion, i still have something weird. Maybe i must keep only player with a 100% completion ?

The formula works fine for me with score > 0.
847 (Mars)
+821 (Bilbo)
+193 (Paranoid/C#)
+176 (Paranoid/JS)
+195 (Thor/C#)
+174 (Thor/JS)
+127 (Thor/PHP)
=2533

And my profile shows 2535. I guess there must be some rounding up somewhere.

@SaiksyApo @G_Rom

I’m puzzled about the calculation on CoC, on my profile I only have 64 CP, while I am ranked 377th out of 9504 people, if I take the math behind it:

``````min(N,5000)^​((N-​C+​1)/​N)

=(5000)^((9504-377+1)/9504)
=3569.68818606
``````

It’s reeeeeeeeally different, and even if I misunderstood the formula and it is:

``````=(5000)^((5000-377+1)/5000)
=2635.16285448
``````

So, am I wrong? Should I get way more points?

EDIT:
By mistake, I tried this, and it seems to be the culprit because the number is really similar:

``````=(5000)^((5000-377+1)/9504)
=63.0474062196
``````

Which is really close to the 64CP that is appearing on my profile. If that’s it, I think the bug is pretty much confirmed

2 Likes

We have planned to adjust this formula for clash of code soon. We’ll have a look to it at the same time. Thank you.

By the way I checked with the people I follow, for example the user ‘intp’ has 2868 points for CoC while he is ranked 645th. So now I’m 100% sure that I should have 3000+ more points

EDIT: Thanks, It’s done, woooohooo top 100 again! Im’ not leaving it this time

According to the Clash of Code formula min(N,5000)^​((N-​C+​1)/​N), for an 8 player game (N=8), should I get only 8 points if I rank first and 2.3 points if I rank 5th ? I have played about 12 clashes in the past 3 hours and got a little more than 700 points from that. Can someone please make me understand a little better how CoC points are calculated ?

Do I get the CoC points only if I place 1st in the clash or are the other participants also given some points ?

@parikshitsaraswat nope, that’s not it. Each time you play CoC, you gain CoC points (based on TrueSkill algorithm, itself based on Elo) which give you a rank on the CoC leaderboard.

From now on, I’ll based it on myself to continue the explanation.
On the CoC leaderboard, I’m 178th, that’s C.
N is people that have > 0% and played the past few months, unknown to the public but can be found out by looking at the profile of the 1st in CoC (see @Magus below)

So you have

``````min(2786,5000)^​((2786-​178+​1)/2786) = 1683.12
``````

And for you other question, everyone gain or lose points, especially for example if you are 5th and everyone else is high ranked but not you.

EDIT: @parikshitsaraswat i edited your previous post to have both your edits so that my answer is relevant (and because your question was fine and relevant too)

EDIT2: Thanks @Magus, that was pretty obvious

1 Like

If you want to know the value of your N, just look at the profil of the 1rs ranked at CoC. At the moment this is Plopx and N is 2786.

2 Likes

Thanks a lot for all the info. Really cleared all the doubts about CoC. I just have one more question, if it’s no trouble : I had 3 clashes today in which I placed 2nd in two of them and 3rd in the other one. All the participants were around my rank only except two of them who were under 500 rank. However, even after those 3 clashes I didn’t recieve any points. So, if I don’t place first, will I only get points if all the other participants have higher ranking than me ? Also, are CoC ranks considered or the global ranks ?

Thanks again for all the help.

After clashing, your rank is updated. However, your Coding Points are updated once a day, not after every clash.

Your global rank is based on all your Coding Points (including those from Clash of Code).

2 Likes

Thanks for that…!!

Weird stuff is happening with point calculations:

If you look at My profile you will see that on December 13, I have 17089 points, while I only had 16500 or so points before playing CoC yesterday (which gave me 500 points), my guess is CoC update everywhere on the timeline while it obviously shouldn’t.

Moreover, I’ve got more points on December 13 than today. While I can admit that I may lose some points in CoC, Bot programming and Optimization, it might also be a bug since I was expecting to gain this much point today (not lose). (I might be wrong on this one)

Finally, it said I’m ranked 91/274816 on December 13 with 17089 points, while I’m ranked 78/258790 today with 16856 points, how is that possible? If the point amount are correct, shouldn’t I be more well ranked when I had more point with less people? Or are the points bugged and the ranking correct?

Thanks a lot

The main curve on your profile does not contain one dot per day your Coding Points or rank changed. There would be too much dot (actually one per day) for such a chart to work properly.
So the fact you had 17089 Coding Points on December the 13th doesn’t mean you had these points yesterday.

You solved some puzzle, played CoC, lost around 2k points after the update of a formula that led to a global drop of Coding Points for Clash of Code. So you lost some points and won almost as much during that period.
If you now have a better ranks with less Coding Points, it only means that people who had better ranks lost more points than you (certainly because of Clash of Code).

PS Could you stop flagging us with ‘@’ when it is not necessary? If you use it for anything and everything, we’ll consider its use to be irrelevant and not care about it anymore.

Sorry about the flagging thing, I tend to use it when a question is specifically addressed to the CG team, I’ll try not to abuse it so much in the near future.

I know the profile does not contain one dot per day, that’s crystal clear. In fact you answered both Question2 and Question3. But for Question1, let me be clearer:
Yesterday (or the day before), my points for December 13th were around 16000, I’m sure of it, and when I played some CoC, actually increasing my points, the points on December 13th, which should not have changed, updated as well. That’s the odd behavior I’m reporting.

Having some trouble while counting my contest points.
I’ve got more CP than I should…

So I looked for a simpler example to test, someone with one contest only.
I found a case ranked 26 / 3350 (with score > 0 in Code vs Zombies)
which got them 3629 CP (BTW, great performace TheNinja!).
Well, this deosn’t seem to fit with the well-known formula N**(N-c+1)/N).

Am I missing something?

Hi.
I checked the contest Code vs Zombies you are 26/3963.
With the formula N**(N-c+1)/N) you should got 3647 CP(more or less)