# Max CP given for non-optimal golf solutions

I think there is a small issue with the way CodinPoints are attributed in Golf puzzles. Taking the top Python3 solutions to Temperatures as an example:

1. ntsd with 58 characters, 200 CP
2. Stack_of_Pancakes with 60 characters, 200 CP
3. SAINT_LAURENT with 62 characters, 200 CP
4. to 7. [4 more players with 62 characters and 200 CP]

According to their profiles, all those seven players get the same value of 200 CPs.

Using the formula, CPs for the 3rd player out of 4458 is 200^(1-2/4458) ≈ 199.525. So it seems that the score is then rounded up, in this case to 200.

I think this is unfair to the best player (gg @ntsd!). More importantly, it’s an unfortunate situation when players without the best solution have no incentive to improve since they already get the maximum score.

I propose the obvious change: truncate the score instead of rounding it. This only changes a single CP at most, but would make things more interesting and fair for top solutions in languages with many players.

2 Likes

I agree it feels unfair. However, I’m not fond of the obvious change you’re mentioning because it doesn’t feel like much to me. I need to check the code golf leaderboard.

Any other options?

A weird idea of mine:
what about considering N as the number of characters after which your solution doesn’t give you any points (or just 1 for participating) and C the difference in number of characters with the best solution?

1 Like

Thanks for looking into it! Doesn’t the number of characters after which your solution doesn’t give you any points depend on N? So it’s not immediately possible to use it to define N (circular definition). You could work around that (first use the “normal” N, then redefine it using your definition), but does CG want such complexity? A simpler option could also be to hardcode a max N, like 1000 or less (using N=1000 gives 198.9 points to the second, i.e. roughly the same effect as truncating).

Using the number of characters could be interesting, but quite tricky to get right. Should absolute or relative difference be used. With what coefficients? …

I agree truncating has a small effect. On the other hand, it’s better than the current situation, it’s a very simple change to implement and to explain, and has no drawback as far as I can see. Also, even though 1CP is not much, it might be enough to keep things interesting for competitive players, and you need to be competitive to get to that level

1 Like

As a CP hoarder for 1CP I won’t even raise an eyebrow.
But maybe it’s different for top codegolfers.

Right, I was just thinking about clarifying this. Indeed 1CP is negligible for the global leaderboard. It might not be for the golf leaderboard.

1 Like

If Codingame staff has limited resources they should work on something with more impact.
On a risk assessment matrix that issue should be very low, the impact is really low (±0.5 CP point error) to a low amount of players (top 6 of each codegolf).

Maybe I’m too pragmatic.

1 Like

I agree it’s not a high impact change. However it’s also a very low effort change to add a truncation, and it would be a positive change for the top of the golf leaderboard.