# A flower-shaped robot-control puzzle

The goal of this puzzle is to find a sequence of max 5 commands that will move the triangle through the maze and visit all colored squares.

Three types of commands can be used:

• F0 makes the sequence start over.
• The arrows (↑, ↱, ↰) move the triangle (forward) or make it change orientation (clockwise, anti-clockwise).
• 🖌️s change the color of the square the triangle is in to the color of the 🖌️. Each command can (but does not need to) have a color. A colored command is only executed if the triangle is in a square of the same color.

If you want to play around with the mechanics interactively, you can do that here. (Disclaimer: I am one of the developers of the site.)

CLARIFICATIONS:

• Attempting to move out of the board is not allowed.
• The sequence terminates automatically once all squares have been visited.
• Grey squares are not colored squares. They considered "out of the maze".
• From playing around with the interactive version, it seems that grey is not a colour, and in fact moving to a grey square is considered "moving out of the board". Is that correct? – Jaap Scherphuis Dec 17 '19 at 14:47
• "🖌️s change the color of the square the triangle is in to the color of the 🖌️. Each command can (but does not need to) have a color. A colored command is only executed if the triangle is in a square of the same color." That means 🖌️ is a no-op. – msh210 Dec 17 '19 at 14:52
• @msh210 I think there are two separate colours associated with a 🖌️ command. (1) Any command can be coloured, meaning that it is only executed when the colour of the current square matches. (2) The 🖌️ command, specifically, has a parameter which is a colour but needn't be the same as the colour of the command, saying what colour to paint the square with. Think of #1 as the colour of a box the command is in (the box is only opened when the colour matches where you are) and #2 as a part of the command itself. – Gareth McCaughan Dec 17 '19 at 15:46
• FWIW I am red-green colour blind (pretty common) and find the magenta(?) and blue(?) very hard to distinguish. – Jonathan Allan Dec 17 '19 at 16:58
• @JonathanAllan Sorry about that. I didn't think about it. I will write it down and fix it as soon as I have the time. Thank you for pointing it out. – Lucas Dec 17 '19 at 17:20