Skip to content

A ClojureScript implementation of the famous population dynamics simulation devised by A.K. Dewdney.

License

Notifications You must be signed in to change notification settings

saidone75/wa-tor

Repository files navigation

Wa-Tor

A population dynamics simulation devised by A.K. Dewdney, loosely mimicking the Lotka–Volterra equations

Based on the original article appeared on the December 1984 issue of Scientific American

Live version here

wa-tor

Usage

  • spacebar or "two fingers tap" to pause/resume the game
  • "C" or "swipe left" to clear the board and pause the game
  • "R" or "swipe right" to reset the board with the current parameters
  • "P" or "swipe up" to toggle the control panel
  • "S" or "long touch" (> 2s) to show statistics

When paused click on a square to cycle between water >>> fish >>> shark

From the control panel you can set the initial number of fish and sharks, their breeding thresholds, sharks lifespan without food and extra randomness for thresholds:

control-panel

stats

Deploy your own

Get the sources:

$ git clone https://github.com/saidone75/wa-tor.git

build with:

$ cd wa-tor
$ lein do clean, fig:min, assemble
[Figwheel] Validating figwheel-main.edn
[Figwheel] figwheel-main.edn is valid \(ツ)/
[Figwheel] Compiling build wa-tor to "resources/public/wa-tor.js"
[...]
Writing  target  ->  wa-tor-1.4-archive.tgz
Done creating assembly

then just copy/expand the archive into a web server

License

Copyright (c) 2020-2024 Saidone

Distributed under the MIT License

About

A ClojureScript implementation of the famous population dynamics simulation devised by A.K. Dewdney.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published