Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   Principia Mathematica (http://zelaron.com/forum/forumdisplay.php?f=385)
-   -   The cellular automaton exploration thread! (http://zelaron.com/forum/showthread.php?t=52490)

Chruser 2013-02-07 08:07 PM

The cellular automaton exploration thread!
 
First a bit of (somewhat technical) background information. You can skip the next few paragraphs if you just want to look at some of the results. The link above the images will let you create some of these on your own!

A cellular automaton is an idea created by John von Neumann and Stanislaw Ulam (two of the guys who worked on the Manhattan project) in the 1940's. As Wikipedia explains,

Quote:

Originally Posted by Wikipedia
A cellular automaton consists of a regular grid of cells, each in one of a finite number of states, such as on and off (in contrast to a coupled map lattice). The grid can be in any finite number of dimensions. For each cell, a set of cells called its neighborhood (usually including the cell itself) is defined relative to the specified cell. An initial state (time t=0) is selected by assigning a state for each cell. A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood. Typically, the rule for updating the state of cells is the same for each cell and does not change over time, and is applied to the whole grid simultaneously, though exceptions are known, such as the probabilistic cellular automata and asynchronous cellular automaton.


One of the simplest types of cellular automaton is referred to as elementary cellular automaton, or "Wolfram code". The basic idea is that you have an infinitely large (2D) square grid (of cells) filled with "off" (0) states. You then assign a number of cells on one of the lines as "on" (1) states.

The next step is to iterate through the cells on the line below, from left to right, one cell at a time. For each cell, the three cells above (top left, top, top right) are looked at. Depending on the eight possible states of these three cells, an "on" or "off" state is assigned to the current cell. This behavior is repeated for the next line, then the next, and so on.

Since there are two possible ways to set the state of the current cell for each of the 8 combinations of cells above, there is a total of 2^8 = 256 unique "rules" for how the cells will change, each of which is referred to as a Wolfram code. See Wolfram's rule 30 for a striking example of the type of complex pattern that can emerge from this.

Around a year ago, I was bored, so I generalized this system a little. The idea is to start at a cell of an infinite 2D grid, then move outward in a spiral, and for each step along the way, look at the neighboring 8 cells, and determine the "on" or "off" state from them. There are 2^256 such rules, which is roughly the same number as the number of atoms in the observable universe. (For symmetry reasons, there are actually a bit fewer.)

The end result is similar to using four (not necessarily unique) instances of Wolfram's rules in four different directions (up, right, down, and left), but with some interaction along the "edges". The examples below will make it clearer what this means.

I wrote a simple Java implementation of this system back then, too, which spirals outward in a clockwise direction. If there's some interest, maybe I'll be nice enough to add a "save image" button to it. For now, if you're bored enough, you can try out the user-unfriendly version. Refresh your browser to generate a new random rule, and see the corresponding drawing. It usually takes 10-30 tries to find something interesting.


Try it here: http://zelaron.com/apax/Grid.html


Below are a few of the results I've found so far, which I think are curious for different reasons:

Chimneys of an alien industry:

http://zelaron.com/apax/Bergsattack.gif


Seaweed growth:

http://zelaron.com/apax/sjogras.gif


Get out of here, sine wave:

http://zelaron.com/apax/FractalWaveform.gif


Not sure what to make of this, but I like the alignment of the rectangles:

http://zelaron.com/apax/BlueprintZoneHires.gif


Highway construction. (It reminds me of another type of cellular automata, Langton's ant):

http://zelaron.com/apax/HighwayConstructor.gif


If you find anything interesting, I'd love to see a screenshot of it!

Grav 2013-02-08 06:18 AM

Pretty cool, for that second to last one I definitely see a municipal facility like a new metro station or a college campus.


All times are GMT -6. The time now is 03:47 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.