The Interactive WaTor simulation is an Ecological Simulation that can be controlled and altered by multiple users. |
The rules of the simulation are as follows: two populations of sharks and fish are randomly scattered across a wrapped-around rectangular ocean in each simulation step a fish tries to move at random into one of not occupied neighboring ocean cells a shark looks for a fish in the 4 adjacent cells, and eats at random one if one or more of the cells are occupied both populations produce offsprings at the rates set by simulation parameters sharks can survive without eating a fish for a period defined by another parameter, fish don't eat anything |
The multithreaded, parallel implementation uniformly distributes regions of the ocean between different processors. These regions are then further divided between processors' threads. Each thread runs a region, and exchanges boundaries with neighboring threads via channels. |