15.08.2015 Views

Introduction to the Modeling and Analysis of Complex Systems

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11.3. SIMULATING CELLULAR AUTOMATA 193Figure 11.6: Typical behavior <strong>of</strong> <strong>the</strong> most well-known binary CA, <strong>the</strong> Game <strong>of</strong> Life.There are existing s<strong>of</strong>tware <strong>to</strong>ols 2 <strong>and</strong> online interactive demonstrations 3 already availablefor cellular au<strong>to</strong>mata simulation, but it is none<strong>the</strong>less helpful <strong>to</strong> learn how <strong>to</strong> develop a CAsimula<strong>to</strong>r by yourself. Let’s do so in Python, by working through <strong>the</strong> following examplestep by step.The CA model we plan <strong>to</strong> implement here is a binary CA model with <strong>the</strong> droplet rule[4]. Its state-transition function can be unders<strong>to</strong>od as a model <strong>of</strong> panic propagation amongindividuals sitting in a gym after a fire alarm goes <strong>of</strong>f. Here is <strong>the</strong> rule (which uses <strong>the</strong>Moore neighborhoods):• A normal individual will get panicky if he or she is surrounded by four or more panickyindividuals.• A panicky individual will remain panicky if he or she is surrounded by three or morepanicky individuals. O<strong>the</strong>rwise he or she will revert back <strong>to</strong> normal.Note that this rule can be fur<strong>the</strong>r simplified <strong>to</strong> <strong>the</strong> following single rule:• If <strong>the</strong>re are four or more panicky individuals within <strong>the</strong> neighborhood, <strong>the</strong> central cellwill become panicky; o<strong>the</strong>rwise it will become normal.Here are o<strong>the</strong>r model assumptions:• Space: 2-D, n × n (n = 100 for <strong>the</strong> time being)• Boundary condition: periodic2 Most notable is Golly (http://golly.sourceforge.net/).3 For example, check out Wolfram Demonstrations Project (http://demonstrations.wolfram.com/) <strong>and</strong>Shodor.org’s interactive activities (http://www.shodor.org/interactivate/activities/).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!