Active Walker Code Page
Code Description
This active walker code simulates walkers moving across a lattice,
on which food is randomly distributed. Each walker modifies the
landscape by dropping a pheromone, which all walkers may interact
with. This interaction algorithm can be easily modified to represent
simple active walkers, random walkers, or two-pheromone ant models.
In order to compare properties, the program continuously drops food
on the lattice, and allows pheromone and food levels to steadily
decay at an adjustable rate. This allows the system to reach a
steady-state, so that equilibrium properties can be compared.
Code Features
Input Parameters:
- Total number of food
- Number of steps
- Number of food particles/site
- Number of walkers
- Food addition rate
- Number of pheromones (1 or 2)
- Pheromone interaction strength(s)
- Food decay rate
- Pheromone decay rate
- Greyscale normalization value for the Postscript output file
- Postscript output resolution
- Probability of forward (inertial) walks
- g(r) binwidth
- Initial random seed
- Lattice type (square or triangular)
Output Properties:
- Food collection efficiency (formatted for Analyzer)
- Diffusion rate (formatted for Analyzer)
- Number of food particles as a function of step
- Food distribution function g(r)
- Postscript plot of number of hits/lattice site
- AtomViewer-viewable coordinate files
Download the code
Here is the latest (as of 12/14/98) version of the Active Walker code:
If npher is set to 2, then it uses the following two-pheromone model:
- Scouts without food: emit A, random walk
- Scouts with food: emit B, react with A
- Workers without food: emit nothing, react with B
- Workers with food: emit nothing, react with B
Twalk is the trunk trail walking model:
- Scouts without food: emit A, react with A
- Scouts with food: emit B, react with A
- Workers without food: emit A, react with B
- Workers with food: emit B, react with A
Use the same
walk.cm and
walkps.f from above.
Wwalk is the hybrid walking model.
- Scouts without food: emit A, repel from A
- Scouts with food: emit B, react with A
- Workers without food: emit nothing, react with B
- Workers with food: emit B, react with B
Use the same walk.cm and walkps.f from above.
Compile it using the following commands:
f77 -c walkps.f
f77 -o walk walk.f walkps.o
Then run it by typing walk.
Or, you can use a little csh script I wrote makeit -- just put it in the directory with the
program files and type
chmod u+x makeit
to make it executable.
(It just runs the above two commands -- handy for saving yourself some
typing.)
I'd strongly recommend also setting the optimization flags to their
maximum values. For the EWS HPs, the flag is +O2 (e.g. f77 +O2 -c
walkps.f). (The maximum optimization is +O4, but we were having some
problems at first. It hasn't been tested since, so use at your own
risk.)
Go Back to the Active Walker Project Main
Page.
Please email questions and/or comments to: draeger@uiuc.edu