Results 1 to 30 of 68

Thread: Simple changes by CA that would improve the AI

Hybrid View

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

    Default Re: Simple changes by CA that would improve the AI

    most of the improvements do seem to be simple If statements:

    If player_unit_count > ai_unit_count then
    .............status = dont_attack
    elseif player_unit_count =< ai_unit_count then
    .............status = attack
    endif

    this is an example, BUT it could be more complicated and other exploits created.

    continuing with this example, the quality or type of troops is not included in any way, so a huge army of peasents could scare off a small but elite army. so then someway of rating the units in the army needs to be included (can you tell this is going to get complicated?)
    the AI should run an auto resolve of a battle before actually engageing in it, if the fake auto resolve doesnt come up in their favor, they should not attack

  2. #2
    Senior Member Senior Member econ21's Avatar
    Join Date
    Oct 2002
    Posts
    9,651

    Default Re: Simple changes by CA that would improve the AI

    Quote Originally Posted by Creeper525
    the AI should run an auto resolve of a battle before actually engageing in it, if the fake auto resolve doesnt come up in their favor, they should not attack
    Yes, in reply to LordPreston's point, I don't think this change is technically difficult. Indeed, I am pretty sure there is already some kind of AI routine where it works out whether to attack based on a computation of relative strengths. In my experience, I will not get a large stack of my own attacked by a tiny AI one. But what I will get fairly regularly is an AI stack that is outnumbered and consists of lower quality troops nonetheless attacking me. I suspect that the AI is setting the bar a little low when deciding whether to attack.

  3. #3

    Default Re: Simple changes by CA that would improve the AI

    Quote Originally Posted by Simon Appleton
    In my experience, I will not get a large stack of my own attacked by a tiny AI one. But what I will get fairly regularly is an AI stack that is outnumbered and consists of lower quality troops nonetheless attacking me. I suspect that the AI is setting the bar a little low when deciding whether to attack.
    Yes, the way it should work is that there should be different "bars" for different difficulty levels. Then the kiddies can play on Easy and get to beat up armies smaller than them all the time. The mid-level players are attacked by armies with approximate parity, and on "Hard" the AI attacks only when it has a clear advantage.

  4. #4
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Simple changes by CA that would improve the AI

    Quote Originally Posted by screwtype
    Yes, the way it should work is that there should be different "bars" for different difficulty levels. Then the kiddies can play on Easy and get to beat up armies smaller than them all the time. The mid-level players are attacked by armies with approximate parity, and on "Hard" the AI attacks only when it has a clear advantage.

    It's not so easy as it sound.
    This could pretty easily lead to passive AI that doesn't attack at all, since it fears of every single player stack.

    The real problem is with match-up algorithm AI uses when attacks, since it very often loses autocalced battles. And it's the computer, the same one who runs AI, who calculates results of autocaled battles.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  5. #5

    Default Re: Simple changes by CA that would improve the AI

    Yes I know it's not as easy as it sounds P1, I'm just suggesting a general principle by which the various difficulty levels could be further and more effectively differentiated.

    I just want a game that provides me with a genuine challenge. I've noticed with all of the TW series, the AI will often only attack you with approximate parity, even when it has overwhelming force at its disposal. On hard levels, the AI should not be fighting with one hand tied behind its back. It should be giving it to you with both barrels.

  6. #6
    Arrogant Ashigaru Moderator Ludens's Avatar
    Join Date
    Nov 2003
    Posts
    9,063
    Blog Entries
    1

    Lightbulb Re: Simple changes by CA that would improve the AI

    Great work, Simon Appleton. I have only a few comments:

    Quote Originally Posted by Simon Appleton
    Yes, in reply to LordPreston's point, I don't think this change is technically difficult. Indeed, I am pretty sure there is already some kind of AI routine where it works out whether to attack based on a computation of relative strengths. In my experience, I will not get a large stack of my own attacked by a tiny AI one. But what I will get fairly regularly is an AI stack that is outnumbered and consists of lower quality troops nonetheless attacking me. I suspect that the AI is setting the bar a little low when deciding whether to attack.
    Perhaps this is because higher difficulty auto-resolves favours the A.I., so the A.I. thinks it has a big advantage while in fact this only applies to auto-resolve and not to manual battles?

    Quote Originally Posted by oaty
    (7) Well at least in RTW the A.I only gets to reposition itself(to a new location) once. was quite annoying in MTW to watch the A.I. run from hill to hill.
    I disagree: it added to the challenge. The downside of sensibly redeploying A.I. is that it will redeploy sensibly, even if the other location is some distance away.
    Looking for a good read? Visit the Library!

  7. #7
    Member Member sunsmountain's Avatar
    Join Date
    Sep 2003
    Location
    Netherlands
    Posts
    414

    Default Re: Simple changes by CA that would improve the AI

    AFAIK, The programming methods used in RTW were very similar to those in MTW. In tactical combat, units use multiple If.. Then.. rules to decide what to do, which together are consistent. The campaign map AI was entirely new code.

    Most of Simon's comments are 'rules' defining what NOT to do, but you can not make anything out of negatives. The AI needs to know what to DO with the unit every second, not what NOT to do.

    The Ai consists of hundreds and hundreds of lines of non-trivial code, you all are making it sound like it's so simple to fix. Simply adding another If.. Then.. statement leads to chaos, compiling trouble and later crashes. In a project as large as RTW, every line of code needs to be checked and double-checked.

    Now what gives you the idea that you can think up a simple rule that will even stand the critical eye of even 1 programmer, let alone the team? I'm beginning to understand why they don't study threads like these: AI programming is well hard, and far harder than any of us can imagine. In fact I doubt even one of us has experience with this at all.

    I don't know what we CAN do, perhaps simple testing is the best we can do.

    As a side effect, most games focus on graphics nowadays, not just because it looks pretty or sells well, but also because it's easeier to program. Graphics code behaves. AI code doesn't (as we can see). It's not really possible for them to share this with us, since it'll be copied immediately if it's good.
    in montem soli non loquitur

    (\_/) (>.<) That's what happens with bunnies
    (x.X)(_)(_) who want to achieve world domination!

    becoming is for people who do not will to be

  8. #8
    Senior Member Senior Member econ21's Avatar
    Join Date
    Oct 2002
    Posts
    9,651

    Default Re: Simple changes by CA that would improve the AI

    Quote Originally Posted by sunsmountain
    Most of Simon's comments are 'rules' defining what NOT to do, but you can not make anything out of negatives. The AI needs to know what to DO with the unit every second, not what NOT to do.
    I'm fairly happy with what the AI does. I've played a lot of strategy games and know not to expect a "deep blue" kind of super-AI. Indeed, TW's AI is already up there among the best AIs I've encountered in any strategy games. Only Civ2/3, Homm3 and Imperialism2 come to mind as perhaps having better AI. Even then, in these games, there were cheesy exploits you could use to pretty much guarantee you'd win and the process of winning was rather less fun, IMO, that the sound and fury of Total War battles. If the RTW AI has enough resources and material to work with, it already gives a fun game. At the strategic level, it builds up and forms large armies that it uses. At the battle level, it can put up a decent fight.

    The RTR 6.0 campaign I've just finished is an example of this. Even by the time I took the 50th province, it was still great fun. At a strategic level, I was struggling to subdue about six major factions (none of which I knocked out). At the tactical level, I was still fighting exhausting battles with full stacks of elite Ptolemic or Seleucid armies. It's all the more impressive because TW offers many more choices - that could potentially stall the AI - than most other games.

    My suggestions are simple tweaks that I think would improve the AI more. We'll have to agree to disagree over whether they would be feasible or enhance the game.

  9. #9

    Default Re: Simple changes by CA that would improve the AI

    Edit.
    Last edited by screwtype; 08-18-2005 at 18:31.

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