[Community Puzzle] Snake

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Dr_Meyss,validated by @FE40536,@Devonor and @The_Capra_Aegagrus_H.
If you have any issues, feel free to ping them.

Very nice, love it :slight_smile:

How to do more than 6M ?

I try to minimize a path in the first round like in travelling salesman problem, then I use A* to travel from one predetermined node to the next

A pleasant surprise to find this one on the optimization tab today. Loved it.


The initial positions occupied by the snake are 10;10 11;10 12;10 13;10 & 14;10 I don’t think having a rabbit being placed in any of these positions should be a thing as it doesn’t make sense that a rabbit could be there at the same time as the snake.

Skip them !!! at first turn , if there are some rabbits !!! :smiley:
It’s what you have observed or a supposition ?

It’s not a supposition, it’s an observation.

Nice puzzle. Thanks for the submission!
I have one small suggestion: The leaderboard evaluation should not be carried out with random maps in order to improve comparability. My score varies by ± 500000 points depending on the position of the sun it seems.

There is a case who you are better with random. Resubmit many times. :smiley:

I wonder what might be in Test case 70. All test cases are passing (even these randomized) and I’m receiving over 4M points. Maybe a small hint what I have missed?

70 is the number of rabbits, since there are more rabbits you can score more points.

Nice job reaching 6.7M in PHP @cedricdd ! I guess a lucky submit is involved, but that you also found good heuristics to not rely too much on CPU power?

Hey @Dr_Meyss. Fun puzzle, but the variance created by random validators creates some unfairness. I suspect most people in the top 10, with 6.3M+ points or so probably have more or less equally good searches, but some got lucky and/or submitted more times.

I have some ideas how it could be made more fair. Are you interested?

Yeah you can’t do much in 50ms, the bulk is done on first turn and I try to improve it on each turns.