Results 1 to 17 of 17

Thread: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Icon4 Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    As recently discussed in the main release thread, there seems to be a slight issue in real-time battles with the AI rushing its cavalry in for a single charge and then staying behind in prolonged melee rather than disengaging to commit multiple charges.

    I have made a video comparing the AI behavior in EBII with that of Gracul's AI in Stainless Steel (be sure to watch in 1080p). While this AI isn't perfect either — IMO the cavalry should withdraw to a distance at least two or three times as far away before charging in again — it seems to reveal a lot of potential for more challenging AI behavior.

    Can anyone confirm whether they've seen the AI repeatedly withdraw and charge multiple times so far in EBII, as demonstrated at the end of the video? I've certainly seen the AI perform great flanking maneuvers — for instance, a unit of medium cavalry went behind my lines and routed an entire unit of phalangites the other day with a rear charge — but I'm not sure I've seen behavior quite like at the end of this video. Thoughts?

    VIDEO LINK

    Note: I purposefully left the battle at the end unedited to show how close it was. Feel free to skip through if you're short on time. Basically, had I not ordered the spearmen to keep closing the gap, the AI cavalry may have been able to win the battle as a result of its repeated charges.

  2. #2
    Senator
    Join Date
    Apr 2013
    Location
    Germany ,NRW
    Posts
    1,250

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Really?I just started a battle(with 203c) and they do withdraw and charge again.Or did they change something in newer versions?
    Elder Scrolls Online :Messing up the Lore since 2007...

    Well overhand or underhand: 3:50 Onwards...

  3. #3

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Quote Originally Posted by Sint View Post
    Really?I just started a battle(with 203c) and they do withdraw and charge again.Or did they change something in newer versions?
    All sorts has changed, it's a constant evolution of new features; why are you still playing 2.03c?

  4. #4

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Quote Originally Posted by Sint View Post
    Really?I just started a battle(with 203c) and they do withdraw and charge again.Or did they change something in newer versions?
    I could have sworn I'd seen this happen in EBII, too. However, I ran a bunch of custom battles and only the scenario in the first part of the video occurred. I do recall that the devs changed the battle AI a few patches ago — perhaps this was an unexpected result?

  5. #5

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    z3n said the shortening of cavalry charge distances in 2.03k had an unexpected impact on AI cavalry behaviour. He's working through that now.

  6. #6

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    I'm playing a game with 2.03k, and I've never seen the AI withdraw and charge again. In a battle with Makedonia, AI had 3 family members and a couple of light cav. All charged and stayed there in place fighting my infantry. I still almost lost the battle due to how good their body guard cav is, but it had nothing to do with their tactics.

  7. #7
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,636

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Or did they change something in newer versions?
    What I've been changing is making the AI prioritize double envelopments and flanking rather than head on charges/attacks. (which were originally intended by MTW2 devs, in fact knightly charges were definitely what the devs based vanilla around). Unfortunately I never tested cavalry that much outside of my certain 'test phases' which are made up of previously selected armies in which I know the behaviour of the AI by heart, so when something new is implemented I can spot the difference or mark that there is no difference.

    Unfortunately I just realized that cavalry need some work being done. So I'm working away at it but not entirely sure it'll get done yet, I've noticed formations changes are starting to have some good effects so I've started to focus on that too.
    https://vid.me/55xq

    This was an unintended and impromptu video while I worked on the BAI and normally I do not listen to said music but todays one of those days where I need humourous music in the background. The goal is to not only make cavalry want to flank/double envelop more than head on charges but stay in reserve until an opportunity. Which ends up being 3 things at once and is more complicated than it sounds at first because theres numerous situations.

    Thankfully I wrote the CAI so it groups units which lets me focus on battles at or above 6 units which makes things easier but still complicated to coordinate this all on several scales of battles. In short, how this will all work together exactly I am still thinking about while I work. Technical information about it- its also slow because everything that I write in XML is processed by the language+algorithms in the exe which makes things not 100% effective due to the chance of something getting lost in translation.
    Last edited by z3n; August 10, 2015 at 05:07 PM.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  8. #8
    delra's Avatar Praepositus
    Join Date
    Jun 2007
    Location
    Warsaw, Poland
    Posts
    5,590

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    making the AI prioritize double envelopments and flanking rather than head on charges/attacks
    You should investigate DAC AI then. AI is awesome there at flanking with cavalry. It actually bruised me quite badly a couple times before I adjusted for it and abandoned bad EB2 habits. :-)

    Cavalry funniness aside, I'd rank EB2's AI higher than others though.

    Although as an old (ancient?) SS RR/RC player I prefer bloodier battles, while EB2 has a lot of pushing contests. I just feel it plays better when armies simply get butchered, and when units have gaps of 5-10 points in attack and defence between elites and militia. So especially your militia units must be really cared for to never stand in front of veterans, or they'll be broken and gone in a matter of seconds.

    Imagine Hastati had one-third or half of stats of Principes and Triarii had 50% better stats than Principes. And that the frequency with which they appear for recruitment was heavily biased towards much less common elites. Wouldn't quincunx make far more sense then? You'd always deploy a very deep line with elites as last resort troops in the last row, let enemy cut first through weaker troops, then break his teeth on the really rare and expensive soldiers. :-)

    Then again, maybe pushing matches are easier to do for AI... No need to constantly plug holes in the line so no need for very deep reserve.
    Last edited by delra; August 11, 2015 at 12:28 AM.

  9. #9

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    That sounds like battles in Shogun 2.

  10. #10
    delra's Avatar Praepositus
    Join Date
    Jun 2007
    Location
    Warsaw, Poland
    Posts
    5,590

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    1x Polybian Hastati vs 4x Sauromatae Horse Archers (no armor version).

    - Horse archers get in range of pila throwing.
    - My Hastati throw at them but don't kill a single one. Javelins really don't do much good ATM.
    - I get limited losses from enemy arrows.
    - AI gets bored after a short bit and charges all four of Horse Archers units frontally into my Hastati.
    - Same as with a cavalry charge from now on, melee combat till the end.

    I WIN.

    I miss EB1's horse archery... :'-(

  11. #11
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,636

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Quote Originally Posted by delra View Post
    1x Polybian Hastati vs 4x Sauromatae Horse Archers (no armor version).

    - Horse archers get in range of pila throwing.
    - My Hastati throw at them but don't kill a single one. Javelins really don't do much good ATM.
    - I get limited losses from enemy arrows.
    - AI gets bored after a short bit and charges all four of Horse Archers units frontally into my Hastati.
    - Same as with a cavalry charge from now on, melee combat till the end.

    I WIN.

    I miss EB1's horse archery... :'-(
    I spent some time on them before and also am trying to improve them in this version. (Before they would immediately charge) How many volleys did they fire? Ive seen them spend all their arrows before but that was in a different test format than yours.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  12. #12
    delra's Avatar Praepositus
    Join Date
    Jun 2007
    Location
    Warsaw, Poland
    Posts
    5,590

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    With Javelins it's pretty strange too:

    5x Hastati vs Elephant Cataphracts: Not ONE javelin kill.

    5x Leves vs Elephant Cataphracts: Elephants routed after the 2nd salvo, vast losses.

  13. #13

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Horse archers were ridiculously overpowered in EB1, we won't see a return of that.

    Skirmishing range we can't do anything about - there is only one value for all types of cavalry missile. So either we have horse archers getting into javelin range, or we have javelineers never throwing.

    In any case, z3n is looking at this now, we know there's an issue with AI cavalry usage.


    As to Hastati v Leves against elephants, they are different types of units using different weapons. Skirmishers get a bonus against elephants, line infantry do not. Hastati use a pilum, not a light javelin. There are a also a lot more Leves, throwing a lot more javelins.
    Last edited by QuintusSertorius; August 12, 2015 at 10:35 AM.

  14. #14

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Gracul AI is based primarily on campaign, the backstabbing between factions and the helluva stronger Mongol spawn dread stack script.

    For the battle SS uses Germanicus5 battle AI, which is also used by TA and CoW as far as I know. This AI is known for repeated charges, running for the high ground when attacked and some semblance of the flanking maneuver. However, it is pron to crushing when there is reinforcing army on the battlefield, and you need to apply fix for it. I think EBII team has removed it form their current build because of it.
    Last edited by Mr. Blob; August 13, 2015 at 03:50 AM.

  15. #15

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    "Skirmishers get a bonus against elephants, line infantry do not. Hastati use a pilum, not a light javelin."

    Why do skirmishers get the bonus and the others don't? Because of different javelins?

    As long as the unit has the "thrown" attribute, it will get a big bonus against elephants. That's why Point Blank started giving "elephant -10" mount_effect to javelin units.

    A pilum is a heavy javelin?

  16. #16
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,636

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Update on the situation.

    This will be not just fixed but improved (in my opinion) in the next update. Cav should now withdraw during a time a human would pull back for another charge. (i.e. right at the moment when they're starting to lose men at a faster rate than the enemy)

    There's also a few other misc improvements I don't really have time to list.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  17. #17

    Default Re: Real-Time Battles: How to Get the AI to Withdraw Cavalry for Multiple Charges?

    Quote Originally Posted by z3n View Post
    Update on the situation.

    This will be not just fixed but improved (in my opinion) in the next update. Cav should now withdraw during a time a human would pull back for another charge. (i.e. right at the moment when they're starting to lose men at a faster rate than the enemy)

    There's also a few other misc improvements I don't really have time to list.
    Thanks for the update, z3n! I can't wait to see it in action. What sounds like a small change can substantially increase the difficulty of battles, which is always welcome in my book...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •