Cows!
An experiment in artificial life.
A Consuming Interest in Grass
And no I'm not talking about your college roommate :D)
This simulates resource consumption. The following rules are in place:
- Cows will roam randomly, but prefer (slightly) the richest patch of unoccupied grass.
- As they move, their energy goes down.
- The hungrier they are (the lower their energy is) the more likely they are to graze.
- Grazing transfers energy from the grass to the cow.
- Grass grows back slowly unless it AND all adjacent patches of grass have been grazed to or below 10% of its capacity.
- Cows will not graze when another cows is on the same tile.
- If a cow is reduced to zero energy it dies.
- Even a dead cow will prevent a cow from grazing, so in effect it "fertilizes" the grass it is on and around.
- As cows get close to death, they move slower, so they are less likely to be the first cow to a patch of grass -- hunger can percipitate a death spiral on a crowded field, even if some or all of the "crowd" is dead cows.
Interestingly enough the first version had fewer rules -- cows grazed randomly, and ate whenever they wanted to. This created a lot of fast overgrazing. The first rule I enforced to prevent overgrazing actually had an opposite effect: when I told the cows to graze at the greenest patch of grass nearby, cows would all pile on the same tile and graze it to death! Then I prevented multiple cows from grazing on the same tile -- this created groups of cows that ran from occupied tile to occupied tile til they starved to death.
Finally I decided to just make the cows prefer greener grass -- I returned to the random walk but made it more likely that the cows woud graze on the greener tiles by weighing the random destinations slightly towards the greenest nearby empty grass tile.

Post new comment