More Ants

I worked more on Langton’s Ant. I found the problem I was having. The order of drawing the ant was screwing up the check for color of the target grid. I have since corrected this and can now run at different grid sizes.

Langton’s Ant grid 144×144

Langton’s Ant grid 48×48

When the ant hits a red square it flips it blue and then turns 90 degrees right and moves forward 1 square.

When the ant hits a blue square it flips it red and then turns 90 degrees left and moves forward 1 square.

When it escapes from the center it would keep going with a spiral pattern indefinitely that is until it hits the edge of the canvas then things really get interesting.

Here are some captures from the 144 grid run.

Here it is after over 1 million steps.

I let it keep running to see if it would get caught in a loop. I recommend checking it out.

I also viewed another lecture in Modern Electronics.