After observing that the evolution didn’t handle over population well I increased the size of the simulation, increasing the grass by a power of 2. This allows enough space for separate ‘flocks’ so if one overeats the surviving flocks tendency to not overeat is rewarded.
Added in a bit more functionality today. The rate of breeding and the frequency of eating is now determined by traits of the animal. These traits restrict actions and mock intelligent behavior. Such things as “I’m not that hungry, I’ll leave the sheep for later” are now possible because of this. These traits are also driven per animal and are passed down to offspring with a chance of mutation. So, hopefully, the simulation will work towards stabilizing itself.
I’ve added rivers and climates into the simulation. Grass grows quicker the closer it is to the equator and or a river. Sheep can enter rivers but don’t like it and can’t feed in it so they leave quickly most of the time.
I also made a new area for information at the top of the screen so the text doesn’t cover up the simulation.
After having a discussion about predator prey simulations at work yesterday I felt the need to make one. Nothing fancy yet – just sheep that eat grass and dragons that eat sheep. Mostly a PoC at this point, but I might come back to it and do more.
I should probably look at having permalinks and actual pages for my projects at this point. Maybe tomorrow?