Langton's Ant

I have been going through this book that has a ton of Python projects. One that had a lot of bang for the buck was Langton's Ant. You give this ant some very simple rules to follow. Then it makes weird patterns on the screen.

There are only two types of squares on the board. In my version, I made them periods and each (@) signs. Here are the rules I coded for the ant running around:

  1. On a period, turn to the right and change the spot to an @ sign. Move forward.
  2. On an @ sign, turn to the left and change the spot to a period. Move forward.

That's it. This will allegedly form somewhat symmetrical patterns on the screen. Also the ant will eventually devolve to a repeating long pattern. I did not let the thing run along to confirm either of these assertions. I just enjoyed the weird patterns.