JavaScript Cellular Automata

Over the last few days I have started learning JavaScript. Creating a simple 2D cellular automata seemed like a good start.

The cells in an outer totalistic CAs get updated based on their 8 immediate neighbouring cells surrounding them. The most famous example would be John Conway‘s Game Of Life.

To see the results of the Outer Totalistic Cellular Automata click here. A bit of CSS to pretty things up and there it is. There is a drop down list of preset rules to show the sorts of emergent behavior that can arise from cellular automata.

If you are interested, the source code is available here.

So far JavaScript has been a relatively pleasant experience. Most of my time was spent on the “how to do” rather than the “what to do”. Once you know the basics of programming any new language mostly comes down to syntax.

Jason.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s