Char vs. bytes: Clash of Code "Shortest", and Code Golf puzzles ⛳

Starting from today, the code size in these two formats will take into account the number of bytes, instead of the number of characters. One of the main reasons behind this change was to avoid some unfair methods, the most famous one being the use of minifiers in Python (e.g. GitHub - clemg/pythongolfer: Code golfer and minifier for Python, so it should not impact how most of you play these games

This also impacts the code golf puzzles (Coding Games and Programming Challenges to Code Better): the scores and leaderboards will be recomputed by tomorrow, and the CodingPoints will be redistributed accordingly

This change was also done to prepare for another big change: we will add a lot of new Code Golf puzzles in the following days! Keep a close eye on the code golf page :eyes:


Does this affect the code size limit for normal puzzles / multiplayers? A lot of the neural network solutions rely on this being a character count to fit the network weights in.

1 Like

That’s an excellent question! This limit is not impacted indeed

1 Like

I don’t think there is some unfair methods in golf :p, as everyone play in the same environment. It’s a bit of shame to have just remove char scoring (at least in puzzle section) because it’s also an interesting metric. As you said there is the famous python trick but there is a lot more, it’s use in multiplayer and you kept it. Some impressive solution are now just gone. Perhaps a double leaderboard could be interesting ?

Speaking about “unfair”, there is also random and/or hardcoded solutions. At least temperature, thor and don’t panic are missing test cases and a lot of top solution could be qualified as “unfair”. Because you plan to add new golf puzzles, please pay close attention to test cases. It could be interesting to replay solutions sometimes, it seems to me that Thibaud was doing it.

1 Like

it’s still the same environment for everybody, that environment has just changed. python is already shorter than most other languages usually so i don’t have a problem with eliminating this particular trick

Nice job with code golf increase.
It could be done in some steps, though, e.g. one puzzle a week. I guess it’s too late now :wink:

Why don’t you split this topic on:

  1. Char vs. bytes
  2. Code Golf puzzles expansion.
1 Like


1 Like

I don’t think that: Code Golf - Hard and Very Hard is a good idea.
It should have stopped on Medium.

True for The Fall and Vox Codei 2, they seem very hard to complete at all in the first place, let alone try to golf them.
The good thing is that it will motivate us to complete them - I wanted to to them for a while but never had enough motivation.

As there are a lot of puzzles in Code Golf now, I suggest rating the best place for a puzzle in any language instead rating all places for a puzzle in all languages.

e.g: for a Thor puzzle I’m 10/1000 in python, and 11/2000 in js, then I should get points only for js.

I’m happy with the current format.

Currently it keeps your 5 best scores per puzzle, which is fine IMO, you don’t have to do all languages, just find 5 you can be competitive with.
So the max you can get per puzzle is 1000 CP, it seems good, not too much but enough to motivate you to ‘invest’ time on a puzzle.

Keeping only the best score would mean 200 CP per puzzle so a grand total of only 5400 CP for 27 puzzles, it doesn’t seem very rewarding.

There is another pattern used on the top of the leaderboards: “just find 1 you can be competitive with, and use it with system calls in all the other languages”. But this makes the per-language leaderboards rather pointless unfortunatelly.


Fully agree with you on that, the real issue was not the chars vs bytes thing but the system calls.

There are languages like C that I love golfing with but I don’t because system is more efficient.
Of course you could say " if you don’t like system, don’t use it" but then you cannot compete at top level - it was my policy for a while but I was stuck at some point by refusing to use it.

I’d be happy to not use system at all.

Please also add 1000 validators to every puzzle so there will be no hardcoding, thanks.


Yes I haven’t hardcoded any of the new puzzles but it is inevitable if it remains as is.

For example The Fall 3 is already hardcoded (solutions are shorter than The Fall 2 which wouldn’t make sense with proper solutions).

1 Like

Westicles, hardcode is the only way to survive against your syscalls :stuck_out_tongue: (like pardouin I didn’t hardcode any new puzzle).

1 Like

Alien vs Predator 2: “hardcode vs syscall”
Now playing in the closest C(G)inema near you…

Any big guy to dm me about the sweet concepts of “Hardcode” and “System calls” ? Just to teach myself those tips. I’m always curious to learn something else :slight_smile:

Hardcode : you solve only the validators instead of the real problem (allows you to forget some cases that are not covered by validators)

System calls : you call another language that is shorter than the current language. Example in c : main(){system(“paste your bash solution here”);}

So i have to get better in bash, got it. :wink: