8

Today's doodle is about bunnies hopping on tiles, and writing code to get the bunny to every tile

I've done some testing on level 3 and found that loops, movement, and turning all count as 1 for solution length (loop, move, move, turn -> solution length 4)

Level 3 Code Level 3 Score

Using that knowledge I went on to solve level 4, but the solution length does not match what I did

Level 4 Code Level 4 Score


Is my way of calculating the solution length incorrect, or is Google wrong about the minimum solution length for level 4?


Also came across this issue on level 6

Level 6 Code Level 6 Score

1 Answer 1

4

You're correct, Google's wrong.

The solution length is measured by the number of "blocks" that you use. Your solution for level 4 is shorter than the one that they came up with. I don't recall what I did but I used exactly seven blocks and I remember it looked a lot "neater" than your shorter solution, which has the bunny bouncing into walls and turning unnecessarily. It's possible that whoever made the puzzle only logically came up with the "neater" solution and didn't notice that there was a shorter one possible.

3
  • Note that for how the game is measured, your "messy" solution is technically better than the "neat" solution (and apparently better than Google can do :) ) Commented Dec 4, 2017 at 16:43
  • I couldn't figure out the 7 block solution for ages, and just now realized I could duplicate the turn right block to make it 7 blocks, and not have the poor bunny try and jump off the edge
    – phflack
    Commented Dec 4, 2017 at 16:46
  • @phflack Yes, I just tried it again. I think the intended solution was LOOP(LOOP(LEFT, FORWARD, FORWARD), RIGHT, RIGHT), which makes the bunny hop in two nice squares and not to its doom. I think the intended goal was to teach you to reuse the "square loop", by turning the bunny around and restarting it on a different square (which you could then use again on the next level). Commented Dec 4, 2017 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .