Nav:  [home][sim] > [wator]
 
Go:  [Index] [Download]

The WaTor Simulation

The Simulation


Note: This is not the original WaTor simulation as invented by A.K.Dewdney, but a modified version.
Maybe I'll implement the original version in the future.

The WaTor simulation is easily explained:
There is an ocean, that is a rectangular area of cells. Each cell is either empty (white), a fish (green) or a shark (red).
Using the Fill Parameters box you can adjust the relative density of fish, sharks and empty cells; the default is 10,3,10 meaning in 23 (=10+3+10) cells, there are 10 fish, 3 sharks and 10 empty ones once you press the Fill button. (You cannot set cells with the mouse.)

One you Start (or Continue) the sim, the time ticks start to run and the fish and sharks begin to swim around. The rules are as follows:

  • A fish will move randomly to one of the free neighbouring cells (neighbourhood is 4 cells: up, down, left, right). Every fishchild (see Parameters) time ticks, the fish will leave a child on the previous position. In case there is no free neighbour cell, the fish will not swim (and cannot get a child).
    In the current implementation, the latter case means that the fish will have to wait for the next child until its age is the next multiple of fishchild. Call it the "stress factor".
  • A shark will look for a fish among the 4 neighbour cells. If there are some, it will randomly choose one fish and eat it by moving onto the former fish cell. After having eaten, the shark is not hungry. If its age is a multiple of sharkchild, it will leave a child on the previous cell.
    Otherwise (if there are no fish in the neighbourhood), the shark goes into hungry state and moves randomly to one of the neighborig cells. A shark dies after having been sharkdead (see Parameters) time ticks hungry.

The ocean is actually torus-like, i.e. the left and right border as well as the top and bottom border are connected. Fish can move out on the top entering again on the bottom.

Running the Sim

Here you can see a screen shot of WaTor:

WaTor screen shot [10kb]

In case the sim runs too fast on your computer, so that you cannot follow anything, increase the area site to slow it down (use Area Size...).
The window on the bottom is the Statistics window which displays the number of sharks and fish; you can configure the number of entries using the buffer value (default is 1000, i.e. the last 1000 sim ticks).

Having Fun...

It probably makes the most fun to adjust the area size so that the sim runs at a decent speed (150x150 or so on an AthlonXP 1.4GHz) and then modify the Parameters while the sim is running whatching the effect. (This is best done using the scroll wheel if available).
You can make a larger value jump and see how the system stabilizes again (in case it was not too large).
I grabbed some of the extremes here; playing around you will surely find how to reproduce them...

WaTor Sim [3kb] WaTor Sim [6kb]
WaTor Sim [3kb]

Download

If you feel you need the WaTor simulation, go to the download page.


[home] [site map] [Impressum] [Datenschutz/privacy policy]
Valid HTML 4.01!
Copyright © 2003-2004 by Wolfgang Wieser
Last modified: 2004-10-04 23:01:40