Auto evo predator separation and behaviour handling#6866
Auto evo predator separation and behaviour handling#6866Accidental-Explorer wants to merge 41 commits intomasterfrom
Conversation
… to CompoundCloudPressure.cs
…e.cs and ChunkCompoundPressure.cs
…ndPressure.cs as well.
…onsumptionPressure.cs
…a wider spread of behaviour.
| new ChangeBehaviorScore(ChangeBehaviorScore.BehaviorAttribute.Aggression, 50.0f), | ||
| new ChangeBehaviorScore(ChangeBehaviorScore.BehaviorAttribute.Aggression, -150.0f), |
There was a problem hiding this comment.
If adding more aggression is always a negative for this pressure (it appears to be?) then I'm not sure having a mutation that increases it is ever helpful? Any other pressures that has a positive score for should have that mutation already.
There was a problem hiding this comment.
This is the case with many of the other behaviours as well. But the point is that it evaluates the whole pressure stack. In this case it can improve predator resistance for some species.
I previously had it in that pressure, but then it often got used when it would not be used if already taking the compound pressure into account.
There was a problem hiding this comment.
To emphasise why the above could be a problem: ModifyExistingSpecies regularly prunes against the base species (rather than just pre-this-mutation) for the pressurestack to that point. So I don't want to create a situation where for some species nearly every mutant that gets out of GeneralAvoidPredationSelectionPressure has increased Aggression, but then any further mutation based on them gets pruned in the leaf nodes before it gets a chance to lower the Aggression to what is more fitting)
(Edit: and even if not explicitly pruning, I guess the frequent "top selection" would catch them as well?)
But the mutation system is quite complex so I could be missing something.
There was a problem hiding this comment.
There's also the fact that ChangeBehaviourScore as far as I can tell just gives a single mutant with a random change within the given range, so that seems like likely to overshoot the optimal point. The opposit gives some opportunity to compensate in the other direction.
…o allow for more separation between miches.
| } | ||
| else | ||
| { | ||
| if (compound == Compound.Hydrogensulfide) |
There was a problem hiding this comment.
This is a multiline if so it should use braces according to our styleguide.
|
Are we waiting for @GameDungeon to look at this again? In the meantime I did a code review, there were a few small style things, other than that all the math everywhere looked about the same as elsewhere in auto-evo. I did also do some performance testing. For reference 5 worlds to 15 gens took about 54 to 67 seconds on master. But on this branch the times were between 85 to 145 seconds, so it seems this has quite a heavy impact on auto-evo performance. That one longer time was an outlier but whereas on master the times clustered around 1 minute this branch has times clustered more around one minute and 40 seconds to 2 minutes, so there is almost a 100% increase in processing time caused by this PR and I think that is too much even if this makes auto-evo significantly better. |
Yeah, pretty much. He seems busy recently though.
I'll investigate to see what's causing the most slowdown. I think slowdowns are eventually inevitable once implementation of Miches for Multicellular starts, so I do want to strictly limit slowdowns before then. |
|
After an extensive testing on 20 worlds, can confirm that out to generation 21, auto-evo time is multiplied by about 1.8, with the time step from generation 20 to 21 being closer to multiplied by 1.9. The number of total and living species is actually slightly lower in this PR. I think that's good, because it means it's not just a result of the new version being "better" at producing different species. So it should be possible to improve performance without worsening things. |
|
I believe most of the new slowdown is from all of the behavior mutations. They are very cheap so they can flood the generated species with small variations of behaviors, which causes us to have to evaluate all of them. I'm not sure it should be in this PR, but it would be nice to cache the pressures that are not changed by behaviors for the new species. Maybe in the hypothetical immutable species rework. |
|
I haven't tested this yet, but one potential culprit is that auto-evo now once again tries to delete any organelle, rather than only some of them. That was actually missing from the last rework by accident. Maybe can try to have a random sample of attempted deletions?
Though with the limit on "rolling through" mutants, only testing the specific mutants directly created by those mutations should really have any effect right? |
|
Well you still have to test them at least once, which is the most expensive part as they are uncached. Deleting any organelle should have basically the same affect on performance as all of the behavior mods do, but it only happens once. Other than that I don't have any specific comments on the code. Everything looks fine to me, so the output quality & performance are the only thing that matters. |
Brief Description of What This PR Does
This PR applies some penalties to Aggression and Fear behaviours to compound gathering miches, to represent fleeing and hunting interrupting the actual collection of said compounds.
This helps differentiate predator species more from the non-predators.
Additionally adds auto-evo effects and mutations for the Focus setting.
Also unifies some calculations between compound gathering miches which did not make sense to have in one but not the others.
Related Issues
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR)
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.