-
-
Notifications
You must be signed in to change notification settings - Fork 564
Optimize GetMutationsForSpecies #6209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
All of the duplicate work did have the side effect of trying way more variations. I'll try cranking it up and see if it gives better results. |
|
Ok, So I think I figured out the real issue. Before the mutations were applied in a random order, but now the are applied in a strict order based on the miche tree. This is an issue as beneficial mutations are now getting pruned if applied too early. I'm going to try and rework the mutation order to work better now. With that change this now has a larger gameplay effect and will likely need some sort of play testing to make sure auto-evo isn't completely out of tune. |
|
This now disables the changes in Thim's most recent auto-evo PR. It is incompatible with the patch here. I would like to find a way to have them play nice, but I can't seem to think of one right now. I'm open to suggestions if anyone has any. Other than that, this PR is complete and works in my testing. I'm opening it for review. |
|
Just to have it on the record, that isn't a bug with this patch, and I'll fix it with my next balance patch. |
|
I pushed a change to rebalance the osmoregulation penalty. I don't understand why a square root function makes fewer species get pruned, but eukaryotes now appear at similar rates to before, with some variety of early species still present. It's still your PR, so feel free to mess with it however you need. |
|
I'll try and test this tomorrow. Thanks for the commit. |
|
I merged master here as I think this was messing up the CI running unit tests (or at least I hope that was the cause). |
|
Was the renaming problem already fixed? I saw some commits after that but none directly referencing that. |
| return TraversalOrder8; | ||
| } | ||
|
|
||
| public record Mutant(MicrobeSpecies Species, double MP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To not wreck memory allocations, this has to be public record struct Mutant(MicrobeSpecies Species, double MP); to make this into a value type.
And also that means Mutant? should not be used anywhere as that causes boxing. Instead I think that Species here should be made nullable so that null species can stand-in for invalid Mutant instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place that Mutant? is used is in the sorter, and I don't think it can be replaced with your solution in that context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, that's a bit unfortunate, but it seems it had the same problem with Tuples already. So I guess for now could you add a TODO comment there about this architectural problem that would be nice to solve eventually?
…Games/Thrive into auto-evo-refactor
This reverts commit 9830886.
|
Well this is critically not ready today, so this kind of can't make it into 0.8.3 anymore... |
|
Got it. This one really needs a second balancing pass PR too, so unless both can make it neither should be merged. |





Brief Description of What This PR Does
Refactors the algorithm for GetMutationsForSpecies for a large speed increase.
This does have an effect on auto-evo output, and could contain some regressions due to the complexity of the patch, but everything appears to be working.
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.