Couldn't resist trying to create a pixelbender filter for use in the Game of Life. In an article a few years ago I created a simple Life application. Pixelbender has the potential to massively increase the speed of calculations such as those used in Life, the results are obvious. On top of this the simplicity within flash is fantastic, to advance the game you simply need to apply a filter to a bitmapData object. Click to launch the app:
Showing posts with label Cellular Automata. Show all posts
Showing posts with label Cellular Automata. Show all posts
Saturday, 11 September 2010
Conway's Game Of Life using Pixelbender
Labels:
AS3,
Cellular Automata,
pixel bender
Tuesday, 22 June 2010
Von Neumann Cellular Automata
I just saw the TED talk from Stephen Wolfram below and noticed I'd never written any 1D cellular automata. He briefly mentions rule 30 and the emergence of complexity from a simple set of rules. The Von Neumann automata is very simple to write. Given a single cell, the state of the new cell (either on or off) is determined by the cells in its local neighbourhood. In one dimension this means the state of itself, the cell just to its left, and the cell just to its right. This means there are 8 possible states for local neighbourhoods (8 rules) and therefore 256 possible outcomes of the system.
As Mr Wolfram mentions in the talk, most of the outcomes are not particularly interesting, some are very plain and some are quite pretty. Below is rule 26, it looks nice but beyond that it is quite a simple rule. Self repetition on a number of different scales is pretty much all it is capable of. Just click the image to launch it.
The next two examples are rule 30 and rule 110 respectively. These are extremely interesting. Rule 30 displays what Wolfram calls "Class 3" behaviour, which is a chaotic and seemingly random, whereas Rule 110 displays "Class 4" behaviour, which is neither completely random nor completely repetitive. The interaction of various local structures is used to prove Universality. Again just click the images to launch the programs!
Rule 30 can be used as an excellent random generator:
Notice the life-like region travelling up near the centre in Rule 110:
As Mr Wolfram mentions in the talk, most of the outcomes are not particularly interesting, some are very plain and some are quite pretty. Below is rule 26, it looks nice but beyond that it is quite a simple rule. Self repetition on a number of different scales is pretty much all it is capable of. Just click the image to launch it.
The next two examples are rule 30 and rule 110 respectively. These are extremely interesting. Rule 30 displays what Wolfram calls "Class 3" behaviour, which is a chaotic and seemingly random, whereas Rule 110 displays "Class 4" behaviour, which is neither completely random nor completely repetitive. The interaction of various local structures is used to prove Universality. Again just click the images to launch the programs!
Rule 30 can be used as an excellent random generator:
Notice the life-like region travelling up near the centre in Rule 110:
Labels:
Cellular Automata,
Fractal,
mathematics,
procedural generation
Sunday, 10 May 2009
Conway's Game of Life
I have always been interested in the way massively complex systems can be produced with only a few controlling rules. One famous example is boids where pixels follow the rules of separation, alignment and cohesion, and end up creating an amazingly realistic model of flocking birds. Another example is Conway's game of life which was created sometime in the early 80s I think. The rules are simple:


Any occupied cells surrounded one or fewer occupied cells dies , as if by loneliness.
Any occupied cells surrounded by 4 or more occupied cells also dies, as if by overpopulation.
Any empty cells surrounded by 3 occupied cells becomes occupied.
Anyway the results are pretty cool. You can draw your own starting state cells or pick some presets from the drop down menu.
The gosper glider gun is my favorite preset.
Here is the initial stage of the gosper glider, the result of the basic gliders which float up into the other cells is to produce an infinite cycle.

This is a stage later in the cycle where loads of gliders are constantly produced by the 'gun'. Very cool!

Unfortunately this will be my last post for a while as I am about to sit my dreaded second year exams. Wish me luck :).
Labels:
AS3,
Cellular Automata,
Emergence,
procedural generation
Subscribe to:
Posts (Atom)