Wa-tor is a simulation of sharks and fish waging an ecological war on the torodial world of Wa-tor. It was first proposed by A. K. Dewdney in the December 1984 issue of Scientific American.
Environment
-
The world is a toroid that is displayed as a rectangular grid.
- The top and bottom edges are joined to each other: moving off the top edge puts a shark or fish on the bottom edge.
- The left and right edges are joined to each other: moving off the right edge puts a shark or fish on the left edge.
- An initial number of shark and fish are randomly placed in the world.
- Sharks and fish have a gestation period which is the number of turns before reproduction.
- Sharks have a starvation period which is the number of turns must eat before the shark dies.
Behavior Rules (each round)
Fish
- A fish moves in a random direction: north, south, east, or west if the location is clear.
- If a fish moves and gestation period has expired then a new fish is left in the previous location.
- If a fish reproduced then the gestation clock is reset.
Shark
- A shark randomly chooses a location to move first from locations that have fish, and if no fish from empty locations.
- If the location has a fish then the shark eats the fish and the hunger clock is reset.
- If a shark moves and gestation period has expired then a new shark is left in the previous location.
- If a shark reproduced then the gestation clock is reset.
- If a shark's hunger clock expires then the shark dies.
References
A. K. Dewdney. Computer recreations: Sharks and fish wage an ecological war on the toroidal planet wa-tor. Scientific American , 251(6):14–22, Dec. 1984. ISSN 0036-8733. Description of program for simulating predator-prey dynamics.
Copyright
wator.py is © 2006, Lance Finn Helsten.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA