The battlefield AI is still bad at keeping his battleline tidy and it has some unwanted habits like charging his archers into the player's frontline.

In this thread I want to research how the AI is influenced by the composition of AI and player armies. With hopefully as end result some recommendations for modders/CA to keep in mind to improve the AI.

Tests
I'm doing controlled tests on relative flat ground [Prippet Marches]. In all cases the AI is attacking to see what tactics it uses.

With Inf1, Arch2 I mean the AI Infantry unit number 1 and the AI Archer unit number 2.


Tests with infantry

[table 0 3 1]
2^ Test #1|Triarii|Archers|Cavalry
6^Player|=2|=0|=0
6^AI|=1|=0|=0
[/table]
Run 1: AI moves up to the middle of my line and walks against my unit.

[table 0 3 1]
2^ Test #2|Triarii|Archers|Cavalry
6^Player|=2|=0|=0
6^AI|=2|=0|=0
[/table]
Run 1: AI general attacks my general. Other AI unit makes flanking move to the right and flank attacks my general. My other unit is left unengaged.
Run 2: Switched my general to the left flank. AI general still attacks my general. Other unit attacks my right.

[table 0 3 1]
2^ Test #3|Triarii|Archers|Cavalry
6^Player|=3|=0|=0
6^AI|=2|=0|=0
[/table]
Run 1: Same result as test #2, run #1.

[table 0 3 1]
2^ Test #4|Triarii|Archers|Cavalry
6^Player|=6|=0|=0
6^AI|=6|=0|=0
[/table]
Run 1: AI army starts in the following formation and keeps it: 3 in frontline, 2 in 2nd line, general in 3rd line. 1 unit of 2nd line breaks off to my left. Entire remaining AI army charges into my army as soon as they in charging range. AI flanking unit breaks off flanking manuevre and piles on the already crowded battleline.
Run 2: My army in a single line. AI goes for 2 left most units. 1 AI unit makes flanking manuevre only to abort and charges my frontline.


Tests with infantry and archers

[table 0 3 1]
2^ Test #5|Triarii|Archers|Cavalry
6^Player|=4|=1|=0
6^AI|=4|=0|=0
[/table]
Run 1: My archer unit is placed closely in front of my line. Inf1 and Inf2 charge 1 unit of mine. AI general pursues (didn't really notice a charge) my archers into my frontline. The Inf3 starts flanking manuevre but aborts it.

Run 2: Archers placed in different group and more to the front. Inf1 and Inf2 start flanking manuevres, 1 breaks it off, the other actually flanks. Inf3 AI unit charges my line. AI General pursues archers into my infantry.

Run 3: Archers placed in different group and on my right flank. AI General charges at archers(!) then breaks off to attack my Inf which is very close by. Other 3 AI infantry neatly charge my battleline.

[table 0 3 1]
2^ Test #6|Triarii|Archers|Cavalry
6^Player|=4|=0|=0
6^AI|=4|=1|=0
[/table]
Run 1: AI stops his formation when his archers are able to shoot my troops. After a couple of rounds the AI infantry moves forward and then attacks my whole frontline. Archers move forward 5 metres and then start shooting again (possibly to reach my general who is slightly back).

Run 2: Same as Run 1. Except that halfway the march of the AI 2 enemy infantry started to swirl of a few seconds (to flank or not to flank?) before pressing on.

[table 0 3 1]
2^ Test #7|Triarii|Archers|Cavalry
6^Player|=4|=1|=0
6^AI|=4|=1|=0
[/table]
Run 1: Archers up front. While my archers are shooting, the entire AI army keeps moving forward. Then halfway AI army starts running. Then halts. Inf1 and General charge 1 unit. Inf2 and Inf3 flank, Inf 2 aborts.
Archers loosen and start shooting. Inf 2 moves 10 metres infront of my unit, waits and then charges.

Run 2: My archers are deployed on my right flank. Same as Run 1 except that AI inf only starts running when AI archers starts shooting. Inf 1 and General aims for archers only to redirect 20 metres before by battleline. Other 2 units attack my left unit. Middle unit is virtually left unengaged.

[table 0 3 1]
2^ Test #8|Triarii|Archers|Cavalry
6^Player|=4|=1|=0
6^AI|=4|=3|=0
[/table]
Run 1: Archer deployed right forward. Arch1 and Arch2 start shooting at 2/3 range untill my archers are down to 43/80. Arch3 shoots at 1/2 range. Infantry remains standing. Archers start shooting at my infantry until 2/3 of my ammo is spent and my infantry is down to 50-60/80. Infantry runs forward and charges perfectly, distributing units along my whole frontline... just a perfect charge!

Run 2: Archer up front (40 metres). AI army stops at 2/3 missile range. AI archers shoot at my archers until they are down to 37/80 then start shooting at my infantry. Infantry charges when my archers used up 2/3 ammo and my infantry are down to 61-71/80. Infantry charges again my whole line.


[table 0 3 1]
2^ Test #3|Triarii|Archers|Cavalry
6^Player|=2|=0|=0
6^AI|=1|=0|=0
[/table]
Run 1:

Run 2: