CPA Prototype


#61

Wait, aren’t those exponents negative? It looks to me like the predator species vastly outnumbers the others; which makes sense in the case of zero maintenance costs, since the top predator will slowly hoard all produced material.

Try adding a basic ATP cost, and see what happens.

Edit: Can I push my changes to the simulation? There’s the basic maintenance cost I tested out a few weeks ago, and I’m also going to try making each species have the separate lysosome pool for ingested compounds like you suggested. Or, even easier, make protein and DNA break into their respective monomers when a predation event happens – since anything that eats them would have to break it down anyway.


#62

Oh I see when I said “top species” I meant “the one with the highest population”. Yeah the exponents are negative. I should have said:

The species with the highest population has 10^59 times more biomass than the one with the least. The dominant species is a pure photosynthesizer (3 chloroplasts no weapons) and the least successful is a pure predator (4 agents + 2 pilli and no chloroplasts) so that does fit with the idea of trophic levels.

Sure I’d be really interested to see what you’ve done with it! I added a process called “Use Energy” but it doesn’t work because it never gets activated (well it will but only when the cell is low on energy).

I think if you auto breakdown the protein that gets ingested the lysosomes will really do nothing. As it is they are usually auto-evod away because they slow the species down for nothing.


#63

This is quite interesting, I turned predation way down and started each species with nuclues + cytoplasm + chloroplast and that’s it. After 130 auto-evos they are like this

Current State: F = Flagella, A = Agents, P = Pilli, C = Chloroplast, Y = Cytoplasm, L = Lysosomes, M = Mitochondria, T = Total number of organelles, O = Population:
F : 0 A : 2 P : 0 C : 1 Y : 1 L : 0 M : 2 T : 7 O : 30.0437273745 .
F : 0 A : 1 P : 1 C : 1 Y : 1 L : 0 M : 2 T : 7 O : 28.2405138447 .
F : 0 A : 2 P : 0 C : 1 Y : 1 L : 0 M : 2 T : 7 O : 30.8079513635 .
F : 0 A : 0 P : 0 C : 1 Y : 1 L : 0 M : 3 T : 6 O : 28.6296721381 .
F : 0 A : 3 P : 0 C : 1 Y : 1 L : 0 M : 3 T : 9 O : 31.5956902582 .

I have no idea why so many mitochondria and why no flagella but it’s interesting to see an arms race develop with them getting agents and pilli.


#64

Oh I see, I got it backwards.

What I did was add a function which removes a proportion of the ATP in the species bin, scaling that up based on number of flagella. It had the expected effect of reducing use of flagella, and increasing use of chloroplasts, but it’s a rather clunky solution.

Now that I know you’re cool with me fiddling with your sim, though, I’m working on a better maintenance cost calculation (a flat cost for each organelle), and a separated bin for ingested compounds, with lysosomes putting their outputs into the free bin.


#65

So I made a bunch of changes and here’s what it looks like after 100(?) auto-evos:

Current State: F = Flagella, A = Agents, P = Pilli, C = Chloroplast, Y = Cytoplasm, L = Lysosomes, M = Mitochondria, T = Total number of organelles, O = Population:
F : 0 A : 1 P : 0 C : 4 Y : 4 L : 0 M : 4 T : 18 O : 30.5777779 .
F : 2 A : 0 P : 2 C : 1 Y : 4 L : 2 M : 1 T : 15 O : 31.3338460799 .
F : 2 A : 0 P : 2 C : 2 Y : 2 L : 2 M : 3 T : 17 O : 30.85882375 .
F : 2 A : 0 P : 2 C : 2 Y : 4 L : 1 M : 2 T : 15 O : 32.4795656831 .
F : 3 A : 1 P : 0 C : 2 Y : 2 L : 0 M : 1 T : 15 O : 32.373332637 .

Good news is that lysosomes are now valuable to all the predators – we can always tweak how useful they are by changing the lysosome processing rate or compound cost or maintenance cost.


#66

That’s great. I like that. Something I’ve been doing is running it with initial conditions “each microbe gets a chloroplast, nucleus and cytoplasm and nothing else”. I think that’s an interesting way to start. See what you find.

Also I’m starting to think there is a relationship between the number of timesteps between auto-evos and the ocean mixing. So if the amount of mixing with the ocean is low then the protein which is coming out from the dying species can be instantly taken up by others and used to make more of them. So scavenging becomes really successful. I think this means you want a long time between auto-evos so that the effect on the patch as a whole can be really clear (like you getting rid of your chloroplast reduces the amount of sugar in the patch as a whole enough to make it not worth it for you, even if it increases the percentage of the patch’s sugar you have).

Whereas if the mixing with the ocean is high then the number of steps needed is less because each species is more of an island. They have to make everything for themselves so the effect of giving up the chloroplast becomes evident quicker.

Like I just ran a sim where all the microbes gave up their chloroplasts, which makes sense if the patch has sugar but they just haven’t detected that over time the amount will decay to 0 (though I guess if they can get their chloroplasts back at that point then that’s cool).

I guess in general life in a sealed bottle would be weird, because they could just make some protein and then live off that forever, passing it round between them. They would just need a simple cycle to get some atp and that would be enough. So the dynamics will be weird.

Here’s a run I did today with 1 mixing with the ocean and starting with 3 organelles per species, it’s pretty interesting how it turned out.

