AI emphasis on maintaining formation

Field of Glory II is a turn-based tactical game set during the Rise of Rome from 280 BC to 25 BC.
Post Reply
CharlesdeBatz
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Sun Jul 11, 2021 5:41 pm

AI emphasis on maintaining formation

Post by CharlesdeBatz »

In line with the recurring debate regarding the accuracy (or lack of such) of the pushback mechanic, I am curious if anyone has similar thoughts on the game design with respect to maintaining formation.

Especially in Hellenic/Hellenistic period battles, the inability of the AI to maintain a coherent battle line makes it rather easy to execute a defeat-in-detail with a properly formed line on the player's side. I am referring primarily not to the pushback mechanic, but rather to the movement of individual units prior to engaging in melee. For instance, if a square of rough ground is in the middle of the frontage of an advancing phalanx, the unit in front of that square will detour around it (consequently stacking up behind its neighbor), rather than the entire line slowing its advance to maintain formation. As another example (one seen frequently by me), the tendency of units up to heavy foot to break formation in pursuit of light infantry leads to the same piecemeal formation discussed above.

Is there a capability in the AI battleplan to prioritize maintaining formation above other concerns? Or is this something that would have to be added in as additional code?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28403
Joined: Sun Dec 04, 2005 6:25 pm

Re: AI emphasis on maintaining formation

Post by rbodleyscott »

It is actually quite difficult to write AI for this, because it also needs to be able to decide when it would be wiser to break formation, and when it should avoid terrain rather than march through it.
Richard Bodley Scott

Image
CharlesdeBatz
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Sun Jul 11, 2021 5:41 pm

Re: AI emphasis on maintaining formation

Post by CharlesdeBatz »

I suppose one way to resolve the terrain issue would be by specifying that, if a unit of a phalanx is to pass through restrictive terrain, the entire phalanx would reduce its movement based on the AP cost of the move through that terrain. This would obviously have to be coded in by the player (myself).

With respect to the pursuit issue, the most obvious solution is simply to prevent non-light foot units from being able to charge light foot (and possibly being able to charge cavalry as well, but that's a separate debate brought on by my experiences using cavalry against hoplite phalanxes).
Ray552
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 454
Joined: Wed Sep 16, 2020 4:51 pm
Location: Dallas, Texas, USA

Re: AI emphasis on maintaining formation

Post by Ray552 »

You might have seen this already, but consider the "Rise of AI Global Mod" (version 3.11), available through in-game download through the "Download community scenarios" button in the upper left corner of the game's main menu.

Here's a link to the forum thread about it: https://www.slitherine.com/forum/viewto ... 7&t=102040

One item in the notes may address your concerns about terrain affecting movement:
Pathing : AI units are a bit less afraid of going through bad terrain to reach their target if they think no enemy may be able to intercept them there to force a fight at a terrain disadvantage.
I find that the mod does much better than the "vanilla" AI that comes with the game.
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: AI emphasis on maintaining formation

Post by Schweetness101 »

I have a simplistic semi-solution for this that is in the AI for both the ancient greek and dark ages mods, where basically the AI does not stop group move and break into pursuing individual targets as soon as in vanilla. It works ok sometimes, but still the ai advances pretty messily.

There probably would be two main solutions I'd try to look at:

1) move the units of any movement type in any group only as far as the slowest unit of that type in that group, and perhaps not moving cavalry ahead of the infantry
2) deployment edits to prevent heavy foot especially deploying on rough terrain, or with rough terrain straight ahead for at least 6 grid squares, and, failing to find enough room for that, putting them in a second row.

also 3) setting up armies to start closer to one another, like in the ancient greek mod. And, optionally 4) having the AI just defend and not move for longer, assuming the player is willing to role play a bit and advance, rather than just use skirmishers to goad them into attacking at disadvantage. Also 5) you might have the skirmishers heavily favor shooting over melee (so they don't create obstacles out of skirmish melees mid battle) and 6) have them withdraw from the initial skirmishing phase sooner.

you might also 7) remove the speed penalty to heavy units moving through rough, and just treat the moderate disorder as sufficient penalty (maybe just for the first 3 turns). Also, 8) some kind of more complex movement command for non-light inf that lets them 'push through' light inf, ie charge/walk into and through them, causing them to evade, without wildly charging, so they can just move maybe at a slower pace, perhaps just 1 square, but not wildly charge (that would heavily alter game balance though and likely have other effects).

But yeah, it's a difficult thing to program without making the AI too stupid or defensive especially. I mean, if you think FoG AI advances in a messy way, look at what Total War AI does, it's just absolutely random.
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: AI emphasis on maintaining formation

Post by Schweetness101 »

Here's an example advance (and the rest of the game) from the ancient greek mod, small size default army points and map (where in the mod the map defaults are smaller and armies start closer, and also stay in formation longer). You can see that although they sort of keep it together, there are still 3 or so turns after contact where I basically roleplay holding a single line (as red) to let the AI get into position around skirmishers, even though most skirmishers retreated back through the line on their own beforehand, and this on a map with no rough terrain. In the first image the blue side (AI) has already moved once, just straight forward:

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image

So, it's a difficult thing to get right. If you force them in formation too much it might make them too easy to flank or otherwise take advantage of while they mindlessly moved forward in one line.
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
CharlesdeBatz
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Sun Jul 11, 2021 5:41 pm

Re: AI emphasis on maintaining formation

Post by CharlesdeBatz »

Schweetness101 wrote: Mon Dec 05, 2022 12:34 am Also 5) you might have the skirmishers heavily favor shooting over melee (so they don't create obstacles out of skirmish melees mid battle) and 6) have them withdraw from the initial skirmishing phase sooner.
I think that this would be the single most effective change, as the majority of formation-breaking by the AI appears to happen in order to engage skirmishers in melee with medium/heavy foot units. So if light foot units were to only engage in close combat during the impact phase and immediately fall back, that would partially resolve the issue.

I would also argue that the grid-based system (which doesn't allow for movement by fractions of a square) exacerbates the non-uniformity of the formations, since a discrepancy of even a single square by any unit has substantial effects on the overall formation's capabilities. But that's an integral part of the game design and can't really be changed.
Post Reply

Return to “Field of Glory II”