Saturday 23 January 2016

mazes - Programming the ColorBot


"Welcome!" says the strange professor. "I hear you have come to see my newest robot. Well, he's actually slightly broken right now, but let's take a look anyway."


He shows you a robot with twelve dials on its back in six colors. He continues "These dials set how he moves. He's got a camera on the bottom. When turned on, he checks the color of the space he's on and moves according to the dials of that color. First he either turns 90 degrees [L]eft, 90 degrees [R]ight, or keeps going [F]orwards, based on the left dial. Then he moves the number of spaces shown on the right dial; so one, two or three spaces. Once he moves, he checks the new space and starts again."


"Now, there are two major bugs right now. First, if two pairs of dials match, he won't move at all; that is, each color must be a unique combination. Also, the Orange dials are currently jammed; I can't get them off of R3."


"He starts in the upper-left, pointing down. Can you get him to the grey space in the bottom-right, where he'll turn off, without hitting a wall (shown in black)? You can set the non-orange dials however you want to make it happen. Good luck."


The map



Answer




You can set the dials as:



Red: R1
Orange: R3
Yellow: R2
Green: L2
Cyan: L3
Purple: F1



To get this path:




enter image description here



No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...