@moopli - I agree that we need to move the conversation forward, and realise that some of what I’m about to say has been discussed before, but I’m hoping that I can clarify a few points which should make further decisions easier. I’ll try and discuss new stuff at the end of the post/next post.
I largely agree with the summary in the OP. We’ve discussed before whether we should calculate population from compounds or vice versa, I’m in favour of the reverse because it allows us to represent over- or under-nourished populations, but as per the post above, do we really need (and can we use) that much detail? The only obvious use is as a measure of fitness - if all (or the average) individuals are under their blueprint weight, then its species is struggling. We have alternative ways of measuring fitness though, such as birth/death rate. It could also help models forms of predation which aren’t absolute (a kills b, eats b, b’s population goes down by x per y population of a), such as parasitism (a feeds on b, b’s average weight goes down by x% per y population of a), though again, averaged over a large enough population there’s not much difference between the approaches.
Regarding patch shape, I discussed this on slack some time ago. Having regularly shaped (square or hexagonal grid) patches simplifies some things, but both misrepresents the actual shape of biomes*, and is a waste of resources where some biomes are large and uniform, and others much smaller (forcing a high resolution). What we’ll most likely use is an irregularly shaped map, with each patch representing a subregion of a biome (i.e.: each patch is uniform, each biome may contain many patches). A rough algorithm for this is to use a particle swarm, with each particle avoiding others, and more strongly avoiding biome boundaries, and then using voronoi to create a patch around each particle. e.g.: http://www.wblut.com/blog/wp-content/2008/04/voronoi-2696.png (note that this image appears to be a nested voronoi, which is cool, and gives me all sorts of other ideas, but what I’m suggesting here is just a plain voronoi). This doesn’t work great for the oases in the desert scenario (as oases are small, discrete biomes, we’d need a patch for each one, which is ok, but the voronoi structure of the desert around it would be wasteful), which can be solved either by tweaking the patch generation algorithm, or by handling intra-patch variation (will get onto this later).
- clarification: the game won’t have defined biomes, I use biome as a shorthand for a contiguous area with a relatively uniform set of environmental conditions.
As for the question of migration, and the resulting compound flow between biomes, I think its necessary for the migrants to take their compounds with them (which should be a relatively small % of either patches’ contents). I also think its necessary for some compounds to be mobile between patches (anything atmospheric or dissolved in a common waterbody, not so much anything contained in the soil, unless we model rivers to the degree necessary to move soil nutrients around), which should prevent depletion or build up of most, but not all compounds. In the remaining cases, would it be unrealistic if migration to more favourable neighbouring patches caused a depletion of nutrients (i.e.: proteins etc, mostly contained either in living things or soil detritus) effectively turning a patch into a wasteland?
One part of the OP I don’t agree with (along with some of its implications), is the idea of a patch having species ‘slots’. This derives from a very old and outdated concept, where each patch would have a number of small/medium/large plant/herbivore/carnivore slots (in order to force a food chain, which we no longer need to do thanks to population dynamics). The idea has probably persisted because we often refer to the 30 species limit per patch (which is a computational, rather than design limitation, as species interactions scale as the square of the number of species, we can probably have a few dozen species per patch, but not many more). What this specifically doesn’t mean is that a patch is underfilled if it has less than 30 species - i.e.: I don’t think migration should be more likely, or speciation possible, if a patch has less than N species. Migration should be a mostly random occurence, controlled by whether the migrating species can succeed in the target patch (either by checking this before allowing migration, or migrating regardless and then seeing if it survives long enough to become established). In effect the habitability of a patch should control the number of species present, not an arbitrary target. We may need to set a hard limit of 30 species to prevent any patch becoming too large, but that’s all it should be used for.
For speciation, I don’t think its realistic for this to happen within a patch, as no real population arbitrarily divides itself in two and the evolves differently. Unless theres a geographical seperation, or the subspecies are already too distinct to interbreed, crossbreeding will keep the two populations genetically mixed. I think the separate mutation of populations in different patches is enough to model speciation, we shouldn’t also be doing it within a patch.
Regarding diffentiation within a species (beyond simple size), I’ve always wanted to treat different life stages as separate populations, so that for a species you have, e.g.:
- a population of eggs, that has no interaction with its environment (other than being a food source), is added to by reproduction, and removed from by hatching
- a population of helpless infants, fed (parasitically) from the adults, added to by hatching, removed from by maturation, very easy to catch/kill
- a population of pre-reproductive juveniles, that are able to feed for themselves, somewhat more capable of defending themselves
- a population of reproductive adults, that produce eggs, and feed infants
- a population of post-reproductive adults, which may be more frail, but may also help feed infants
This significantly increases the number of ‘species’ CPA has to deal with, so it may not be computationally feasible, but if it is we have meaningful life stages, and meaningful choices about a species life history.
A few other minor points, then I’ll get onto some new/more productive stuff:
- re: [4] in OP, I don’t think theres any need to prevent over-dominance, in the same way (discussed long ago) that we don’t need to prevent over-stability in a species (e.g.: sharks and crocs, which have barely changed in millions of years). If it happens organically, there are realistic equivelants (not least of which: man, and the player may need a similar level of dominance to become civilised), we just need to avoid the model producing this situation (and many other non-fun situations) too often.
- re: the patch size during gameplay, this should be infinite. Atleast in the cell stage you shouldn’t be able to move between patches within your lifetime, this doesn’t really change until you get migrating birds/large mammals. One exception is gameplay on a patch boundary (e.g.: intertidal zone), though we can have these be separate patches, where the boundary is distinct enough to offer a new niche/biome.
Intra-patch variability is one of the major unresolved issues with CPA, especially as its results in possibly the most marked difference between gameplay and CPA simulations - in game you never interact with the ‘average’ environment, you either seek out or avoid high/low concentrations of a particular environmental variable (EV) (whether that be light/heat/acidity, or a particular compound). Averaging out the impact of variable concentrations on CPA would work if the position of individual organisms was uniformly random, and the distribution of each EV underlying the spatial positions of members of a population also uniform (or normal) random. The problem is two-fold, 1: as above individuals react to these EV’s, either seeking out or avoiding them, so that the relationship between the population and each EV is not independant, 2: likewise, EV’s aren’t independant, it’s likely to be warmer where it’s lighter, oxygen concentrations will be higher where theres light, CO2 concentrations are likely to be higher where oxygen concentrations are lower, and some EV’s will have concentrations dependent on two or more other EV’s, or not simply proportional (e.g.: a compound which is rapidly produced from two others, by process bacteria, would be most concentrated on the interface between a high concentration area of the two compounds, but would prevent those compounds from ever being in high concnetrations together). Because of this, we cannot simply average according to overall concentration, or by trying to calculate the proportion time spent, by what proportion of the population, in high and low concentrations of each compound, because those times aren’t independant.
Example:
If 50% of a patch is high in O2, and 50% of that patch is high in glucose, time averaging would suggest your spending 25% unable to respire (o2 + glucose -> co2 + water) because you have access to neither, 25% with o2 but no glucose, 25% with glucose but no o2, and only 25% with both available. Most likely, o2 and glucose concentrations will be related, as they come primarily from the same source (photosynthesisers), and you’d end up with roughly 50% of the patch suitable for respiration. Moreover, that population, if it is an obligate aerobe, will spend as much time as physically possible in that area, leading both to an association between that species presence and those conditions (which would affect other species’ interactions with it, e.g.: largely preventing predation of/by an obligate anaerobe), and a nearly 100% time spent able to respire, even though the average methods suggests it’d be 25%.
Something similar happens when 10% of a desert is oases, where there is a discrete association between several EV’s, species, etc. In that case this could very easily be handled with separate patches, but there will be many more fuzzy/continuous examples where splitting into patches isn’t an option, and a solution to the latter would also potentially solve the former.
The question then is whether we can deal with this? There’s no chance of mapping out all these relationships beforehand, especially as many of them will be changed by the species present. I can see ways of detecting/calculating many of them, but the amount of complexity this would add to CPA is a little intimidating. It does have one important benefit though - it would take a lot of input from species’ behaviour, what they avoid, what they seek out, where they like to rest/eat/congregate, what conditions they find acceptable for hunting, to some extent even whether the extend to which they behave as a herd. That information is something we’ve previously had difficulty fitting into CPA, and that would create another disconnect between gameplay and simulation.
Finally, the predation equations. We’ve been procrastinating on these for nearly two years (since the original population dynamics thread on the old forums), at first because a lot of detail is needed to make them work in an interesting way, and a lot of work to keep everything balanced, more recently because of the decision to slave gameplay to CPA, and the resulting need to have the feedback into gameplay be both meaningful (i.e.: fun) and consistent/intuitive (i.e.: if you identify a weakness in gameplay, it should be relatively easy to pick a mutation that will help). Note that the above applies to all of the population dynamics equations, not just predation, but most of the others (e.g: compound absorbtion, excretion, basic metabolism, reproduction, mortality) are conceptually simpler because they only take into account a single species and its environment.
…at this point I’ve run out of time to write much more. Reading this thread, and writing the above, has made me realise just how much more work is needed before we can even write the CPA system implementation, I had thought that most of what needed to be done was fleshing out the data: what compounds will we have, what organelles, what processes, what kind of mutations/adaptations, what kind of inter-species interactions, etc. I’ll try to read up and reply on the other relevant threads on this forum, and perhaps start hashing out some predation equations in a new thread soon.