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
    Lurker Member Mongoose's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,422

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

    Quote Originally Posted by Red Harvest
    mongoose brings up another point, while I was editing the strategic map to make it more challenging, I found that the AI inherently likes to split its forces for no apparent reason. If I put a nice stack of rebels in a city, the AI would take all but a handful out of the city and march them off to the hinterland to stand alone. The AI would be defeated in detail, even by other AI.

    Interesting. I haven't really seen it as you describe it, but in my games the AI will almost always take the 10 star commander to some God forsaken pit while it's army marches off to doom.


    10 star Greek general: Remember, this battle is for our country. If we are defeated, there will be no retreat. We are even in numbers but with my amazing tactical skill we may defea...

    Greek messenger: Sir, you are urgently needed at croton!

    General: Why?

    Greek messenger: The town has passed a new law regarding the number of names you can have for a mule. They need you to sign it.

    General: I will go there right away! *gallops off at full speed*

    Greek soldier: i don't think he's coming back...

    Greek soldier two: What do we do now?

    Greek solder one: I have the perfect plan! the army is saved!

    Firse we send half the army to attack our allies in sicilly, then we send the other half to attack our allies in macedonia!

    Greek soldier two: Sounds good. what about or cities in italy? won't the Romans take them?

    Greek soldier one: you're right. We should do something else...**Player reloads**

    Greek soldier two: What were we talking about about?!

    Greek soldier one: i don't know. let's just carry out the plan.
    Last edited by Mongoose; 08-16-2005 at 06:20.

  2. #2
    Cynic Senior Member sapi's Avatar
    Join Date
    Oct 2004
    Location
    Brisbane
    Posts
    4,970

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

    Strategic/Tactical ai:

    Take into account strategic (ie production capacity, economic income, overall troop numbers) rather than tactical (ie outnumbering the local fleet) when declaring war.
    From wise men, O Lord, protect us -anon
    The death of one man is a tragedy; the death of millions, a statistic -Stalin
    We can categorically state that we have not released man-eating badgers into the area -UK military spokesman Major Mike Shearer

  3. #3

    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

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

  5. #5

    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.

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

  7. #7

    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.

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

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

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

  11. #11

    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