I'm bringing this up not because of the particular failure mode (i.e. running out of surveyed planets), but rather because yoyoing seems to be a common failure mode that brings the game's updates to a screeching halt. I think this problem needs a general solution. The problem is that I haven't got even an inkling of an idea to suggest as to how to go about solving it - the only thing that I can think of at all is for each fleet to keep some sort of history of recent things it's tried to do, and detect repeating patterns (or just yoyos) in it. I can see lots of problems with this idea though, so it will probably require a better solution.
I have managed to fix a few yoyos in the last couple of hours, mainly through three different databases that people sent me.
1) Some precursors with empty magazines were running away from an NPR. The precursors were faster so they would get out of range and stop. Then the NPR would catch up and the precursor would start running again. Each time this happened it was causing an interrupt. I have fixed this through changing the way that precursors behave once they run out of ammo and possible resupply.
2) Two NPRs had been fighting a huge battle and a now a large NPR fleet was trying to destroy the shipyards of the other NPR. The shipyard was getting hit by 200+ 2-point railgun rounds every increment. The percentage chance of a shipyard being destroyed is (Damage / SY Capacity) * 10000. In this case, that works out to (2/46,000) * 1000 = 0.04, which is getting rounded down to 0. Which means the NPRs couldn't 't destroy the shipyards but they would keep trying forever. Partly this was caused by the introduction of commercial shipyards, which are much larger than I anticipated when I write that code. So the capacity of Commercial Shipyards is now divided by 10 for combat purposes and the minimum chance of destroying a shipyard can not be lower than 1%.
3) An NPR was then trying to blast the population of a second with railguns, which it couldn't do because of the atmosphere. I've fixed it so NPRs will now check for atmosphere before selecting a population as a beam target.
4) Somehow in one game, an NPR had established a neutral relationship with the precursors
, although that wasn't specifically the cause of the problem as the following could happen with any pair of neutral NPRs. A precursor fleet and an NPR fleet were both monitoring one another but they had slightly different ranges at which they were choosing to do that. When the Precursor, which was faster, moved away, the NPR lost contact and started heading in a different direction. When the precursor moved after it, the NPR detected it and moved toward it, at which point the precursor moved away and the whole process started again. It's a very unusual situation as the distances between them varied very slightly depending on who was chasing who and the detection range of the NPR fitted in between those two ranges. I have fixed this by changing NPR behaviour so that instead of monitoring neutral contacts, they just confirm their identity with an active scan and then ignore the same neutral contact in the future. I think a few of the yoyo issues are to do with monitoring neutral contacts so I hope this will fix some other potential problems as well.
These changes have required some database mods so I will release a v4.6 in the next few hours
Steve