Team:HZAU-China/Modeling/Cellular automata


Cellular automaton


To know how the number of immunized dogs changes over time.


1. Define the cellular automaton;

2. Determine the related parameters of cellular automaton;

3. Determine the rules of cellular automaton;

4. Analyze the results of the model.


Cellular automata are discrete dynamical systems that can simulate complex behaviors by animating cells on a lattice based on simple, local rules. There are numerous applications of cellular automata, such as simulating traffic flows, network transmission and digital music. In our project, cellular automata are used for modeling the spread of immunity in stray dogs.

Definition of the cellular automaton:

Cell: An individual stray dog.

Cellular Space: A collection of cells distributed in a 2-dimentional space. The cellular space is divided into square lattice. Suppose the size of the cellular space is N = m*m where m is the number of rows (columns) and 100 in our model.

Cellular State: Assume that the state variable of the cell is Sij(t) where i and j indicate row i and column j in the cellular space and t is time. S has 3 values of {0, 1, 2} where 0 represents a dog without immunity and 1 represents that a dog is in the process of obtaining immunity and 2 represents a state that a dog has been immunized to the rabies virus.

Neighbor: In our model, the dimension of the cellular space is two. Around each cell, there are eight cells as neighbors. So the current states of the present cell and its 8 neighbors determine its state of the next moment.

Figure 1. The cellular neighborhood.

Initial Configuration: A certain number of dogs that have been immunized by our engineered bacteria are put randomly in an area at first moment.

The ability for spreading immunity: A dog has the ability to spread immunity if it is in the process of obtaining immunity or has been immunized. The variable for the expression of this ability is PRO whose values are between 0 and 1.

Value: If PRO increases to value1, the state-1 will turn to state-2. If PRO decreases to value2, the state-2 will turn to state-1.

The duration for a cell to maintain its state: The time for a cell to maintain its state in state-1 and state-2 are expressed as T1 and T2, respectively. Staying in different state, a cell has different ability to spread the engineered bacteria.

Evolution rules:

Free Walking: A certain percentage of cells will walk freely before every update. The cells which will travel are randomly selected. The travel distance is a random integer ranging from 1 to 20.

Updating Rules: The state transition of a cell depends on the current states of itself and its neighbors. The impact of a neighbor on the transition rate (PRO) of the present cell is inversely proportional to their Euclidean distance. The Euclidean distance of adjacent cells is 1 while that of a diagonal is . k is the spread coefficient that mesures the degree of impact that the adjacent neighbor cells have on the present cell.The calculation formula of PRO is as follows:

The rules of update are as follows:

We assume that the value of k is 0.01. With the increase of the number of initial immune dogs, the time needed for an area to reach a safe level (70% of the dogs have been immunized) is decreased. If we want the area to reach a safe level in 100 days, the percentage of immune dogs initially put should be larger than 1.2%.

Figure 2. The time (number of days) needed for an area to reach a safe level in response to the change of the initial percentage of immune dogs.

Suppose the amount of initial immune dogs is 1.2%, the simulation results are as follows:

Figure 3A. The initial distribution of immunity.

Figure 3B. The immunity distribution after 36 days.

Figure 3C. The immunity distribution after 157 days.

Figure 3D. The immunity distribution after 410 days.

The celadon cells show the dogs is in state-1 and the bright green cells show the dogs is in state-2. The dog in state-2 has higher immunity. Initially, we put a certain percentage of immune dogs (in state-2) into an area. The immunity will spread around centered on the immune dogs. Figure 3C shows us that the dogs in the area are in higher level of immune state. Subsequently, the immunity comes back to a lower level. Then, it returns to high level again. The immunity will fluctuate but with a decreasing amplitude. If the value of PRO is higher than value2, the dog has immune power. As the extension of time, the immunity of the whole area converges to a certain level.

The simulation result is shown in Figure 4.

Figure 4. The time course of the percentage of immune dogs in an area.


1.Cornell University BioNB 441Cellular Automaton in Matlab:

2.YU Lei, XUE Huifeng et al. Epidemic spread model based on cellular automaton. Computer Engineering and Applications, 2007, 43(2):196-198. (In Chinese)

3.YuXin,Duan Xiaodong et Cellular Automaton Model to Simulate the Infect of the Epidemic Diseases Computer Engineering and Applications ,2005.2 205- 209. (In Chinese)

4.WHO (2010) Rabies, Available: Updated September 2010.Accessed 2011 Jun 1.