Robot Walks

I’ve gotten a lot of mathematical inspiration from Project Euler questions, but perhaps the question that has gotten me thinking the most is Project Euler Problem 208: Robot Walks. In this problem, a robot takes steps either to the right or the left, and at each step, it turns \(\frac 15\) of the way of a circle.

Project Euler Problem 208


I started thinking about this problem more seriously after I met Chase Meadors at the 2018 Graduate Student Combinatorics Conference and learned about his Javascript applet which allows a user to control a (virtual) robot 🤖 by using the left and right arrow keys. By repeating the same sequence of moves (e.g. \(4\) steps to the right followed by \(2\) steps to the left) I found that the robot traced out surprising symmetric patterns.

I cloned Chase’s Github Repo so that I could customize the robot further. If you go to the URL,2,5,1 you’ll see an example of a robot walk, where n=8 means that each step will be \(\displaystyle \frac 18\) of a circle, and w=3,2,5,1 means that the robot will follow the pattern of \(3\) steps to the right followed by \(2\) steps to the left, followed by \(5\) steps to the right, followed by \(1\) step to the left, and repeating this pattern until it returns to where it began.

Stack Exchange Questions

I’ve asked a number of questions on Math Stack Exchange (MSE) and Code Golf Stack Exchange (CGSE) about these problems.

Openish Problem Collection

I’ve also asked about this setup in my Openish Problem Collection in Problem 41 and in Problem 69.

A series of problems directed related to Project Euler problem #208.
A question about the area enclosed by a robot’s path.


Twice each day, my Twitter Bot @RobotWalks tweets a randomly generated Robot Walk cycle. Check out the Github code if you want to see how it works, and read my series on making a Twitter Bot if you want to make something like it for yourself.

Jessica’s Robot Walk Prints

I ordered some canvas prints of some numerologically significant walks for my friend Jessica, which she hung behind her TV. There’s no doubt that this caused her to form a deep mental association between me and The Good Place.

Some prints that I made for my friend Jessica

What’s next?

Some day, I want to laser cut or 3D print some coasters based on these designs. Reach out to me if that’s something that you’re interested in, and we can do it together!


Leave a Reply

Your email address will not be published. Required fields are marked *