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
    Master Procrastinator Member TevashSzat's Avatar
    Join Date
    Nov 2006
    Location
    University of Pennsylvania
    Posts
    2,367

    Default Re: So How has the AI improved ??

    The ai imo has improved since RTW. That being said, it still has much faults. Personally, I think the battle ai is half decent like it wont do anything that incredibly stupid, but any decent player can easily win outnumbered. The bigger problem is the campaign map ai. They just have a horrible sense of economics and somehow thinks that they must spend every penny they have every turn or someone will come out and take it. What ends up happening is that they spend a huge amount of money creating this huge militia armies whose upkeep doesn't allow them to upgrade their cities hence forcing them to only rely on militias until late in the game.
    "I do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me." - Issac Newton

  2. #2

    Default Re: So How has the AI improved ??

    Originally posted by Didz
    Two opposing but identical spear units facing each other across a totally flat peice of terrain. No wind, no sun in eithers eyes, absolutely identical conditions and stats. The only difference between each is the colour of their uniforms. The AI assesses the situation and comes up totally blank. There are no advantages to be gained by moving, there are no disadvantages either. If it attempts to move to a flank the enemy will change frontage. Worse case scenario is that if it moves it loses unit cohension therefore it stands and does nothing. Therefore, its default 'do something' sub-routine kicks in and forces it to perform a random action. It advances, the result could go either way, but the result was not initiated by the AI but by the default 'do something' routine which overrode the AI to make it attack.
    I've run several such situations with the aim to "test" unit performance in melee. There are things that do make a difference in such a situation and the AI seemed always aware of most of them and used them :

    1. Attack the opponent partly from the flank/rear: the AI marches diagonally to the enemy unit aiming to "hit" partially the flank in the charge. This little advantage in first kills with the charge may be the deciding point. The AI acknowledges it and uses it.

    2. Hitting a full face of the enemy unit upon charging: if you manage to hit with all the front of your unit simultaneously the flank of an enemy unit at the charge, the charge will be devastating - if a few only men of yours do so, then the charge is not as effective. The AI seems fully aware of this and uses it in such confrontations.

    3. Hold formation/engage at will: hold a charge with hold formation/engage at will after charge is over. The Ai doesn't seem particularly inept at doing this. I know though that for example if you pit cavalry that can do wedge he'll use that because its more effective on the charge. The AI uses the special abilities but not the melee modes.

    4. Formation width during melee : it does affect a lot especially relative to how an opponent fights, for example : if the X spears are in hold formation in a medium size breadth formation, then the Y spears can be employed at an engage at will wider formation to catch both flanks, and "eat" the enemy formation from the sides.

    Assuming a very small slope exists somewhere:
    5. The AI will pace the unit he controls and move diagonally towards you along the slope so when you engage he has a small high ground advantage.

    This is AI competence purely IMO - there is no "do-nothing" routine kikcing in IMO because there's plenty to consider. Moving around may give a potential advantage by the relative positions of the units ie how you approach the enemy unit - how much you and they are fatigued - how you fight them in melee upon engagement (you can also change the formation breadth during melee, by dragging it longer and click immediately attack, more of your guys will line on the flanks of the enemy then. Depending how the opponent fights - ie are they spears or swords? - it might give an advantage in kills or serve a purpose (hold up/pin more than one units)).

    *edit*= Your example is also the only occasion where the gameplay is left essentially with a single match up (no better or worse match ups no match up component) and only some partial flanking (and not with a reserve unit) - that is it is dramatically restricted in possibilities as it has been reduced in gameplay components. Therefore it is inadequate IMO and for the truth of it try to imagine how much more complex the situation becomes if you add to both sides a sword unit. That is: a sword and a spear vs a sword. and a spear.

    Will in the range of the possibilities of this new encounter the AI be tested or not? Now there is really plenty to do: pin the sword with your spear and aim for your sword to kill the enemy spear quicker. Double the enemy sword or spear. Let the enemy double your sword or spear with the aim to flank with the other. Pin both the enemy sword and spear with one of your units and take them peacemeal by flanking with your second unit. Pin the enemy spear with your spear and get the enemy sword by a better charge.

    The Ai will not just "stay there" - even if he has no initial plan and he is adapting to your movements. Do nothing is not an option he'll take his chaces when the opportunity comes to defeat you.

    The situation will become all the more complex if you add a horse and even more if you add a shooter. Equal forces - flat ground but immenselly more complexity of possibilities to test the opponents than your example.

    It is in the exploring and executing of these possibilities that the AI is tested. Now try the same experiment adding a few upgrades to your units or putting them in a hill.

    The odds are tipped to one's favor - unless the payer does a major/singularity mistake (giving up the high ground) there's no match up that he'll lose (due to the upgrades or the high ground) and flanking cannot be done effectively as the opponent is slower than you (he has to move uphill to flank you) nor does it have the same effect (if your units have upgrades). So which exactly quality of the AI is tested there?

    The same goes if one has reserves and the AI has not.

    Many Thanks

    Noir
    Last edited by Noir; 06-23-2007 at 14:39.

  3. #3
    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
    This is AI competence purely IMO - there is no "do-nothing" routine kikcing in IMO because there's plenty to consider even if the ground is flat.
    Sorry, to be pedantic about this but there must be.

    In fact, I would bet on the fact that some of the examples you just listed are probably the default 'do something' options hard wired into the AI.

    The bottom line here is that a computer program cannot make a choice or exercise a reasoned judgement, it can only calculate mathematical odds. Therefore, if you present an AI with a scenario which is totally balanced it cannot calculate a solution. In the MOD scenario I mentioned the navy actually thought that the program had crashed or frozen and wasted months looking for a program bug. It was only after careful analysis that it was realised exactly what had happened. The video footage actually shows the missile defence systems controlled by the AI dithering between one threat and the other as it AI system desperately tried to calculate which threat was the greater during the few seconds prior to impact.

    Presented with a perfectly balanced situation in a TW game the AI will do exactly the same thing, and we even have some evidence of this in the way troops dither about in battles and armies do in campaigns.

    The only way to break this effect is to overide the AI and give it a direct arbitary action, which says if the threat assessment is balanced 'do this'. Therefore, we need to be careful when we set the AI tests that we are actually testing the AI, and not this 'do something' routine.

    I would even go so far as to suggest that some of the passive AI complaints might be the result of the AI's inability to calculate a solution. I certainly don't see any evidence to support your statement that the 'AI will not just stay there' as I've explioted this very failing too often in both battles and seiges to inflict critical missile casualties on the AI controlled army. They do absolutely just stay there and let you shoot them, in fact, interestingly I've noticed that on some occassions they will let you empty your entire ammunition supply into them and then when you begin to withdraw your missile troops will actually try to advance. Suggesting to me that the detection of the movement to the rear is just enough to sway the AI routine into making a decision to attack.
    Last edited by Didz; 06-23-2007 at 14:38.
    Didz
    Fortis balore et armis

  4. #4

    Default Re: So How has the AI improved ??

    Originally posted by Didz
    The only way to break this effect is to overide the AI and give it a direct arbitary action, which says if the threat assessment is balanced 'do this'. Therefore, we need to be careful when we set the AI tests that we are actually testing the AI, and not this 'do something' routine.
    The AI is an aggregation of the do-this or do-that routines in all probability - what to test is how all these perform in unison.

    Your argument concerns only the initial conditions and not the course of a battle that can change them. The AI responds to that or even takes the initiative. Also you forget that when the AI "attacks" by default he will come at you and try to break you with his forces whether equal or not. If he is defending he will try to resist your assault whether he has equal forces or not.

    Having an aim he takes an action - so the "do-nothing" option doesn't sound convincing for the TW Ai to me.

    (PS please read the edit of the above post i was writing while you posted - thanks.)

    PPS It might be a be-still is better than moving option (while in defence for example), however you seem to claim that the AI breaks down upon being confronted with equal forces. 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.

    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.

    Many Thanks

    Noir
    Last edited by Noir; 06-23-2007 at 15:01.

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

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

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

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