Auto-evolve issue

the auto evolve stop the game from loading in the last devbuild

Even today’s build (7b398a0fb2edda7af163146e521453f44ca2ab5c)? If it’s still happening then there is another getting stuck issue I need to fix, which I haven’t been able to trigger myself. I’d appreciate any save files people might have that has a relatively high chance to get stuck within a few generations.

it is for today’s build, I played for about 30 min and then the game was stuck in the auto evo loading

I guess I need to look into it more. I can’t do much if starting new freebuild games and running them for a few generations each doesn’t cause the problem. So unless someone provides a save, at least a basic auto-evo exploring tool needs to be made to make automating running auto-evo until it gets stuck easy.

how can I provide a save ?

Make a save. And then check that loading it and playing a few generations has a chance to get the game stuck. Once you have that save, upload it to any of the billions of file hosting sites out there for downloading.

I don’t have a save but I found another way to reproduce this. If you go to Constants.cs and set MUTATION_BACTERIA_TO_EUKARYOTE = 0.5f and MUTATION_DELETION_RATE = 0.5f, then auto-evo gets stuck very often and it only takes one to three tries of auto-evo to get stuck. I also tried printing miscellaneous things into the console and found the following about the while loop (lines 256 – 303) in Thrive/Mutations.cs at master · Revolutionary-Games/Thrive · GitHub

  • minDistance (the smallest distance between main hexes and island hexes I think) can sometimes be 1. This seemed to always lead to minSubHex of (0, 0) and an infinite loop even with Hhyyrylainen’s fix.

  • minDistance of 2 can sometimes lead to minSubHex of (0, 0). I think this happens if minSubHex is (1, 1) or (-1, -1) before line 285. I don’t know if this can get auto-evo stuck.

  • Island hexes can move in one direction in an infinite loop but the minDistance stays as 1

  • Main hexes can move with the island hexes

  • Main hexes can be next to island hexes before and after moving

  • Hhyyrylainen’s fix does prevent the infinite loop in some cases

I don’t really have any idea why these things happen. It seems that you can prevent the infinite loop by exiting the while loop if minDistance = 1 or if the loop has gone through too many iterations. That would be simple quick fix if no one knows how to fix the weird issues themselves. I don’t know if there are other ways to get stuck, though. It’s hard to prove a negative.

Yeah, I guess we’d still be better off than before the new islands avoiding mutations code. We can just go back to the old approach where after some number of iterations the mutation is just reset entirely.

Now that I’m thinking about it, would it be possible to calculate the direction to move per hex so that there isn’t a symmetry problem? PR / code fix suggestions welcome.

Yeah, I guess we’d still be better off than before the new islands avoiding mutations code. We can just go back to the old approach where after some number of iterations the mutation is just reset entirely.

Yeah, you could use both together. Auto-evo only gets stuck a small portion of the time, usually the island fixing code works. So you could run the new island code and if that takes too many iterations, then reset.

I’m sure there are ways to solve the symmetry problem etc. I don’t really understand this stuff well enough to know how to do it. I’ll let you know if I come up with something.

What about my suggestion that the code just doesn’t calculate all of the hexes to move at once? Instead just calculating the move direction for each island organelle separately and move that in the needed direction.

Edit: opened an issue:

I tested that and still got the same problems. This doesn’t appear to be caused by symmetrical islands.

I found another way to fix the issue and made a PR:

By the way, it seems that auto-evo is about twice as slow as in 5.8.1. on my computer. This is the case with and without my changes. I’m wondering if some PR between now and 5.8.1. release made auto-evo slower.

1 Like

The only thing that really changed auto-evo was that islands PR, and then a slight math change was done to the organelle efficiencies, but that latter one shouldn’t really affect the overall amount of math that much. Have you changed the background thread counts or something like that in the options menu?

If you are up for it, you could do a git bisect to find the merge commit that introduces the problem, it shouldn’t be more than like 10 commits you need to test in that case.

My settings were exactly the same, so that’s not the cause. Would be interesting to know if others get the same issue. I can try to do a git bisect.