Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix bug in production queue projections #1603
A bug introduced with the shift to percentage completion caused early termination of calculations relating to elements with a repeat count greater than 1, which would then often cause elements later in the queue to show substantially premature projected completion times (up to hundreds of turns difference).
A simple test case I used to compare results was starting up a single player game with mostly default stats, but no monsters, no AIs, and choosing Gysache. I advanced for 5 turns with no other actions, to get the production meter to plateau, and then added 5x2 Scouts (5 repeats of a 2-unit block), 20x2 Outpost ships, 10x5 Outposts ships and another 10x5 Outpost ships. Without this correction the projections for first completions show projected as happening after 2, 13, 73 and 117 turns; with this correction they are projected at 2, 15, 184 and 384 turns (which appear as accurate as I can reasonably confirm without deleting all ships as they are produced).
Even if we are not too concerned actually about predictions of things 70+ turns in the future, a discrepancy of ~15% already 13 turns out, which apparently can steadily increase up to 150% at ~75 turns out, seems like enough that I think if we do wind up doing a bugfix release for 0.4.7, that this should be included in that (should we have a label or milestone for that?)