An Ai Boids Simulation modified to closely resemble the ecosystem of a river or small stream. There is a constant force (water current) that pushes every boid as well as the floating food. The smaller boids, considered prey, will search for and eat the floating food. They will also school together as would a group of small fish. Larger boids, considered predators, will hunt and eat the smaller boids. They will not school together and mostly hunt alone. They may work together to surround their prey though, as this has been observed. Boids will grow when they eat, with a limit that represents their species maximum size. Each boid can only detect objects and other boids when inside of its visual range. This can be modified. Objects can be added to the river as well. These may represent large stones or underwater plantlife. The smaller boids may use these objects to escape from predators. The disperse button simulates a loud noise or something that would frighten a school of fish, causing all schooling boids to seperate and frantically swim around. The default parameters set for boid speed and visual range closely represent a somewhat realistic experience. Its quite possible you may find a better solution, as this area has mostly been untested. The grid is optional and turned on by default. Maximum numbers for boids are not recommended, as this is millions of computations per second and may cause performance issues. This is included for your indepent experimental research purposes. Created with ZimJS Framework. zimjs.com Enjoy!