Discussion about this post

User's avatar
Wyrd Smythe's avatar

>> "We can then interpret the base 4 digits of p as directions (up, down, left, or right) with the understanding that if the robot tries to move in an obstructed direction then it does nothing and moves on to the next instruction."

I'm not clear on the latter part of that, what it means to move on to the next instruction. Just skip to the next digit, I assume? I wonder what would happen if you reset to the starting position and picked another starting point in the digit sequence. Though, if we're simulating an actual robot navigating, that doesn't fit.

I'm curious about the efficiency. It would be interesting to see how often points in the maze are revisited. Does the robot spend a lot of time wandering around a small area.

It is a cool way to approach mazes with loops preventing a right- (or left-) hand rule from working. I have a maze generator I wrote. Might be fun to try this.

I had some fun a while back using the digits of pi to drive a graphics turtle. Similar to a random walk but driven by the decimal digits of pi. Go a fixed length then turn in the direction given by 360 / (36 * digit). Made kind of an interesting animated video! Random walks using different bases to control the possible angles (3, 4, 5...) make interesting patterns, too.

Expand full comment
Joseph Shipman's avatar

Why isn’t this intuitively obvious?

For any maze there are only a finite number of states, so there is a sequence which works for that maze by assuming an initial state, exiting from there, if it doesn’t work crossing off from your list of possible initial states the one that was used up, assuming another initial state, applying the moves you made so far to derive your current state, exiting from there, it that doesn’t work crossing that second assumed initial state off your list, etc.

Any normal number will obviously have somewhere in its sequence of digits the sequence that works for the maze you’re in, so if you haven’t escaped by the time you reach that point you will escape with that sequence.

Expand full comment
8 more comments...

No posts