4 ms·
How many labels you need to solve this? I have four, but I wonder if it can be simplified. Suggestion: Add ability to share the code.
by rplnt 11y ago
How many labels you need to solve this? I have four, but I wonder if it can be simplified.
Suggestion: Add ability to share the code.
- alexmic 11y agoI used two labels.
- jmcannon 11y agoI used two.
- kanche 11y agoI made it through with two [0] [0] https://gist.github.com/kanche/92c92c5e926ebc66da68 https://gist.github.com/kanche/92c92c5e926ebc66da68 To watch them run around is so cool! Cool puzzle. Nicely created site. I am trying to give them a pendulum like swing instruction right now, make them dance :P edit: had two unnecessary instruction in the gist (because each instruction takes same amount of time to execute), and, the robots disappointed me- they can't dance
- lucb1e 11y agoAdditional suggestion: ability to grade code. I see solutions that are a lot shorter than mine in code (2 labels, 5 instructions), but they take about 87 instruction cycles to get there whereas without labels you can do it in about 30 cycles.
- Lewton 11y ago... Without labels? Can you show that solution? Are you sure it works for robots placed on an infinite line?
- lucb1e 11y agoYeah, I was about to delete my comment (but now someone already replied) because I discovered the randomize button. My bad! The solution with a "speeding label" is the only solution I see. I also recognize the parallel with infinite loop detection now, like sugarcube commented already: https://news.ycombinator.com/item?id=10477109 https://news.ycombinator.com/item?id=10477109