HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Restore AI ability to build Fighters (fuel = 1 units)
During 2.6 development AI was made never to build fuel = 1 units. The reasoning given for that was that due to shortcoming in pathfinding code AI is unable to handle them well enough.
Now I tried to read through the cited tickets, and as far as I can see, there was no REGRESSION caused by pathfinding refactoring. OTOH AI's inability to build Fighters at all seems like a quite a serious regression - it has handled them adequately as far as I remember. It might have not been realized that AI Fighters have been returning to base quite reliably even though they don't do it as part of beforehand planned mission. There's the autorefuel code kicking in on turn change in case Fighter has stopped after its attack.
So I'm about to test if we could simply revert the change to prevent AIs from building fuel = 1 units.
#3 Updated by Marko Lindqvist over 4 years ago
I've not yet managed to get conclusive results from autogame testing. It might (I really need more data to say it for sure) be that like "Coast" units (Bug #682452), those Fighters are never leaving the city they are built at (never attack anybody). So they would only eat up AI resources without providing anything in return.
#4 Updated by Marko Lindqvist over 4 years ago
- Priority changed from High to Normal
- Sprint/Milestone changed from 2.6.0-beta1 to 3.0.0-beta1
Marko Lindqvist wrote:
So they would only eat up AI resources without providing anything in return.
It's not 100% waste, but it can use them in such rare circumstances only (in latest autogame less than one in every fifty Fighters built ever attacked anybody) that it's better not to enable them in S2_6. Let's re-evaluate in S3_0.
#7 Updated by Alexandro Ignatiev 7 months ago
Actually, I have a patch for improving aviation in 2.6. I tested it on an improved civ2 ruleset, AI uses fighters quite well (but I have not seen it building bombers, or attacking with them if provided, maybe the unit costs are overvalued). There is a problem in fuel pathfinder not covered by this patch (units with over 255 total move fragments with "Missile" or "OneAttack" flags get wrong costs for attacks on the map), maybe it is related, but I don't think I've broken anything more in it.
#9 Updated by Alexandro Ignatiev 7 months ago
One more stupidity worth fixing before we let the birds out is that rebasing does not consider the unit's health. I've observed a unit that was stuck at low hp for dozens of turns due to bunny hopping between cities. Likely, we should allow rebasing (if the unit has not full hp, has not moved and is on a refuel point) only if in one turn spent there it would get more hp then in two turns here, or something.
#11 Updated by Alexandro Ignatiev 5 months ago
Seems like we have fixed the things that turned fighters for AI into waste. AI seems to use fighters sanely if I provide them to it in editor (rarely builds them itself even if I remove the prohibitions but it's another question maybe solvable by ruleset fiddling). Now, can we remove the code that prevents AI from building them? (Probably we should though retain the lines that prevent considering fuel=1 non-missile units as paratroopers since I doubt AI will return them in time.)
#14 Updated by Alexandro Ignatiev 5 months ago
Tested: 2.6 patch can be applied (but see above), for 3.x we need a new patch that I put here. The patch works but it is difficult to find a ruleset where AI will build aviation (e.g. in civ2civ3 Fighter is 60sh/20hp/4att and Cruiser is 80sh/30hp/6att and AI would better build Cruiser vs sea target or Marine vs land one).
#15 Updated by Alexandro Ignatiev 5 months ago
2.6 patch without paratroopers. Tested with Aviation ruleset though I seemingly have not got a single fighter in an autogame (the land and sea units are too toug for the planes and air units don't hang around in the open)...