   Nature, ecology and agriculture simulation
  The old thread  has been retired, so I'm creating a new one in order to add that I have found a few resources. I haven't done much in the way of design yet, other things have taken precedence, but if you're interested in this sort of modelling it would be nice to hear your thoughts on how to go about implementing the following paper or something similar in a game.   
  A cursory look over document mentions cells, implying discrete simulation over an area. I don't know if that is used as representation, but cell-based simulation would look something like this:while (running) {  for (every cell) calculate_factor_contributions;  for (every cell) apply_contributions;};calculate_factor_contributions is whatever your simulation is. For example, fertility calculated from water supply in cell(2,7) and its neighbours contributes 0.02 nutrients to cell(2,7).In apply_contributions, you would then grow a plant based on nutrients in cell, or plant_size += nutrients.Then it's just a matter of simulating each contribution, which is what the formulas in the article apparently do.Simulation could be organized differently, with actual plants being used instead of cells, and environmental effects being applied based on geographic and other factors in that affect each individual plant, based on its location.   ;  Cells and discrete simulation would seem perfect for a tile-based world.Is this sort of simulation in general suited to multithreading, where the cells are treated in parallel?The article seems well-rounded, still I wonder if they left something important out.   ;  I've been taking a stab lately at trying to get what I've been calling an ecosystem functioning.  It's nowhere near as complex as detailed in that paper.  But then again, my goal isn't so much to model nature as it is to create a code base for systems I can eventually use in a game.  But I do want to have it so that there is a food chain and that chain can get disrupted by various actions.Right now I have some abstract, simple plant growth that fish and insects can use as food to stay alive.  I still need to impliment systems so that insects can search for food and so that fish can eat insects.  I think once I have that worked out I should be able to add more types of animals to the food chain and see how everything interacts.I do want the vegetation to play a large part in the smaller animal's food supply (thus affecting larger preditors) and ultimately I'll be refining vegetation growth with modifiers for water, temperature, and some simple composting.  But that seems to be just adding and applying different formulas.  The more complex behaviors are the creatures reactions so I'm focusing there lately.My project notes are nowhere near as formal or organised as the paper you provided but feel free to look them over.Project notes;Quote:Original post by captain_crunchIs this sort of simulation in general suited to multithreading, where the cells are treated in parallel?That depends. While such designs are inherently parallel at low level, expressing certain interactions can be difficult, or prone to errors, especially with dynamic entities.As long as you deal with primarily static objects (trees, grass, etc..) affected by outside factors, then there are no problems. Dealing with highly interactive objects (a swarm of locusts pillaging a field) however turns to be very difficult do to artifacts that arise from lock-step nature of such simulation.Clojure's introduction included ant colony simulation aimed at solving many of the problems that arise in such systems. Not a silver bullet, but a different take on similar topic.   