# 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.

## Demo

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 https://peterkagey.github.io/project-euler-208/?n=8&w=3,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.