Prey predator system with openCL
Loading...
579
views
Loading...
Uploader Comments (pballet)
see all
All Comments (3)
-
@joertjoert The predator eats till there is little to eat then dies off. Then the prey grows back dew to lack of predators. After the predators grow back dew to an abundance of food... Keeps repeating.
Loading...
What exactly is it doing? The green guys are eating the red ones, this much I gather. but could you explain this more precisely?
joertjoert 2 years ago
@joertjoert, the algorithm is:
1- choose 1 pixel at random.
2-if the pixel is red (prey) it can die with a probability 0.01 (the pixel is then black); go to 1
3-if the pixel is green (pred) it can die with a probability 0.02 (the pixel becomes black); go to 1
4-eaten prey: if the pixel is red (prey) and surrounded by n1 green pixels (predator), the red pixel becomes green with proba p1=n1*0.1
5-reproduction: if the pixel is black and surrounded by n2 reds, it becomes red with proba p2=n2*0.01
pballet 1 year ago