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...
Feature #658896
closedRestore AI ability to build Fighters (fuel = 1 units)
100%
Description
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.
Files
Related issues
Updated by Jacob Nevins almost 6 years ago
- Sprint/Milestone changed from 2.6.0 to 2.6.0-beta1
This was disabled in gna patch #4927, commit:cdc5f1e1ea.
I think we should re-enable this for 2.6.0-beta1, so that we have a chance to find out if there really is pathfinding trouble during beta testing.
Updated by Marko Lindqvist almost 6 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.
Updated by Marko Lindqvist almost 6 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.
Updated by Marko Lindqvist over 2 years ago
- Status changed from In Progress to New
Updated by Marko Lindqvist over 2 years ago
- Sprint/Milestone changed from 3.0.0-beta1 to 3.1.0
Situation has not changed in S3_0.
Updated by Alexandro Ignatiev about 2 years ago
- File reenable-fighters.patch reenable-fighters.patch added
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.
Updated by Alexandro Ignatiev about 2 years ago
- Blocked by Bug #923677: Fuel pathfinder: bug of always waiting in departure airdrome added
Updated by Alexandro Ignatiev about 2 years 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.
Updated by Alexandro Ignatiev about 2 years ago
- Related to Feature #924224: Fuel pathfinder: hand attack possibility consideration to player/AI added
Updated by Alexandro Ignatiev about 2 years 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.)
Updated by Marko Lindqvist about 2 years ago
Is the patch here up to date, or should I wait for a new version before starting testing it?
Updated by Alexandro Ignatiev about 2 years ago
Nope, it's just a draft of what is done or to be done with other patches. I'll try to publish the actual one later today. Idk if the "Revert*" patches are up to date. I say, we likely need to keep it yet for paratroopers.
Updated by Alexandro Ignatiev about 2 years 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).
Updated by Alexandro Ignatiev almost 2 years 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)...
Updated by Marko Lindqvist almost 2 years ago
- Sprint/Milestone changed from 3.1.0 to 2.6.6
Updated by Marko Lindqvist almost 2 years ago
3.1 version applies to master too, but neither 3.1 nor 2.6 version applies to S3_0.
Updated by Alexandro Ignatiev almost 2 years ago
Done. Tested again on Aviation.
Updated by Marko Lindqvist almost 2 years ago
- Status changed from New to Resolved
- Assignee set to Marko Lindqvist
Updated by Marko Lindqvist almost 2 years ago
Pushed to master, S3_1, and S3_0. Waiting for the 2.6.5 release before pushing to S2_6.
Updated by Marko Lindqvist almost 2 years ago
- Status changed from Resolved to Closed