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

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.

  • 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 :) ) – Broneironaut Dec 4 '17 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 Dec 4 '17 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). – Broneironaut Dec 4 '17 at 16:51

protected by Community Dec 6 '17 at 20:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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