Results 1 to 16 of 16

Thread: Need Insight on Defending AI

  1. #1
    Voice Crying in the Wilderness Member Bullethead's Avatar
    Join Date
    Aug 2002
    Location
    Wakefield, LA
    Posts
    164

    Default

    In a nutshell, my question is as follows:

    When the AI is the defender in a battle, what makes it decide to make it's stand at Point A instead of Point B?

    I ask because I'm trying to make historical battles. Naturally, in real life, the defender stood in a certain position. So I set the battle up that way and give the AI the defensive because it seems to work better that way. But then when I run the battle, the defending AI decamps and sets up elsewhere. Why?

    Some of the AI's decision-making seems to be based on relative strength--the AI sometimes seems less likely to redeploy if it feels itself weak. But that's about as far as I can get.

    So what does the AI look for when picking a defensive position? How does it like to arrange its troops? Why doesn't it like field fortifications like rows of stakes and wagon laagers?

    If I knew how the AI thinks on the defensive, I could maybe tweak the initial set-up so it would be more likely to maintain the position I put it in.

    ------------------
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria

    And by chance, if the enemy routs, you come upon some nubile nymph or doxy that strikes your fancy, remember: Hands off! Rank has its privileges. I pick first! - Ferrano the Chivalrous, Conqueror of Marakesh

  2. #2
    Senior Member Senior Member Wellington's Avatar
    Join Date
    Sep 2002
    Location
    Den Haag, Netherlands
    Posts
    1,442

    Default

    EXACTLY my problem as well.

    It would appear that the AI (if defending) tends to march off to the best defensible position in the 'near locality' - generally meaning the highest possible position.

    This is a MAJOR pain if your trying to build an Historical battle where the combatants were arranged on the lower slopes of a hill (for example).

    I also have problems in HB (Historical Battles) and HC (Historical Campaigns) in that I wish to have the defenders arrayed on the lower slopes of a hill - but they will almost always march away to fing the 'best' defendable ground nearby. This results in a major pain for people creating HB/HC battles as the defending forces will invariably 'move' if their position on the map is deemed to be 'unsuitable' (whatever that means) by the AI.

    The best approach I've realised is to take some Historical liberties and amend the map/unit placings/heights in orde to minimise this AI trait.

    Whilst you may not have a Historical scenario,at least it may be more playable.

  3. #3

    Default

    The AI repositions him selve for the following reasons (im my opinion you understand).

    1) Flanking by the player
    2) A better defensive position can be found else where.
    3) The players forces look weak so it charges him.

    Thoses are 3 theories I have regarding what I have seen the AI do in tests of my own work and for my Hack and slashing pleasure.

    In the case of the latter, when my force looked strong he moved away from me and was reluctant to attack head on.

    Giskard

  4. #4

    Default

    Exactly my problem as well particularly for big multi-faction battles. I was doing a trial for Naseby and I had 3 Parliamentary divisions facing 3 Royalists - Skippon (left) vs Astley, Cromwell (me) vs Charles, Ireton (right) vs Rupert. Anyways, before the battle begins Skippon abandons his post before Astley and his 5 culverins! marches clear across my front just as Charles launches his Lifeguards in an attack (w/c disorders me to no and) and joins Ireton on the right. What then happens is Skippon's artillery is slaughtered by Astley who then falls on my flank while Charles is assailing my center. The New Noddles break and run and its only a matter of time before the three combined destroy Ireton and Skippon holding out on a hill on the right.

    Couldn't the stupid AI see that he was being opposed to his front? Didn't he see the uselessness of abandoning his guns? Unbelievable.

    Gilbert de Clare
    "Ad majoram Dei gloriam"

  5. #5
    CA CA GilJaysmith's Avatar
    Join Date
    Aug 2002
    Location
    Creative Assembly / Littlehampton
    Posts
    884

    Default

    Make the AI the attacker. There's no other way to help it out in the historical battles I'm afraid.

    The AI only takes note of major terrain features and doesn't look at models. Therefore, placing models in a defensive configuration won't register with it.

    Gil ~ CA

    Gil ~ CA

    This Panda

  6. #6

    Default

    Would it be possible then that the AI looks at the highest ground as the most advantageous and goes for it? It certainly seemed thats what happened at my Naseby trial - the right wing faction of the Parliamentary side (Ireton) was on a big hill and Skippon abandoned his cannon and my flank to join him there.

    Similarly it looks for bottlenecks like bridges over rivers am I right?

    Gilbert de Clare
    "Ad majoram Dei gloriam"

  7. #7

    Default

    Hills are the ai's preferred position. It takse into account gradient, height and distance.
    On flat maps, you might be able to get it to stand where you want by slapping a wood on each end of the line you want it to defend. Of course if you play on hard or above it might just decide to sit in the wood instead :-)

  8. #8
    Senior Member Senior Member Wellington's Avatar
    Join Date
    Sep 2002
    Location
    Den Haag, Netherlands
    Posts
    1,442

    Default

    I understand what you CA guys are saying, but don't accept the manner in which the AI is currently coded (on a 'high level orders perspective').

    The following should not be construed to be critical .... but ...


    Quote Originally posted by GilJaysmith:
    Make the AI the attacker. There's no other way to help it out in the historical battles I'm afraid.[/QUOTE]

    In that case why call the Historical Battles and Historical Campaigns menu's for MTW 'Historical'?

    You've opened the game enough to allow modders the ability to build new Battles/Campaigns but at the same time restricted the 'high level orders' that can be associated with an AI faction.

    If your going to allow 'Historical' menu options that are moddable then please provide the basic attributes required for your customers to create HISTORICAL scenarios.

    Quote Originally posted by GilJaysmith:
    The AI only takes note of major terrain features and doesn't look at models. Therefore, placing models in a defensive configuration won't register with it.[/QUOTE]

    Ok, but that being the case what the hell is the point of allowing stakes/wagons to be built in the map editor? These are defensive structures and as such should be taken into account (specifically with respect to factions that have been defined as DEFensive as opposed to ATTacking, and which find such structures/models in their immediate vicinity), regardless of whether the structures pertain to a LOCAL or ARTIFICIAL faction.

    Quote Originally posted by longjohn2:
    Hills are the ai's preferred position. It takse into account gradient, height and distance.
    On flat maps, you might be able to get it to stand where you want by slapping a wood on each end of the line you want it to defend. Of course if you play on hard or above it might just decide to sit in the wood instead :-)
    [/QUOTE]

    That being the case, what is the purpose of a parameter such as 'HoldPosition::true' (in an ADF) when the AI will totally ignore such a parameter ?

    It appears that the AI (if defined as being defensive) totally ignores any parameters that were presumably intended to provide some 'historical' attributes pertaining to their high-level actions ?

    Both you and I know it's little work to effect a 'HoldPosition:true' parameter for an AI unit; such a parameter could also be further qualified by coding the AI to automatically allow 'good' melee units (thus specified) to charge when any enemy unit approaches their 'melee radius'.


    I fully understand that most customers may well be more interested in other areas (on-line etc and available resources have to directed towards the marketable aspects of MTW.

    However, if CA choose to specifically associate 'Historical', and modifiable, scenarios with MTW then please consider the time spent by some modders in attempting to utilise these features and after much trial and error ascertaining that the 'Historical' element is a misnomer.

  9. #9
    Senior Member Senior Member Lord Krazy's Avatar
    Join Date
    Jul 2002
    Location
    Elephant Free State
    Posts
    1,638

    Default

    I was just thinking if you can control
    the events in the demo then why can't you
    do this in historical battels.

    So you could tell one side not to do x until
    y was achieved.Like when the game won't
    proceed in the demo until you do what you are told.I don't know if this is possible
    as I have not had a chance to test it yet.
    ---------------------------------------------
    Welly has made some very good points
    to which I would like to add something

    I have seen a post where gil gay wrote
    something to the efect that we could change
    the end date because it was hard coded
    but surly the people who wrote the code could.
    and surly the same applies to what Welly wrote .

  10. #10
    Voice Crying in the Wilderness Member Bullethead's Avatar
    Join Date
    Aug 2002
    Location
    Wakefield, LA
    Posts
    164

    Default

    longjohn2 said:
    Quote Hills are the ai's preferred position. It takse into account gradient, height and distance.[/QUOTE]

    I can attest to this--it's certainly not just absolute altitude. Suppose you have the rather common type of hill that has a fairly steep slope at the bottom and then gradually levels off higher up. This convex slope means that if you're at the top of the hill, the bottom of the hill is dead ground, and vice versa.

    This means there are pros and cons to being on such a hilltop. Your own archers can't shoot until fairly short range, after the enemy has climbed the steepest part, but also vice versa. So if you're out-gunned, you might want to stay on the top. OTOH, because the slope there isn't as steep, your grunts don't get as much of an altitude advantage when it comes to push of pike. But OTGH, you make the attacker climb nearly the whole hill so he's going to be more tired when he arrives.

    This all said, it seems to me the AI prefers to defend on the steepest slope. So if put on such a hilltop, it will move down to the top of the steepest slope. Problem is, if there is any room on the flanks, the attacker can now send units around to the top of the hill behind and above the defending AI, especially if the attacker leaves some units facing the AI below the hill.

    I agree with Wellington that scenario designers need more control over AI behavior. The inability to specify where the defending AI deploys really puts a crimp on doing historical battles. To me, the AI is a better defender than attacker, so it's more challenging to the player to have to attack. I sincerely hope CA invests some time in improving this aspect of the game.

    ------------------
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria

    And by chance, if the enemy routs, you come upon some nubile nymph or doxy that strikes your fancy, remember: Hands off! Rank has its privileges. I pick first! - Ferrano the Chivalrous, Conqueror of Marakesh

  11. #11
    CA CA GilJaysmith's Avatar
    Join Date
    Aug 2002
    Location
    Creative Assembly / Littlehampton
    Posts
    884

    Default

    Quote Originally posted by Lord Krazy:
    I was just thinking if you can control
    the events in the demo then why can't you
    do this in historical battels.
    [/QUOTE]

    Sadly, the tutorial functions on a very complicated script - rather than on an easily accessible or obvious one - and the AI is generally "off" in the tutorials.

    Can't really argue with the points raised. However, I've no idea what's planned, if anything, to improve this.

    Gil ~ CA

    Gil ~ CA

    This Panda

  12. #12
    Senior Member Senior Member Wellington's Avatar
    Join Date
    Sep 2002
    Location
    Den Haag, Netherlands
    Posts
    1,442

    Default

    Quote Originally posted by GilJaysmith:
    Can't really argue with the points raised. However, I've no idea what's planned, if anything, to improve this.

    Gil ~ CA
    [/QUOTE]


    Ok, GilJaysmith, I understand.

    May I request that you peruse the points raised below and consider them for inclusion in whatever wishlists/requests CA collates - or, perhaps, pass the comments below on to the Dept/Manager/Projectleader/Programmer that is responsible for this area.

    I'd like to suggest potential additions to the manner in which Historical Battle/Campaign enthusiasts can determine the "positioning criteria" of AI units when defining parameters pertaining to such units - as defined within the ADF files for a specific faction/battle.

    The following list merely suggests ideas that would be extremely useful, if implemented in some manner, for those of your customers who are 'excited' at the potential the Total War series offers in respect of Historical scenarios. ALL the suggestions below could be incorporated as optional parameters to be associated with a unit. ALL of them relate in some manner to positioning - an area that the AI logic is always considering for AI units anyway (nothing new!). ALL of them could equally apply to ARTIFICIAL factions that have been defined as either DEFensive or ATTacking in the BDF file.

    I appreciate that some suggestions may require additional AI logic in respect of identifying specific models, and their potential advantages, on the terrain. Most, however, should not.

    Anyway, here's my thoughts for additional unit parameters -

    HoldPosition::true/false

    I would like to see this parameter implemented effectively. 'HoldPosition::true' should instruct an AI unit to "stay where you are until something happens that causes you to change position". It does'nt work like this at present.


    HoldFormation::true/false

    This (optional) parameter could be used to ensure an AI unit retains the row/column characteristics as specified by the 'TroopNum::/Columns::' parameters in the proportion specified - taking into account casualties of course.

    What actually happens now is that an AI unit only retains the minimum depth, in accordance with parameters defined in crusader_unit_prod11.

    The effect of this is to see a swiss pike unit of 100 men, defined as 10 columns, immediately adapting a 20x5 formation, instead of a 10x10, as soon as the battle commences. With a 200 man unit the effect is magnified. This is just NOT correct. A late 15C pike unit would fight as a 'block' and NOT a 'line'.


    HoldFeature::Bridge/Stake/Wagon/CastleGate/Woods/Hill

    This (optional) paramater would ideally allow a unit to be 'closely associated' with a specific, and local, terrain feature. For example, if the unit rout's then later rallies, it would attempt to retake the feature or to position itself as close to the feature as possible.

    This would, obviously, also serve to highlight the potential of certain model structure (stakes, wagons, groups of houses etc) within the game.


    GroupNum::1/2/3/4/5/6/7/8

    I would love to see a 'Grouping' option, as can be utilised by a LOCAL player in a real-time battle, be available for specification for an ARTIFICIAL unit. This (optional) parameter would allow several AI units to be 'grouped' as a tactical formation in much the same way as the LOCAL player can do. Such an option could allow any unit defined for an AI faction to be associated with a specific group - maybe up to 8 definable groups. The ability to define specific AI units as being associated with a specific group would ideally give greater 'weighting' to any units propensity to support other units within the same group.

    Considering later era's such as the Napoleonic Wars (or even Tercio's in the Renaissance era) the importance of hierarchical tactical formations (battalion/regiment/brigade/division), that could be both self contained and provide mutual support to other units in the same formation, would appear to make this a useful addition for future 'Total War' periods.


    UseCover::true/false

    Such an (optional) parameter could be used to effect a units propensitiy to utilise whatever model 'cover features', such as stakes/wagons/houses etc:, are in the units immediate vicinity.
    This would be extremely useful for both units that are likely to be subjected to continuous missile fire, and that have a low defence resistance to such missiles.


    UseWoods::true/false

    This would be a useful (optional) parameter in order to instruct an AI unit to consider trees, as opposed to terrain height/gradient, as a more useful position. This is obviously desirable for weak infantry units that are being threatened by strong cavalry forces.


    UseHeight::true/false

    This (optional) parameter could be used to instruct an AI unit to consider the height of local terrain features as being predominent before moving to a new position.


    UseGradient::true/false

    This (optional) parameter could be used to instruct an AI unit to consider the gradient/slope of local terrain features as being predominent (this is currently the only thing AI units appear to consider - from what I see) before moving to a new position.


    ChaseRouters::true/false

    It would be nice to have an (optional) parameter in order to specify whether a specific unit (historically speaking - Prince Ruperts cavalry in the ECW) is prone to chase routers, or raid baggage even, as opposed to helping out with the rest of the battle. Alternately, a good well disciplined unit would not be prone to such 'battle unprofitable' actions.


    Conclusion
    The optional use of such, or similar, parameters would provide MASSIVE benefits for modders creating Historical Battles or Historical Campaigns. It should also be considered that the implementation of such/similar parameters -

    1) would'nt effect previous/current scenarious as ALL the parameters are optional.

    2) are not 'spread out' in terms of progrsamming implementation - they ALL pertain to positioning of AI units throughout the course of an Historically defined battle.

    3) implementing such/similar parameters should not be too time consuming. They are all in the same 'area', and as CA would appear to place some degree of emphasis on 'Historical' options, with the Total War series, the benefits (IMHO) in relation to the programming involved would appear to be beneficial - to me!

    4) would serve to open the game up far more in relation to Historical simulation, and may serve to attract a wider audience from traditional tabletop figure wargaming enthusiasts - who love to recreate Historical wargaming scenarious. As a UK company CA are undoubtedly aware of the strength of this potential market - especially in the UK and USA. Identifying the Total War series as being both a 'Computer wargame' and a serious 'Military scenario simulater' may well reap previously unforeseen benefits - again IMHO!

    5) would ensure my (for one) undying loyalty to your products!!!


    Please consider the points raised above, from both practical and marketing viewpoints. I fully understand that, in the computer industry, ideas/requests always outweigh available resources.

    However, to see any potential additions/enhancements in this area of AI positioning in Historical battles, (maybe in the add-on?) would warm the souls of many of your loyal fans.


    Regards, Wellington

  13. #13

    Default

    You know CA should look into making something like a 'Universal Military Simulator' game. Its already got the samurai and medieval periods down, the AI's pretty good and the graphics... no more good things about the graphics, you can't say enough about the Total War series battle graphics... okay, I'll say unbelievable but thats it. Added to that are good solid morale rules plus the ability to take and execute prisoners... the battle game can hold its own I believe. Very frankly its the one thing that really is keeping MTW on my hard drive right now (sorry I just don't agree with a lot of calls on the campaign structure and gameplay and map)...

    Gilbert de Clare
    "Ad majoram Dei gloriam"

  14. #14
    warning- plot loss in progress Senior Member barocca's Avatar
    Join Date
    Dec 2000
    Location
    (*disclaimer* - reality may or may not exist, in some societies reality is a crime, punishable by life)
    Posts
    5,341

    Default

    interesting options for defining battles/scenario's,

    some already exist,
    we just don't know enough about using them yet,

    the one that springs to mind is an area control/men in area victory condition,

    i will have to do some hunting to find my notes on this, i found it in the demo, but could never get it to work,

    Glijay, Target, EatColdSteel, Longjohn - and, of course, any others i've missed mentioning,

    can you guys provide some input on ALL the available victory conditions please

    The winds that blows -
    ask them, which leaf on the tree
    will be next to go.

  15. #15
    Voice Crying in the Wilderness Member Bullethead's Avatar
    Join Date
    Aug 2002
    Location
    Wakefield, LA
    Posts
    164

    Default

    On the subject of changing and adding new parameters for units in the .adf file, how about the following ideas?

    NOTE: Because .adf files only have bearing on historical battles and campaigns, changes to these don't need to be balanced against effects on the main campaign and MP games.

    Take reinforcements for an example. There's no need for reinforcements in an historical battle to use the same system as in other game types. The reinforcing units are following the script of history, so should appear when and where the scenario designer specifies--the player should have no control of them until they enter play. More on this later.

    Position::xxxxx yyyyy
    Direction::ddd
    These would be changed so that if the unit had the optional Reinforcements::sss parameter set, the unit would appear on the map at the indicated position and facing. Currently, these parameters seem to have no effect for reinforcement units, although Columns::cc does.

    Making the unit appear in the specified position would completely obviate the problems the human player has with the current reinforcement system in historical battles. In addition, it would allow reinforcements for the AI. Right now, due to the AI always going with the default entry position, which can be Gawd Knows Where, it's pretty much impossible to let the AI have any reinforcements.

    NumberOfWaypoints::xxx
    Waypoints::xxxxx yyyyy xxxxx ...
    In addition to specifying a path, the unit would NOT be controllable by either a human or the AI until it reached its last waypoint, or unless attacked before it got there. The idea is basically to script some unit movement to make things happen more historically.

    ------------------
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria
    -Bullethead

    In wine there is wisdom, in beer there is strength, in water there is bacteria

    And by chance, if the enemy routs, you come upon some nubile nymph or doxy that strikes your fancy, remember: Hands off! Rank has its privileges. I pick first! - Ferrano the Chivalrous, Conqueror of Marakesh

  16. #16
    warning- plot loss in progress Senior Member barocca's Avatar
    Join Date
    Dec 2000
    Location
    (*disclaimer* - reality may or may not exist, in some societies reality is a crime, punishable by life)
    Posts
    5,341

    Default

    PAF
    The winds that blows -
    ask them, which leaf on the tree
    will be next to go.

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