Alerted doesn't increase reinforce priority, it just puts the planet in a separate list which is checked before the all-reinforceable-planets list
Each of those lists is then randomized and then sorted by reinforcement priority.
I'll probably change the planet list to display the order in which they'll actually be reinforced (until it runs out of reinforcements), rather than displaying the scoring as it happens.
Minposts vs. Central Add Count means that the higher your AIP, the less raiding any guardposts will count. In the first example for Craps, They're getting 7 guardposts worth of reinforcements. They'd have gotten the full 11 if I had removed the wormhole guardposts in that system. Raiding IS useless, but only after a certain AIP (110+)
As far as actual strength, that's probably right. But there are two other consequences:
1) If all the ships get dumped on the command station, they're probably easier to deal with.
2) The fewer guard posts, the lower the population cap on the planet. Once a planet is over its cap, it is no longer eligible for reinforcement.
In the second section, the reinforcement decisions, what does this line do:
reinforcementStrength += rand(4,AIDifficulty+3) = 25.4
If AIDiff is >= 9 and < 10, this causes reinforcementStrength to be increased by a random number between 4 and 12 (inclusive). It's just psuedocode (the actual code is a lot more characters), so the syntax being unfamilar does not surprise me
I'm assuming reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 42.49 takes into account the AI Diff of the owner of the planet being reinforced?
No, the player who's doing the reinforcing. Each AI can reinforce planets owned by the other.
This randomness here seems odd:
reinforcementStrength *= 0.07 = 2.67
Where does .07 come from? Thin air or some antique design decision?
When I first saw it, it was literally *= 0.07
Why? That's just the size scale that seemed right, I assume. Presumably it could be worked into some other step, but the point of the algorithm isn't to have the minimum number of statements, etc.
This:
reinforcementStrength *= centralAddCount = 18.69
Since there's no significant calculations later for the wormhole posts, this calculation almost appears counterproductive to the resulting strength of the system. Since the wormhole posts later were only getting +1 strength after all this was done for the command center, yikes.
Another rule that's (probably) not apparent here is that after all the normal reinforcements, if the human has a significant military presence on an AI planet that was not just reinforced, then all the wormhole guardposts on that planet get some reinforcement. I'm not sure how often it is true that the human presence is high enough and the planet is not high enough in the reinforcement list to get a normal reinforcement, however.
Anyway, yes, it does appear that reducing a planet to fewer than min(11,(AIP-10)/10) guard posts actually increases the total strength of the reinforcement spawn. Right now I'm not really interested in changing the intended function of reinforcements (which this evidently is, Chris wrote all this originally), but I apologize for providing misleading information in the past that indicated differently about this. I didn't know until doing the logging
And the actual bugs being found I'm certainly happy to fix. Once we see what it's like actually working properly, we may consider actual deliberate changes.
As a side note, honestly I don't consider it a bad thing if there's not a powerful motive to go around killing every guard post in range: how fun is it to do that, really? As it stands, I think the population-cap reduction may still be a pretty powerful motive, but we'll see.
on the second reinforce in the AI Thread wave, there's no indicator to us which planet it was workign against.
Which line, specifically?
These are the lines that marked transition to a new call to SendReinforcementsToPlanet, the number of which is determined in the main thread (numberOfReinforcements, 4 in this case) :
***calling SendReinforcementsToPlanet on planet 43 (Craps) reinforce priority : 2000, (overall) strengthBudget = 0
***due to reinforce priority >= 2000, calling SendReinforcementsToPlanet on planet again 43 (Craps)
***calling SendReinforcementsToPlanet on planet 7 (Confederation ) reinforce priority : 0, (overall) strengthBudget = -1.14
***calling SendReinforcementsToPlanet on planet 17 (Shawshank) reinforce priority : 0, (overall) strengthBudget = -0.71
This is going to take a few iterations for me to grok entirely, I fear.
Yep, this one is harder to really explain in a straightforward fashion like wave calculations, and I'm still grokking it myself, so the feedback is appreciated
However, min posts seems to grow to fast IMO
You wouldn't even know it existed apart from these logs, all you see is the much-later end product (and you haven't even seen it since this isn't what's in the public 5.031), so your opinion on a particular step in a long algorithm doesn't really even start a case for changing how reinforcements have been intended to work for over 2 years
Not saying it won't ever be changed, but it's gonna take a lot more empirical trials and such.