Open relent0r opened 1 year ago
As far as the Experimental functions/behaviours are concerned, I'd say their Sorian counterparts are somewhat of an improvement. BehemothBehaviorSorian for example accounts for potential hostiles nearby, and the unit will first clear out any nearby threats before resuming to its actual destination, should be more reliable than a simple IssueMove/IssueAttack. There're a lot of Sorian counterparts in platoon.lua and in AIBehaviors.lua, some of them could be salvaged to improve the stock ones.
As far as position and threat evaluation logic is concerned, maybe M27, or RNG functions could be implemented instead.
Yes this is true Sorian made some small tweaks to the behaviours and if we run out of time before the next milestone I'll take this route as its a quick win.
Describe the feature The default AI has a bunch of experimental/ strategic unit functions which are..in need of some love.
The behaviours that I'd like us to look at refactoring are as follows. Ideally we would leverage a central intel layer to determine the best attack points taking into account various metrics. I'm not sure if we should aim for multipurpose functions to wrap up various units or if we should aim for high separation with different logic depending on the unit. One of these will be easier but less effective, the other will be more effective but cost more time and likely be less compatible with mods.
FindExperimentalTarget - Right now this searches through the locations that were added to the scout priority list at the start of the game and during the game based on StructuresNotMex threat. Then gets the number of units in a 100 unit radius and looks for the location with the most number of units based on a set of priorities and distance. This means most of the time the AIs experimentals will always target enemy bases. This could be improved to made better decisions.
CzarBehavior - based on the FindExperimentalTarget it will find a location and IssueMove to the location, then IssueAttack when within 50 units. With checks for enemy commanders to override behavior. It won't path and will fly blind into any AA.
AhwassaBehavior - Gets the highest threat cluster and performs IssueAttack to the location. Thats it.
TickBehavior (Cybran Exp Gunship) - Gets the highest threat cluster and performs IssueAggressiveMove to that location. Will rerun that highest threat cluster check during its loop and redirect if another is found.
FatBoyBehavior - Quite a complex behaviour by default. Biggest issue is that it doesn't make use of its range and will IssueMove or IssueAttack on target units.
BehemothBehavior - Uses a combination of FindExperimentalTarget and WreckBase functions to find targets. Uses IssueMove or IssueAttack depending on the target. This function is used for the majority of land experimentals.
ArtilleryAI - Uses the FindPrioritizedUnit with an table of priorities and AttackTargets then for 20 seconds, then repeats. Thats it.
NukeAI - Gets the highest threat cluster and fires a nuke at it. Thats it. Does not care about SMD's.
SatelliteAISorian - Merges with other novaxes and looks for targets that are not shielded (but its logic often fails to detect shields covering units correctly) and targets them for 30 seconds, then moves to another target and repeats.
ScathisBehaviorSorian - This is more or less a replicate of the behemoth behavior.
Additional context The default AI has always had very simple late game logic of units. This makes it the sort of gameplay that will crash units into firebases and generally gift mass to the enemy. Would like to make this a little better.