New CPA system with auto evo


#1

I got the new CPA system prototype working! Each dot is a population (time is on the x axis and pop on the y). The two numbers next to the dot are how many chloroplasts it has followed by how many chemoplasts (e.g. 2 0 means 2 chloro + 0 chemo).

The green lines at the top mean a mutation has taken place and a yellow line means a species has been spit to keep the patch numbers up.

The way it works is that each turn the sunlight is divided equally between all the chloroplasts in the patch. This is your energy income. You also have to spend energy maintaining your population and the dynamics are a simple differential equation which maintains this balance. Basically

change in population = small number (energy income - energy expended maintaining pop)

Then there are random mutations made to each species. I was a bit concerned about the previous idea of “offering each species 5 changes and choosing the best” as I was concerned all the species would end up the same. Moreover, with that system, all the organelles need to be included in the energy model or they will be cut for efficiency. With pure random mutation there is still a driving force which is pushing the species towards being pure photosynthesizers (as you can see there is no hydrogen sulfide in the patch).

About 1 minute in you can see the blue species randomly get rid of it’s chloroplast and die out because of that :slight_smile: :slight_smile: :slight_smile:

All feedback welcome. I think this might be a productive path, it’s all very simple and lets the species adapt to any environment dynamically.


#2

Looks awesome @tjwhale illl check out the video after I get out of bed and get ready for the day


#3

I feel like the species should attempt to mimic natural selection instead of the energy balance being used to update the population. I guess this system could also do that with the different species emerging when some die out. But I’d prefer a more complex equation for determining the “effectiveness” of some mutation. So merging that with my current understanding of the goals of auto evo it would work something like this:

  • when the player enters the stage (either from the editor or a new game) all the species information is gathered and sent to a background auto-evo thread.
  • Then we can do some fancy stuff as performance isn’t a huge concern. So this is how I’d imagine the auto-evo step to work:
    • For each biome split it into batches (6 * number of species)
    • Then in each patch (except the first for the species) mutate the genome and calculate how well the changed species coped against the other species in the biome
    • Then each species genome will be replaced once the player enters the editor with the one that did the best
    • And then the population simulation will be ran in each biome with the updated genomes to update population and species dying out in some biome
  • A few things that this doesn’t do is: moving to new biomes and splitting off species (I think species splitting should happen when the population of some species is separated, so it dies out in a biome that then causes the remaining biomes it is in to not be connected)
  • The player can’t enter the editor before the auto-evo is done (this can be hidden with a loading screen)

I like how your simple simulation can have fluctuating populations like that, but like I said (or have said before) we need an evolution simulation.

That’s the general overview of how I think auto-evo should work. Thoughts?


#4

I don’t like the idea of not splitting species off within the same biome as that feels very limiting.


#5

How would that work though? And can it be made realistic? To my understanding speciation occurs when breeding populations separate. And it would be possible for the new species to migrate back to the original biome.


#6

A biome in our case can be a whole ocean there is plenty of room from speciation, let’s say there is a mass die off, instead of just randomly adding new species to fill it in I think we should split remaining species to fill in the new niches that would remain realistic. You don’t need “wide tracks of land” for speciation, just isolation, and common selective pressures. And that is completely possible in a cage of all things (scientists have done studies look up fruit fly evolution experiments)(and perfectly possible within a region that is otherwise the same biome)(you only need to be separated for a couple generations to prefer your own “tribe” so to speak)


#7

Maybe the patch concept would help here, splitting biomes into smaller parts?


#8

Firstly I’m very open to all ideas, I’m glad to get a chance to discuss this.

calculate how well the changed species coped against the other species in the biome

How do you imagine doing this working? Basically what you need is a function which takes in a list of all the genomes in the patch and returns the populations of each species. That’s what the “energy model” is trying to do, it’s just trying to turn the number of chloroplasts and chemoplasts into a population number. If you have other suggestions for how to compute this then I’d be interested.

Re speciation it looks like speciation within a geographic region is reasonable. I think it’s called Sympatric Speciation.

If we are going to start the game with one species (single hex of cytoplasm) in a single patch then I think we need this to split into multiple species even before moving to other patches. It will be odd from a gameplay perspective to have just 1 species per patch for ages.


#9

(Updated my post)


#10

Ultimately I’d want to come up with quite a complex model that includes photosynthesisers / chemosynthesisers and then predators and somehow derive from the organelles of the species how well they do. Of course your simple formula could be initially put in the system I described to get something working.


#11

Yeah sounds like we’re on the same page. My thinking was something like:

If you have chloroplasts you get a share of the sunlight
If you have chemoplasts you get a share of the hydrogen sulfide
If you can move you get a share of the scavenging (which would be the only primary energy source in the abyss, for example)
If you have combat strength (maybe 1pt per pilus and 2pts per agent gland) then you get to steal some from other, weaker, slower, species (needs quite a lot of thought)

Other organelles could then be modifiers. For example a lightspot would get you a bonus to your share of the sunlight or an improved pilus would be worth more combat strength etc.

In general I think the best idea is to start as small as possible and get something that works and go from there. I was pleased earlier that if I changed the patch to 0 sunlight and 1000 H2S the cells slowly evolved to have less chloroplasts and more chemoplasts, it’s not perfect but it works. If you, or anyone, wants to make a different prototype going in a different direction that’s fine with me.


#12

Ayy, we need to be careful (if the selection prefers toxins you would eventually just get a cell with lots of toxins , and no pilus for example)

Edit: just watched the video it’s great to see visual competition between different species


#13

This is quite cool. So I was working on this a bit more today (have made slow progress in general). If you watch this video the most important stuff is happening in the very top left.

Sunlight = 1000 (23)

means the amount of energy coming in from sunlight is 1000 units and the number of chloroplasts is 23. It’s the same with HtwoS for how much hydrogen sulfide there is an how many chemoplasts.

Periodically the patch changes from 1000 sunglight and 0 H2S -> 0 sunlight and 1000 H2S (which is obviously totally unrealistic). What you can see is cool though is that the species adapt and the amount of chloroplasts and chemoplasts adapts to the environment. When there is a lot of sunlight and no H2S the amount of chloroplasts is high and chemoplasts is low.

So this already means we could have a load of different biomes and just run this sim on them and it would make cells which are somewhat adapted to them.

I think maybe the amount of random mutation needs to be decreased and a more intelligent selection system would make this all smoother, but I don’t want every species becoming the same. Anyway nice bit of progress :slight_smile:


#14

Random is fine as long as species that randomly are less adapted then others in an environment go extinct and those that randomly are adapted survive and split off several new species so we have some actual natural selection (as you know, hopefully ,evolution is random but those who are better adapted are the ones who survive, and reproduce to create more better adapted creatures and so it isn’t actually random due to natural selection, those who survive evolve to be better and reproduce those who are badly adapted go extinct and eventually only the well adapted ones actually survive )