Results 1 to 30 of 57

Thread: So How has the AI improved ??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: So How has the AI improved ??

    Quote Originally Posted by R'as al Ghul
    How did this test play out Didz? Was the general just standing there, doing nothing or did it eventually join the fight?
    To be honest I never bothered to play these battles out to a conclusion as it wasn't necessary to establish the point I was testing. But I agree with you that whilst the AI seems to have decided that attack was a good strategy it doesn't seem to have made best tactical use of its resources.

    That second unit did just stop where it is shown and watched its partner fight, whereas I'm pretty sure a human player would have moved it round the enemies flank or rear as you suggested.

    Again this could be a random trigger that chooses each units tactical response and perhaps the programmer thought flanking moves inappropriate for spearmen. It depends really on where the AI breaks off in terms of its assessment, perhaps it doesn't get involved in the close in tactical stuff.

    If such close in tactical decisions are determined by random triggers then that might also explain why attacks by the AI are often so fragmented. Its has certainly puzzled me in the past why the AI would calculate that an attack was a good strategy and then only send one unit to be slaughtered at a time instead of its entire battleline. Likewise the fact that it doesn;t always do it, suggests some sort of random factor is involved.
    Last edited by Didz; 06-25-2007 at 16:08.
    Didz
    Fortis balore et armis

  2. #2
    Clan Takiyama Senior Member R'as al Ghul's Avatar
    Join Date
    Jan 2003
    Location
    ignores routers who aren't elite
    Posts
    2,554

    Default Re: So How has the AI improved ??

    Quote Originally Posted by Kobal2fr
    My guess is that in the 3rd test, the AI doesn't wish to commit its general for fear of losing him to a bad die roll. After all, it doesn't need to to win : either its spears win the 1-on-1 fight and it wins, or the player wins the fight with a severely depleted unit that the general unit is sure to beat. Whereas should both units attack, and the player kills the AI captain, both AI spears could end up routing...
    Mmmh. If the enemy spear unit is engaged and the General walks around to launch an attack in the rear how can the General get killed? I think waiting for the melee to be decided offers a greater chance to loose the general because the AI has to launch a second frontal attack, which poses a greater risk to the Gen than attacking the rear.

    Quote Originally Posted by Didz
    If such close in tactical decisions are determined by random triggers then that might also explain why attacks by the AI are often so fragmented. Its has certainly puzzled me in the past why the AI would calculate that an attack was a good strategy and then only send one unit to be slaughtered at a time instead of its entire battleline. Likewise the fact that it doesn;t always do it, suggests some sort of random factor is involved.
    Random factors would certainly explain a lot but I shudder to think that's purely random. I also think that any manouver should be available to all units if the situation is appropriate. Not having spears doing flanking manouvers would certainly be a programmed disadvantage or a simple omission.
    I'm certain that the tactical AI in STW is better in that respect and that the same test would have played out differently. I may post some results if I find the time to test that theory.

    Singleplayer: Download beta_8
    Multiplayer: Download beta_5.All.in.1
    I'll build a mountain of corpses - Ogami Itto, Lone Wolf & Cub
    Sometimes standing up for your friends means killing a whole lot of people - Sin City, by Frank Miller

  3. #3
    Village special needs person Member Kobal2fr's Avatar
    Join Date
    Nov 2006
    Location
    Paris, France
    Posts
    914

    Default Re: So How has the AI improved ??

    Quote Originally Posted by R'as al Ghul
    Mmmh. If the enemy spear unit is engaged and the General walks around to launch an attack in the rear how can the General get killed? I think waiting for the melee to be decided offers a greater chance to loose the general because the AI has to launch a second frontal attack, which poses a greater risk to the Gen than attacking the rear.
    Because flanked/rear-attacked elements in a unit will turn around to face the new threat. Sure, it's a lower chance of death than being attack frontally, but as they say, "next to none is worse than plain ol' none". And frankly, I'd rather have the AI use its generals timorously than recklessly. How many times have promising STW/MTW/RTW battles turned sour and boring because the AI just charged its general head-on and died stupidly ?
    Anything wrong ? Blame it on me. I'm the French.

  4. #4
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: So How has the AI improved ??

    Quote Originally Posted by Kobal2fr
    Because flanked/rear-attacked elements in a unit will turn around to face the new threat. Sure, it's a lower chance of death than being attack frontally, but as they say, "next to none is worse than plain ol' none". And frankly, I'd rather have the AI use its generals timorously than recklessly. How many times have promising STW/MTW/RTW battles turned sour and boring because the AI just charged its general head-on and died stupidly ?
    Hello,

    It's hard to judge whether it's too far away for moralesupport and a -hit, so we give it the benefit of the doubt there. By far the best action (keeping general safety in mind) is to move the generalunit closer to the action, ready to immediately backstab/flank in case unit one loses (against all odds). This will be a double cutting sword (which might already be the case) and provides the strongest position (in this case) if everything goes wrong.

    More checks are needed, because the AI may 'know' it will win and just keep his general out of harm.

    -What happens when there are more than 2 AI melee units? Two of them are not a general, so will it use quick hammer and anvil then?
    -What does it do when it certainly needs more than one unit to defeat the player?
    A. two AI units, so the AI general must fight.
    B. more than two AI units, so the general may not have to fight.
    Ja mata

    TosaInu

  5. #5
    Village special needs person Member Kobal2fr's Avatar
    Join Date
    Nov 2006
    Location
    Paris, France
    Posts
    914

    Default Re: So How has the AI improved ??

    Agreed on all points but one : if the general unit gets too close, then it gets too close to charge. The best charge distance for inf. units is 40 errr... meters ? squares ? game units ? Anyway, 40 of those. Or, 1/3rd shortbow range. And remember that spear units generally have a high charge bonus to go with their crummy combat stats and penalty against infantry, so unless 40... things is further than the morale boost area, it's probably a better idea for the general to stay back in case the 1-vs-1 fight goes pearshaped.

    I wholeheartedly agree that said charge opportunity would probably be better used with the general on a flank, so that even if the first unit routs, it in turn gets a flanking chance should it rally later. But I also recall reading somewhere that units that are cutoff from their side of the map get a big morale penalty, so the AI might be taking that into account here, and not dare risk it.
    Anything wrong ? Blame it on me. I'm the French.

  6. #6
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: So How has the AI improved ??

    Hello Kobal2fr,

    Quote Originally Posted by Kobal2fr
    Agreed on all points but one : if the general unit gets too close, then it gets too close to charge.
    True, but it would get the complete benefit of a backstab, while the enemy unit could turn around and fight back when the general is keeping distance (1 cycle of combat is enough to get the AI general killed). It's a con and a pro vs another con and pro I think the unit would be seriously dented and not be able to do anything when receiving a proper blow in the back, instead rout instantly.

    I wholeheartedly agree that said charge opportunity would probably be better used with the general on a flank, so that even if the first unit routs, it in turn gets a flanking chance should it rally later. But I also recall reading somewhere that units that are cutoff from their side of the map get a big morale penalty, so the AI might be taking that into account here, and not dare risk it.
    Turn it around: the AI general could cut off the players side of the map (the player would be sandwiched). Indeed, of course still a chance that the AI general will get a fit too, but then it doesn't see propely what his ally is doing.
    Ja mata

    TosaInu

  7. #7
    Clan Takiyama Senior Member R'as al Ghul's Avatar
    Join Date
    Jan 2003
    Location
    ignores routers who aren't elite
    Posts
    2,554

    Default Re: So How has the AI improved ??

    Quote Originally Posted by Kobal2fr
    Because flanked/rear-attacked elements in a unit will turn around to face the new threat. Sure, it's a lower chance of death than being attack frontally, but as they say, "next to none is worse than plain ol' none". And frankly, I'd rather have the AI use its generals timorously than recklessly. How many times have promising STW/MTW/RTW battles turned sour and boring because the AI just charged its general head-on and died stupidly ?
    Yes, right, they can turn around now. I forgot.
    Anyway, it hasn't happened to me before that the General gets killed in such a manoeuver and I think the chances are pretty low that it happens.
    Of course I don't want any Suicide Generals either but that's something different.

    Singleplayer: Download beta_8
    Multiplayer: Download beta_5.All.in.1
    I'll build a mountain of corpses - Ogami Itto, Lone Wolf & Cub
    Sometimes standing up for your friends means killing a whole lot of people - Sin City, by Frank Miller

  8. #8
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: So How has the AI improved ??

    Hello,

    A quick test in MTW VI using equal infantry units, on a flat map.

    AI attacking: general and another unit.
    Player defending: general.
    Both AI units attack immediately. The unit acts as anvil, the general moves into flank position, but doesn't coordinate well and hits its own unit first (thus cancelling the charge).


    AI defending: general and another unit.
    Player attacking: general.
    Idem.


    When I 'cheat' and run the last yards, the AI general gets into flanking (almost).



    AI attacking: general.
    Player defending: general.
    AI attacks after a few seconds.


    AI defending: general.
    Player attacking: general.
    AI waits, launches attacks when the player marches closer to a distance of 3 tiles. I guess fatigue, however small, is the perceived opportunity.
    Ja mata

    TosaInu

  9. #9
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: So How has the AI improved ??

    Custom battles in M2TW are no way to test the AI.
    Even if the AI is defending and you have a grand advantage, it will "do something" and attack you. It will also not get stuck if its army consists partially of missiles/artillery.

    In campaign battles, this is very different, with the AI holding its ground as defender when outnumbered and even as attacker often getting stalled if it has artillery.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  10. #10
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: So How has the AI improved ??

    @TosaInu
    That sounds a lot more sensible, the AI seems to be using its General unit sensibly in every example, or at least trying to.

    @FactionHeir
    I think that was where I came in...the key point being that campaign battles are pretty much never going to be balanced and so the AI will be able to calculate a solution from 'Start Battle' and seems to have more control over what happens.

    I think much of the problem with sally battles is that the AI has no options at the start of the battle because basically all the enemy units are beyond its reach inside a city wall. For some reason this seems to get the AI off to a bad start from which it rarely recovers fully and certainly this is the type of battle where it is most easy to play the computer for a sucker.
    Last edited by Didz; 06-25-2007 at 22:37.
    Didz
    Fortis balore et armis

  11. #11

    Default Re: So How has the AI improved ??

    Well I must say I've had a good laugh anyway

    ......Orda

  12. #12
    Member Member Didz's Avatar
    Join Date
    Oct 2000
    Location
    Bedfordshire UK
    Posts
    2,368

    Default Re: So How has the AI improved ??

    Quote Originally Posted by R'as al Ghul
    I'm certain that the tactical AI in STW is better in that respect and that the same test would have played out differently. I may post some results if I find the time to test that theory.
    Thats my recollection too.

    I can recall that the AI in STW was very good at identifying beneficial terrain and pretty difficult to prize off it once it had established itself. Likewise the matching of units in close combat was also pretty effective, much more so than in MTW2.

    However, I wonder how much of this is down to the sheer complexity of MTW2 combat as opposed to STW. STW after all had compartively few units types and all armies had the same whereas MTW2 has much more variety to cope with. Like wise I wonder how many of the current problems are due to the gradual introduction of more and more 'do something' triggers to the mix, which overrides the AI to force units to respond to specific situations. The one thing which is definately possible in MTW2 which was never the case in STW is the ability to 'kite' computer controlled units into suicidal attacks. In STW the AI simply stuck its nose in the air and refused to be suckered but in MTW2 the 'taking excessive missile casualties' trigger alone can be used to 'kite' specific individual units into traps by triggering a foolish attack move.
    Quote Originally Posted by R'as al Ghul
    Random factors would certainly explain a lot but I shudder to think that's purely random.
    By random I didn't mean totally random, but rather a random selection from a pre-determined set of actions the programmer/designer considered appropriate under those conditions.

    So, for example if a unit is hit by missile fire and takes an excessive amount of casualties there is a pretty good chance that the 'do something' code will kick in and override its current action with an order to 'attack the missile unit'. That seems to be an almost standard response for all except missile units with ammo.

    However, sometimes the attack of the first unit with trigger a more general advance, which suggests that there is a secodnary 'do something' trigger that says something like 'if the unit next to you attacks, then you attack'. However, this is not consistent, sometimes it happens sometimes it doesn't suggesting that it is only one of at least two random actions available when that 'do something' trigger is activated.

    I suspect that over the course of the series more and more of these triggers have been incorporated into the code in an attempt to combat specific complaints about the performance of the AI. After all the easiest way to deal with complaints about a 'passive AI' is to code enforced actions into the battle enegine that make units do something.

    However, the problem is that because they are triggered by specific events they do not take into account the wider tactical situation and so not only can they be explioted by human players but they frequently produce 'dumb' results.
    Last edited by Didz; 06-25-2007 at 20:18.
    Didz
    Fortis balore et armis

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO