I've been looking at Robert Abbott's logic mazes, in particular his Dot maze, and I'm trying to understand how they can be constructed so I can write an algorithm to do this automatically for arbitrary size and colours.
For now, I'm sticking to a small size with three colours. I don't yet have his book SuperMazes which reviews suggest may contain instructions on building such logic mazes.
Here's the maze, where you must go from the start to the goal stepping on dots in the order Red, Green, Yellow, Red, Green, Yellow, ...
My question is how do you go about constructing such a logic maze, or what are the principles behind building such a logic maze? Is there a description of an algorithm to generate them perhaps?
I noticed that for the first part the player must go through 3 red dots, which isn't possible in direct order, so this requires making some loops until the player gets beyond the last of the three red dots. I guess there must be some kind of "wall" of dots prohibiting the player from proceeding beyond the last of the three red dots in any other way. The remainder seems plain sailing where the player just alternates naturally between coloured dots, except for a small detour near the end. Moreover, if we step backwards Green, Red, Yellow, ... from the goal we see that it's plain sailing (i.e. there is no option but to travel along one path) back to the last red dot mentioned above. Then there appears to be multiple yellow dot options.
To start I've created the dual graph of the dots (vertices), to see if I can work anything out from that. Clearly the graph and its dual will always be planar, and we're looking for a walk around the graph where we can only step along edges in the weight order 1, 2, 3, 1, 2, 3, ...
What seems to make such a walk interesting is the traversal of some of the loops between vertices $v$ of order $\text{ord}~v>2$.
So a solution walk $$W=v_0e_0v_1e_1v_2\cdots v_{n-1}e_{n-1}v_n$$ needs to contain some of these loops, then figure out some rules to place edge weights elsewhere that deflect from $W$ in the sense that any edge $e\not\in W$ joining to a vertex $v_i\in W$ is such that $$w(e)+1\not\equiv w(e_i)\mod 3,$$ using weights $0,1,2$ instead of $1,2,3$.