F : 0 A : 4 P : 4 C : 4 Y : 6 L : 0 M : 3 T : 22 O : 0.0352048791827 .
F : 0 A : 3 P : 5 C : 3 Y : 5 L : 0 M : 2 T : 20 O : 0.035887939545 .
F : 0 A : 9 P : 0 C : 1 Y : 3 L : 0 M : 3 T : 17 O : 0.496922279518 .
F : 0 A : 4 P : 8 C : 2 Y : 3 L : 0 M : 2 T : 20 O : 0.23115696353 .
F : 2 A : 4 P : 6 C : 4 Y : 4 L : 0 M : 1 T : 23 O : 0.195507877075 .


#67

Hmm, well, the ocean mixing rate technically also represents the spontaneous decomposition of compounds – however, a better way to model this might be to have compounds have a ‘stability’ parameter, that dictates what proportion decomposes (via a specified process, so for example ATP decomposes to nothing (because we don’t represent ADP in the model), and protein decomposes to amino acids and a bit of CO2 and nitrates).

It might even be a good idea to add these sorts of constant turnover processes to all compounds, whether locked, free, or environmental; though in that case we’d need different processes for their degradation (for example, protein turnover in living cells is more rapid than it would be from abiotic processes breaking it down alone; and it’s degraded into amino acids via controlled processes, rather than uncontrolled oxidation).

Anyway, that aside, I think the result looks pretty good; apart from the near-total lack of flagella?


#68

Yeah well with flagella it’s important how strong the “speed discount” is. So if it’s high then you outrun most of your predators and it’s really great to be fast leading to a speed arms race. However if it’s low then it’s much better to have weapons so I guess we need to find the right intermediate level where it balances.

I wondered about putting in bacteria to do the degradation. So the rate of degradation is proportional to the population of bacteria (which grows as they degrade stuff, which to them is eating). But I didn’t really want to put in another non-linearity when the model has been so unstable thus far.

One thing I was wondering about is how often Auto Evo will run. So it depends how frequently it will run but in a 5 species patch each cell only gets modified 1 in every 5 times auto-evo runs. So if auto evo runs each time the player goes to the editor, and you go to the editor every 5 minutes, that’s only 12 AE’s per hour and that’s 2 and change for each cell. So yeah it’s going to take hours and hours of gameplay to go from, say 3 organelles to 20 (in fact approximately 8 hours).

Now maybe you can run AE more frequently but then what if we have 20 species per patch? then you’d be lucky to get 1 adaptation per hour.

I guess we could make a system where each person can upload the current setup of their species to a central database where others can download it and keep playing with it. But that’s a whole nother level.


#69

C++ is generally 2-3 orders of magnitude (base 10) faster than Python, so I think we have a lot of leeway to do both deeper and more numerous simulations; especially since the plan is to run all of these computations over a few minutes while you swim around and edit rather than within a single frame. So while right now it might look like we only have time to evolve one species per gameplay round, that shouldn’t have to be the case. In fact, if we’re willing to parallelize the algorithms (which I don’t think is too smart while prototyping, but better as we move to implementation) and use numpy then we can probably get a speedup of an order of magnitude or more in python.

We might also be able to get the simulation to converge faster, in which case we can reduce the number of timesteps. I suspect that most of the instability at the beginning of each simulation is due to the abrupt change in the species state (the mutation); so if we do the averaging thing, smoothly transitioning from original species to mutated species, we would remove that major driver of instability, and hopefully see it converge in a fraction of the number of steps.


#70

Yeah I think it’s two issues, one is the time it takes to run the calculation. Some of the speed increase will be taken up with more species per patch and more patches but yeah I’m hoping c++ will give us enough power so it doesn’t take a long time to run. If it can run while the player is in the editor that’s great.

The second issue is how fast other species should evolve compared to yours from a gameplay perspective. I guess it’s ok if every other species in the patch evolved every time you do. However even at that rate the rate of change is going to be slow. I guess no slower than the players cell, but going from 3 organelles to 20 will take a long time (though that’s probably the biggest change that could ever take place).


#71

Ok so I merged our work together, and in the sim I’m running right now, nobody is predating (in fact the only species with either a pilus or agent is the extinct one, which evolved an agent vacuole after going extinct…), and I’ve realized that the maintenance system I’ve made has one major flaw, in that it can’t cause a species that’s run out of food to actually decline in population due to starvation. So now I’m going to work on making a maintenance system as i recently suggested, where a steady (but small) proportion of locked (and perhaps free) protein (and perhaps also fat and DNA) gets recycled into its monomers. This way, a species would get the monomers back and could just spend a bit of ATP, but if it runs out of ATP, then the degrading will destroy the population.


#72

I turned down the predation strength, it’s one of the constants at the top, it’s probably worth turning it up again and seeing if that makes a difference.

Interesting. I think the way things are set up a species population will never go to 0.

The locked bins lose ~1% of their contents per time step so your population is the level at which you can balance this with compounds coming into these bins. It’s hard to see how you would ever lose all your population because you are banned from removing your nucleus and the last of your cytoplasm so you always have the ability to make protein, fat and DNA out of glucose. I guess if you were completely out of glucose and could get no more (no chloroplast, no agents/pilli and no scavenging) then your pop would slowly decay to 0 but otherwise it won’t.

If you do have an income of glucose then you can burn it for energy and so asking for 20% of the glucose to be diverted to making energy rather than being turned into compounds is only going to reduce your population to a lower level, not to 0, because you’re still putting in 80% of what you were before.