gsw - simulate a three species individual-based ecosystem
gsw [-width integer] [-height integer] [-steps integer]
[-seed integer] [-plants integer] [-herbs integer]
[-carns integer] [-pmin integer] [-pmax integer]
[-Ep integer] [-Eh integer] [-Ec integer] [-Ch
integer] [-Cc integer] [-Pt integer] [-samp inte-
ger] [-stats] [-pfreq integer] [-noext] [-inv]
[-mag integer] [-term string]
The time evolution of an individual-based three species
predator-prey ecosystem is simulated according to the
specified parameters. The three species consist of
plants, herbivores, and carnivores (grass, sheep, and
wolves; hence the name GSW). Updates are done syn-
chronously, and each species has several parameters which
can control the life cycle, from the ability to give
birth, to the likelihood of starvation. Population
statistics of the three species can be calculated over a
subset of the entire grid.
Width of the plot in pixels.
Height of the plot in pixels.
Number of simulated steps.
Random seed for initial state.
Initial number of plants.
Initial number of herbivores.
Initial number of carnivores.
Minimum plants in vicinity to make new plant.
Maximum allowed plants in vicinity to make new
Energy of plant.
Energy of herbivore.
Energy of carnivore.
Step energy cost for herbivores.
Step energy cost for carnivores.
Number of steps to grow plant.
Size of subsample statistaics.
-stats Show statistics?
-noext Prevent extinction?
-inv Invert colors?
How to plot points.
An interesting change to this code would involve making
the the updates asynchronous, which would avoid some sub-
tle deadlock conditions that can occur in how the critters
move. Moreover, the motion of the overall system would
probably be more "lifelike".
No sanity checks are performed to make sure that any of
the options make sense.
Copyright (c) 1997, Gary William Flake.
Permission granted for any use according to the standard
GNU ``copyleft'' agreement provided that the author's com-
ments are neither modified nor removed. No warranty is
given or implied.
Man(1) output converted with