Algorithm:
 

Active Walker Model:
 

The active walker model was first proposed by Lui Lam and Rocco Pochy[3], and has been successfully used to describe growth phenomena in a variety of systems such as river formation, ant swarming, polymer reptation, and rough surface formation [4].The basic idea of an active-walker model is simple.Instead of having walkers moving on a uniform landscape (or potential surface), the walkers change the landscape according to some landscape rule and update the landscape at every time step:
 


 

where V1 (i, n) is the landscape at site ri at time n and W is the landscaping function as a function of the relative location of active walkers to the site ri.Once the landscape has been updated, each walker takes a step according to some stepping rule, which can be either deterministic or probabilistic[3].
 

In our study of bacterial colonies, we model bacteria as walkers.Following Ben-Jacob et al [2], we define each walker as a mesoscopic unit containing 103 -104 bacteria, since it is computationally impractical to deal with individual ones in the whole colony, which consists of up to 109 bacteria.Each walker is characterized by its location (xi, yi) and internal energy wi.The landscape is the nutrient (peptone) concentration c(r,t), which is represented by a concentration matrix over the square lattice.
 
 

Walkers:
 

At each time step, each of the active random walkers performs an off-lattice random walk of step size d at an angle theta, which are randomly chosen from the range d in [0,dmax] and theta in [0,2pi] respectively and the new location is given by
 


 

As a walker moves, it loses energy at a fixed metabolism rate e and has to keep up its activity by consuming nutrient at a fixed rate cr.   If the nutrient is not sufficient, it just consumes the available amount.  When the internal energy increases to a threshold tr, the walker divides into two and gives part of its internal energy to the new one.  On the other hand, when the internal energy drops to a low limit, the walker becomes stationary, which we define as "inactive".  Thus the time evolution of the internal energy wi is:
 


or in a discrete description:
 


where wi(n) represents the internal energy of the ith walker at the nth time step.
 

As explained in the introduction, bacteria move in a well-defined envelope, i.e. lubrication layer, the mobility of which is directly associated with the hardness of the substrate surface. This is represented by defining a threshold collision time Nc. When a segment of the envelope has been hit by walkers Nc times, it moves one lattice step and lubricates a new area. One of the goals of our simulation is to see how the substrate hardness affects the pattern and growth velocity of a bacterial colony.
 
 

Nutrient:
 

At each step, the landscape is updated according to the diffusion equation for the nutrient:
 
 


where Ds is the diffusivity of the nutrient (10-4 -10-6 cm2/s).  We used a zero flux boundary condition in our simulation, i.e. there is no nutrient diffusion at the edge of the lattice.  This boundary condition reflects the limited availability of peptone in the petri dish.
 

In our simulation we varied the nutrient levels from a high concentration, the amount to support 10 walkers on each lattice point, to a low concentration, the amount to support only one walker on each lattice point. We then studied how the fractal dimension changes with the nutrient concentration and how the growth process is limited by the availability of nutrient.
 
 

Implementation:
 

We implemented the active walker algorithm described above in C++.C++ was used because it has good support for templates and class abstraction and generates fast code.The use of class abstraction for the walkers allows the properties and actions of the walkers to be modified quickly and easily without compiling or changing any other portions of the code.For instance, walker reactions to chemotactic signaling can be implemented within the walker member function for the step.The modified class can be compiled and linked to the existing code for the other parts of the program.There is no need for a full recompile and relink.
 

The program begins with an inoculation of initial walkers onto the lattice.The walkers step randomly to a new location after consuming some internal energy and eating some peptone from the lattice.As they reproduce, new walkers are added to the "active" list.If a walker sporulates (becomes inactive), it is removed from the active list and added to the inactive list.After all of the walkers have stepped once, the diffusion equation is solved for the peptone lattice using an alternating direction implicit (ADI) method for parabolic PDE's.After this, the walkers are stepped again, and the process repeats itself.
 

Approximately 103 walkers are active near the end of a 1000 step simulation, and there may be more than 105 inactive walkers.The large number of walkers coupled with a 40,000 element diffusion lattice solution cause the program to run for ~8 minutes per run.
 
 

Scaling:
 

Since discretized time and space steps are used in MC simulations, the model parameters must be correctly scaled so that the simulation can accurately reproduce the real-life phenomena [5].A typical input parameter files looks like:

__________________________________________________________________

~Parameter input file for TestWalkers

//general parameters

size= 200

initWalkers= 20

totalSteps= 2000

diffusionSteps = 1

seed= 5

peptoneConc= 20.

lambda= 1.44//lambda is D * dt / dx**2 (unitless)
 

//walker parameters

reproThresh = 1.0

inactThresh = 0.0

maxUptake= 0.2

metabolism= 0.0667

maxJump= 0.4

initEnergy= 0.33

reproEnergy = 0.30

envelHits = 6       //Nc

_______________________________________________________________________


 
 

Yan has prepared a detailed explanation of model parameters here.