There is a game played between the easter bunny VERSUS a team of 4 kids. I will fully explain the rules of the game below. However, I'd like to start with the preface.

I found this problem as a king of the hill puzzle in codegolf.se. King of the hill here means that, as a programmer, your answers are programs that compete with each other. In this case, if you make an easter bunny algorithm, it will compete with all other kids' algorithms, and vice-versa. Now the interesting thing is that this specific topic got very few answers, which is unusual. That drives me to think that there was a "kind of trivial" solution, and that's why I'm posting it here.

For the rules that follow, is there any algorithm for either the bunny or the kids, that defeats its opponent no matter the opponent's algorithm? If so, please present it; if not, please prove it.


Rules of the game (copy/paste from OP)

The garden is a 2-dimensional grid with 49 rows and 49 columns.

The Easter Bunny™️ is in the center of the garden, minding his own business, holding on to 100 Easter eggs.

Unfortunately, there's a team of 4 children who aren't content to collect chocolate eggs, they want to capture the Easter Bunny™.

The game starts with 4 kids, one in each corner of the garden.

The kids can take 1 step each turn, in one of the 4 cardinal directions (North, South, East or West). When they've each taken a step (or decided not to), the bunny will take a move.

The kids can only see the Easter Bunny or it's eggs when they are 5 steps away or nearer.

Kids visibility (yellow) and movement options (green):

kid visibility diagram

The bunny can hop up to 2 spaces away on both axes (describing a 5 x 5 square he can hop to). Each time the bunny hops, it leaves behind an Easter egg.

The Easter Bunny™ can only see the kids when they are 5 steps away or nearer.

Bunny's visibility (yellow) and movement options (green)

bunny visibility diagram

Neither kids nor the Easter Bunny™ can leave the garden.

The game ends when:

  • The Easter Bunny™️ drops his last egg.
  • The kids catch the bunny.
  • The game reaches turn 1000.

The Goals:

  • The Easter Bunny™ wants to give the children as many Easter Eggs as possible while evading capture.
  • The kids want to collect as many eggs as possible, AND catch the Easter Bunny™.

This means that:

  • The Easter Bunny™ will ONLY score points if it evades capture by dropping it's last egg, or by finishing the time limit.
  • The team of kids will ONLY score points if they capture the Easter Bunny™.
  • In either case the points scored is the number of eggs the kids have picked up.

====================================================================== Clarifications:

  • The bunny may chose not to move (Deduction source: green central tile on bunny's move map)
  • If it chooses to move, it must drop an egg on its departure tile, which may already contain any number of eggs. The bunny may chose to move into a tile which already has eggs on it. (Deduction source: found nothing to the contrary)
  • The kids have instant telepathy unlimited by range (Deduction source: the kids' API is one, not four, so the programmer can use any data from other kids to move one)
  • $\begingroup$ Despite your edit, the rules about the eggs are still a bit unclear. Does the bunny really have to drop an egg on each cell it visits? What happens if it visits a cell that already contains an egg - does it drop a second one or not, or is it not even allowed to (re)visit such a cell? Does the bunny have to move, or can it decide not to like the kids are allowed to do? If the bunny always has to move and always has to drop an egg, why is there the 1000 turn limit? How does the visibility work - does a kid know what another sees, do they communicate? It's all rather unclear. $\endgroup$ Jul 28 '20 at 14:21
  • $\begingroup$ copypasta or copypaste? $\endgroup$ Jul 28 '20 at 17:04
  • $\begingroup$ @risky mysteries I hadn't done my research, I meant copy-paste $\endgroup$ Jul 29 '20 at 6:09
  • $\begingroup$ @Jaap Scherphuis I have omitted the programmatic section while trying to not leave anything out, but things like that evaded me. I'm appending them as clarifications. $\endgroup$ Jul 29 '20 at 6:12

There's a solution for

the bunny to evade capture

At each turn it can jump to 24 different cells. However, all the cells that the kids will be able to reach in their next turn (or are at) cover at most 20 cells (4 times 5). As such there's always at least four cells the bunny can jump to that the kids won't be able to reach this turn.

I still need to:

Prove the bunny cannot be forced to the side of the grid. It probably follows from the jump 2 size.


This game seems seriously broken because

the kids can force a draw by never moving. Unless I've misread the rules, nobody will score any points. Also Jeffrey's answer suggests the kids should not be playing for a win. Therefore a trivial draw.

That probably explains why very few answers were received on codegolf.

I assume the bunny has the option of dropping an egg on the square she just vacated on her turn. This is not explicitly mentioned in the rules.

  • $\begingroup$ I scrolled through OP's post and found a tidbit I hadn't included: "Each time the bunny hops, it leaves behind an Easter egg.". Added it in the body. Other than that, there is no reason to force what you are describing if there is no proof that a win is impossible. $\endgroup$ Jul 28 '20 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.