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 Noir
    Your argument concerns only the initial conditions and not the course of a battle that can change them.
    Not really, obviously the initial assessment is the key one in that it ought to provide the AI with a clear understanding of its strategic or tactical position and indicate the nature of its most promising solution. But one would hope that the AI is constantly re-evaluating its situation during play so that it can modify its initial decisions.

    In fact, I'm sure it does this becuase as I've already said it is possible to play the AI for a sucker by feeding or denying it opportunities during play. Thus you can create false opportunities to draw it into traps and you can deny it opportunities to render it passive.

    Quote Originally Posted by Noir
    Having an aim he takes an action - so the "do-nothing" option doesn't sound convincing for the TW Ai to me.
    And yet it is possible to acheive and therefore must be an option the AI considers valid under the right circumstances.

    Quote Originally Posted by Noir
    however you seem to claim that the AI breaks down upon being confronted with equal forces.
    No, what I said is that no AI can calculate a solution if its assessment is faced with a totally balanced situation. It hasn't broken down, it merely has nothing to work with, thats why all AI routines have override routines that trigger a 'do something' action when the AI cannot make a decision.

    Quote Originally Posted by Noir
    I sincerely doubt that - but its easy to check: just make up two identical 20 units armies in custom and pit them in flat ground. I bet that if the AI is on the offensive he'll come at you.
    Only becuase that is the most like 'do something' action programmed for that situation.

    Quote Originally Posted by Noir
    The "passive" AI - was a new bug in TW to the best of my knowledge - i haven't obsrved it in any of the previous games and certainly not in the two older ones. You seem to claim that it is an inherent property of the AI. It doesn't sound right to me.
    Nope, that situation has been in existence since day 1, I've used it in STW, RTW, MTW and I'm still using it in MTW2. Arbalesta's were brilliant at explioting the passive AI in MTW for example, as were muskets in STW.

    However, its not a bug and its wrong to call it one. In most instances it occurs because the AI has calculated that an attack cannot succeed and yet the morale state of its units does not justify a withdrawal. To overcome this CA have introduced some additional 'do something' triggers which seem to kick in if the AI units are suffering excessive missile casualties.

    This 'do something' routine overrides the AI and forces the AI controlled units to make a pointless attack on the missile unit inflicting the most casualties. The result leads to the unit chasing the missile troops until the action is overridden by a fresh AI assessment that points out the futility and risk of the action and causes them to break off and return to their original position.

    I exploit this conflict between the AI and the 'do something' routine a lot during sally battles as the AI recognizes the threat posed by the city wall defences but is constantly overridden by the 'do something' routine when hit by sallying missile troops. Thus you can kite the AI units into range of the wall defences, wait for the AI routine to kick in and order them to withdraw, then shoot them in the back with the sallying missile troops as they fall back triggering the 'Do something' routine to override the AI and order them to attack and repeat the process until you run out of arrows.
    Didz
    Fortis balore et armis

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

    Default Re: So How has the AI improved ??

    A simple test to prove the existence of the 'Do Something' routine.

    Just to prove the existence of the 'do something' sub-routine here is a very simple test.

    Step 1. A level playing field leaving the AI to decide.

    By Didz at 1969-12-31
    Two identical units of spearmen face each other over a totally level peice of ground. The AI commanding the Scots has been told it is on the defensive and so the 'do something' routine has not overridden the AI to force it to attack. Consequently the AI does nothing as it cannot calculate any solution.
    I left these units staring at each other for 15 minutes before taking this picture nothing moved.

    Step 2: A level playing field but letting the 'Do Something' routine override the AI.

    By Didz at 1969-12-31
    A second battle with exactly the same set-up, except that this time the AI has been told that it is the Attacker. Therefore, when the battle engine detects that the AI is unable to calculate a solution the 'Do Something' routine kicks in to override the AI and force it to attack. The affect was instantaneous with the Scots advancing as soon as the battle started.

    Step 3: Proving that the AI does exist.

    By Didz at 1969-12-31
    Finally, just to prove that the AI does exist and will calculate a solution if it has the potential to do so. The third test puts the AI back on the defensive but this time gives it more troops and thus a numerical advantage. As you can see in this final test despite being on the defensive as in Step 1 the AI has calculated the odds realised it has an advantage and has ordered an attack.

    Conclusion
    As predicted, if the AI is presented with a totally balanced scenario and left to its own devices it will do nothing. However, if the 'Do Something' routine is told it is the attacker, it will override the AI and force the AI to attack even though it still has no advantage. Finally, if given an advantage the AI will move to expliot that advantage even though it is contrary to its mission.
    Last edited by Didz; 06-24-2007 at 01:03.
    Didz
    Fortis balore et armis

  3. #3
    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 Didz
    Step 3: Proving that the AI does exist.

    By Didz at 1969-12-31
    Finally, just to prove that the AI does exist and will calculate a solution if it has the potential to do so. The third test puts the AI back on the defensive but this time gives it more troops and thus a numerical advantage. As you can see in this final test despite being on the defensive as in Step 1 the AI has calculated the odds realised it has an advantage and has ordered an attack.

    Conclusion
    As predicted, if the AI is presented with a totally balanced scenario and left to its own devices it will do nothing. However, if the 'Do Something' routine is told it is the attacker, it will override the AI and force the AI to attack even though it still has no advantage. Finally, if given an advantage the AI will move to expliot that advantage even though it is contrary to its mission.
    Hello,

    sorry for coming so late into this discussion. Didz and Noir make both interesting points. I can't possibly comment on all of them but I'm inclined to agree more with Noir. Anyway, this third step that Didz posted seems odd to me. Yes, the AI has a numerical advantage and it's right to attack in that situation. What I don't understand is, why it doesn't attack with both units at the same time. Judging from the picture and my own tests the AI doesn't seem to coordinate its units. If it had walked its general unit to the back of the enemy unit it surely would've had better results in terms of casualties. Shouldn't the AI be aware of that and wasn't that the case in STW and MTW?

    How did this test play out Didz? Was the general just standing there, doing nothing or did it eventually join the fight?

    I've already posted this somewhere else, but imo it should be almost impossible to beat the AI if both armies are equal and on flat terrain. The unbeatable advantage of the AI should be numerical assessment of the situation (terrain, morale, weather, unit strength, etc.), its reaction time and the ability to manage 20 units simultaneously.
    This poses the question: What exactly is the AI doing anyway?
    I'd love to hear a response from CA to that.

    R'as

    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

  4. #4
    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 ??

    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...
    Anything wrong ? Blame it on me. I'm the French.

  5. #5
    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

  6. #6
    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

  7. #7
    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.

  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 ??

    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

  9. #9
    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

  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 ??

    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