Skip to content
Ecce Signum

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Laboratory

Day: October 3, 2008

Langton’s Ant 3D, Version 2

2008-10-03 John Winkelman

Langton's Ant in 3D

Another Langton’s Ant 3D experiment. Click here to run the experiment.

I finally got the ruleset sorted out, and now I have a simple 3d version of Langton’s Ant up and running. This is how it works:

Remember the behavior of Langton’s Ant:
1. If the ant is on an empty cell, color it in and move according to the next rule in the set.
2. If the ant is on a filled cell, empty the cell and move according to the previous rule in the set.
3. Do not talk about fight club.

The space in which the Ant is moving is a 50x50x50 (125,000) grid of cells.

There are eight rules which the ant follows, which – if none of the cells are colored in yet – the ant will follow in sequence:

1. Z–
2. X++
3. Y++
4. X–
5. Z++
6. X++
7. Y–
8. X–

In non-computerese, when the applet first runs, the ant will travel in, right, down, left, out, right, up, left, and in doing so fill in eight cells which make up a 2x2x2 cube.

2-3
5-4

1-8
6-7

With the next step the ant begins to encounter filled cells, which mean it takes a step back in the ruleset, and perhaps another, and eventually start to travel to new cells.

It is important, in order for the ant to make the desired patterns, that the sequence of movements in the ruleset visit each cell in a cube of cells exactly once, with the next iteration through the ruleset returning the ant to the original cell. Also, no diagonal movement; only cell face to cell face. I am not sure if this can be accomplished with more than a 2x2x2 cube.

In this demo the cells are colored in according to the “depth”, or the Z value of the cell-s position. Cells farther in the “back” are blue, and cells closer to the “front” are red. All layers (Z) are faded back except for the layer in which the Ant is currently moving. This is why there appears to be a “screen” of cells which moves back and forth and changes colors constantly.

Also in this demo, the pattern created appears to trend to the lower right corner of the screen because each of the layers, back to front, has been offset one cell to the right and one cell down, to provide a sort of isometric view of the pattern.

More experiments along these lines to come, after my brain cools down a bit.

Posted in ProgrammingTagged cellular automata, Flash comment on Langton’s Ant 3D, Version 2

Personal website of John Winkelman

Archives

Categories

Posts By Month

October 2008
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Sep   Nov »

Twitter Feed

JohnWinkelmanJohn Winkelman@JohnWinkelman·
7 Mar

New blog post. Got some books. Felt some ennui. http://eccesignum.org/2021/03/07/march-already-and-still/
#aleksandrsolzhenitsyn #apexbookcompany #andotherstoriespublishing #parisreview #amreading #russianliterature

Reply on Twitter 1368562949296709639Retweet on Twitter 1368562949296709639Like on Twitter 1368562949296709639Twitter 1368562949296709639
JohnWinkelmanJohn Winkelman@JohnWinkelman·
7 Mar

It's been a long week.

Reply on Twitter 1368431629610459140Retweet on Twitter 1368431629610459140Like on Twitter 13684316296104591403Twitter 1368431629610459140
JohnWinkelmanJohn Winkelman@JohnWinkelman·
2 Mar

I just backed Chronicles of the Immortal Swordsmen #1 on @Kickstarter https://www.kickstarter.com/projects/1617982296/chronicles-of-the-immortal-swordsmen-1?ref=android_thanks_twitter_share

Reply on Twitter 1366742012481966080Retweet on Twitter 1366742012481966080Like on Twitter 13667420124819660801Twitter 1366742012481966080
Load More...

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
WYCE Electric Poetry
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2021 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com