Page 1 of 2 12 LastLast
Results 1 to 30 of 39

Thread: Battle AI Blog

  1. #1
    Senior Member Senior Member Fisherking's Avatar
    Join Date
    Feb 2005
    Location
    East of Augusta Vindelicorum
    Posts
    5,575

    Default Battle AI Blog

    Tuesday Nov 10, 2009

    Battle AI - By Mike Simpson

    Just before the end of Empire the lead Battle AI programmer left CA to return to his family up north.
    Unfortunately, thanks to Mr Wilberforce’s efforts 200 years ago we couldn’t stop him. It left us with a battle AI, which at that stage, struggled to beat good players in a fair fight, and was pretty much at the mercy of great players, even with a level of handicap (I call it cheating) that is all too obvious.

    Since then we’ve had our most talented programmers pick up where the deserter left off, but becoming the master of a chunk of code that took almost three years to write is not an instant thing. In the updates so far we’ve got rid of some of the worst behaviours that are close to the surface, and have started to tackle deeper issues like unstable decision loops that cause the AI to mill around rather than hold its line and fire. We’re also starting to add new behaviours, for example taking better advantage of hilly terrain. These improvements take the code further than we’ve been able before and will be there for Napoleon but we’re not sure yet whether we’ll be able to reverse them back in to Empire in a future update - the code has moved on. If we can we will.

    Our overall aim with the improvements is first to get rid of any erratic behaviour, second to improve general performance to the point where the obvious handicaps can be removed, and then to add a greater variety of ’smart’ behaviours. None of these have a fixed finish line - it’s a process of continual improvement, and each game will get AI better than the last one. Including Napoleon.

    Progress is frustratingly slow but thankfully rewriting the Rome: Total War codebase has left us with a clean codebase that is easier to work on, and an architecture that has way more potential than Rome’s. The main difference is the shift to a goal oriented planning system rather than a static system that has no long term plans. This has yet to fully pay off. But it will. When it does I’ll talk about it again.

    Battle AI is not rocket science - its way, way harder than that. It’s so difficult that very few strategy games attempt it. Most use simple scripts of canned behaviour that fire when you bump in to them, and very simple swarming behaviours. They’re limited, and are “gamey” rather than real world. What I mean by that is that the tactics you use to beat them are something that you have to learn for each game or sometimes each scenario/level, and bear no relation to reality. What we strive for is a game where real world tactics actually work. It’s not the easiest path to take, but it is the most rewarding.

    If you’re a genius C++ programmer, you understand exactly how difficult this problem is, but still think it’s the most interesting code problem in the world, apply for a job. We’ll find space for you.
    Posted by Mark in CA Updates on 2:42:07PM Nov 10, 2009

    http://blogs.sega.com/totalwar/2009/...-mike-simpson/
    Last edited by Fisherking; 11-10-2009 at 20:03.


    Education: that which reveals to the wise,
    and conceals from the stupid,
    the vast limits of their knowledge.
    Mark Twain

  2. #2
    Deadhead Member Owen Glyndwr's Avatar
    Join Date
    Jan 2007
    Location
    Santa Cruz, California, USA
    Posts
    464

    Default Re: Battle AI Blog

    That's nice, now where are the modding tools?
    "You must know, then, that there are two methods of fight, the one by law, the other by force: the first method is that of men, the second of beasts; but as the first method is often insufficient, one must have recourse to the second. It is therefore necessary for a prince to know well how to use both the beast and the man.
    -Niccolo Machiavelli


    AARs:
    The Aeduic War: A Casse Mini AAR
    The Kings of Land's End: A Lusitani AAR

  3. #3

    Default Re: Battle AI Blog

    This was a nice entry - unfortunately the main programmer leaving in the midst of development happens in many games (it has happened to Crusader Kings of Paradox too) - and its a thing that very little can be done about. Its to be commended uopn that a single coder was in control of the whole, this gives more cohesion and allows greater amount of control and detail over the code due to a single person being able to achieve greater knowledge over it, rather than compartmentalise the effort in between other coders and introduce the "broken telephone" effect of inter-team communications.

    The battle AI of Empire TW is by no means finished and i still feel cheated that Napoleon won't upgrade it - but it undoubtedly has potential to be better and the problem at hand (coding battles that all units have missile weapons) isnt an easy one indeed.

    PS To all those that have argued that M2TW had a better battle AI than RTW:BI, note that it is again stated in this entry that the best AI battle code they had was in BI and not in Kingdoms; apparently only peripherals were touched in M2TW by CA oz; it seems that there was no or very little work on the AI for that game, so statements from CA in general and Mr Simpson in particular at the time, that said "we are improving things accross the board" (the TW Story) were most likely simply marketing talk. As many have said for M2TW it was little more than an extensive mod for RTW.
    Last edited by gollum; 11-10-2009 at 20:40.
    The Caravel Mod: a (very much) improvedvanilla MTW/VI v2.1 early campaign

    Please make sure you have the latest version (v3.3)
    Since v3.3 the Caravel Mod includes customised campaigns for huge and default unit settings

    Download v3.3
    Info & Discussion Thread

  4. #4
    Grand Patron's Banner Bearer Senior Member Peasant Phill's Avatar
    Join Date
    Feb 2006
    Location
    Somewhere relatively safe, behind some one else, preferably at the back
    Posts
    2,953
    Blog Entries
    3

    Default Re: Battle AI Blog

    Quote Originally Posted by Mike Simpson View Post

    Since then we’ve had our most talented programmers pick up where the deserter left off
    I hope he means this humourously, otherwise we're playing the blame game again.
    Last edited by Peasant Phill; 11-10-2009 at 21:28.
    Quote Originally Posted by Drone
    Someone has to watch over the wheat.
    Quote Originally Posted by TinCow
    We've made our walls sufficiently thick that we don't even hear the wet thuds of them bashing their brains against the outer wall and falling as lifeless corpses into our bottomless moat.

  5. #5
    Camel Lord Senior Member Capture The Flag Champion Martok's Avatar
    Join Date
    Mar 2002
    Location
    In my own little world....but it's okay, they know me there.
    Posts
    8,257

    Default Re: Battle AI Blog

    That's indeed most unfortunate. Especially the part about the upgraded battle AI not being integrated into Empire.


    Quote Originally Posted by Peasant Phill View Post
    I hope he means this humourously, otherwise we're playing the blame game again.
    I concur. To be fair, I *do* believe he said that with his tongue planted firmly in his cheek, but he probably should've placed quotes around it ("deserter") or otherwise worded it better to reduce ambiguity.
    Last edited by Martok; 11-10-2009 at 21:55.
    "MTW is not a game, it's a way of life." -- drone

  6. #6
    Villiage Idiot Member antisocialmunky's Avatar
    Join Date
    Feb 2005
    Location
    ゞ( ゚Д゚)ゞ
    Posts
    5,974

    Default Re: Battle AI Blog

    That's some good insight. Never thought about that happening but I guess those are the risks you take when you hire a specialist like that. Maybe NTW will have some of the bugs worked out...

    I do disagree about the 'canned reactions' part. All game AIs use a deductive process to narrow down a set of possible actions to a single action that the AI has been scripted to do. It doesn't make them up as they go. I guess if you had some sort of crazy evolutionary algorithm for an adaptive AI like everyone wants to see it would be different but ETW is just as canned as everything else.

    At the end of the day, I rather see CA produce a game as great as they market it than another total failure of a game.
    Last edited by antisocialmunky; 11-11-2009 at 01:27.
    Fighting isn't about winning, it's about depriving your enemy of all options except to lose.



    "Hi, Billy Mays Here!" 1958-2009

  7. #7

    Default Re: Battle AI Blog

    will be there for Napoleon but we’re not sure yet whether we’ll be able to reverse them back in to Empire in a future update - the code has moved on. If we can we will.
    Heh. I knew it. Try to convince people to buy NTW because of the 'fixed' BAI which UNFORTUNATELY can't make it into empire.
    we’re not sure yet whether we’ll be able to reverse them back in to Empire in a future update - the code has moved on. If we can we will.


    None of these have a fixed finish line - it’s a process of continual improvement, and each game will get AI better than the last one. Including Napoleon.
    Seems a little contradictory, no?



    Since then we’ve had our most talented programmers pick up where the deserter left off
    The second they mentioned the lead programmer leaving, I knew they were playing the blame game again. CA has proved to entertain me though nowadays...
    Last edited by peacemaker; 11-11-2009 at 06:28.

  8. #8
    Member Member Zenicetus's Avatar
    Join Date
    Jul 2005
    Location
    On a ship, in a storm
    Posts
    906

    Default Re: Battle AI Blog

    CA could make an immediate, major improvement to the BAI just by eliminating the ability for the AI and the player to garrison buildings. In a more realistic game, both the AI and the player could choose to garrison any building or structure on the battlefield, which would keep the army together. Instead, (and probably due to 3D graphics limitations), only a few scattered buildings can be garrisoned, and they're never close together. The player is smart enough to choose one building to put troops in, with supporting troops nearby, using surrounding buildings to protect the flanks. The AI never does that. It just occupied all possible buildings with single units, while the rest of the army remains somewhere off in the distance. This allows the human player to pick off units one by one. Even when driven out of a building by artillery fire, the AI unit never rejoins the rest of the army, and the rest of the army never provides support. They're sitting ducks.

    I know there's a lot more that could be improved in the BAI, and this doesn't happen all the time because not all battles included buildings that can be occupied. But this is such a failure of a game "feature" that they should really just remove it. Sometimes simplifying the design is the right answer to improving it, instead of piling on more features that just become player exploits. I doubt that CA would ever do this, but it would immediately improve at least some of the battles.
    Feaw is a weapon.... wise genewuhs use weuuhw! -- Jebe the Tyrant

  9. #9

    Default Re: Battle AI Blog

    Rubbish. Nothing more than an attempt at raising sales for Napoleon.
    I'll be proven right as soon as Napoleon is released, which I won't be buying, by the way.
    Last edited by Nelson; 11-14-2009 at 13:56. Reason: slander

  10. #10
    Arena Senior Member Crazed Rabbit's Avatar
    Join Date
    May 2003
    Location
    Between the Mountain and the Sound
    Posts
    11,074
    Blog Entries
    1

    Default Re: Battle AI Blog

    Makes me wonder; what would CA do to cause a very important programmer to leave the project shortly before launch?

    Still, I hope they make a competent AI and I hope even more they put it into ETW.

    CR
    Ja Mata, Tosa.

    The poorest man may in his cottage bid defiance to all the forces of the Crown. It may be frail; its roof may shake; the wind may blow through it; the storm may enter; the rain may enter; but the King of England cannot enter – all his force dares not cross the threshold of the ruined tenement! - William Pitt the Elder

  11. #11
    Mr Self Important Senior Member Beskar's Avatar
    Join Date
    Feb 2008
    Location
    Albion
    Posts
    15,930
    Blog Entries
    1

    Default Re: Battle AI Blog

    Quote Originally Posted by Crazed Rabbit View Post
    Makes me wonder; what would CA do to cause a very important programmer to leave the project shortly before launch?

    Still, I hope they make a competent AI and I hope even more they put it into ETW.

    CR
    Probably because he didn't have the time to finish it, and SEGA executives wearing black suits, sunglasses and earpieces dragged him from his chair and took him to a black professional car and he was never heard of again.

    He was later found in the basement of EA, made to suffer scorn for eternity, programming DRM.
    Days since the Apocalypse began
    "We are living in space-age times but there's too many of us thinking with stone-age minds" | How to spot a Humanist
    "Men of Quality do not fear Equality." | "Belief doesn't change facts. Facts, if you are reasonable, should change your beliefs."

  12. #12

    Default Re: Battle AI Blog

    Well, this new system of AI has me optimistic - the less scripted behavior the better.

  13. #13
    Mr Self Important Senior Member Beskar's Avatar
    Join Date
    Feb 2008
    Location
    Albion
    Posts
    15,930
    Blog Entries
    1

    Default Re: Battle AI Blog

    Quote Originally Posted by A1_Unit View Post
    Well, this new system of AI has me optimistic - the less scripted behavior the better.
    Being honest, scripted behaviour actually makes it better. less scripted can usually overcomplicate or overwhelm.
    Days since the Apocalypse began
    "We are living in space-age times but there's too many of us thinking with stone-age minds" | How to spot a Humanist
    "Men of Quality do not fear Equality." | "Belief doesn't change facts. Facts, if you are reasonable, should change your beliefs."

  14. #14
    Deadhead Member Owen Glyndwr's Avatar
    Join Date
    Jan 2007
    Location
    Santa Cruz, California, USA
    Posts
    464

    Default Re: Battle AI Blog

    I'd rather see scripted cohesiveness than unscripted confusion.
    "You must know, then, that there are two methods of fight, the one by law, the other by force: the first method is that of men, the second of beasts; but as the first method is often insufficient, one must have recourse to the second. It is therefore necessary for a prince to know well how to use both the beast and the man.
    -Niccolo Machiavelli


    AARs:
    The Aeduic War: A Casse Mini AAR
    The Kings of Land's End: A Lusitani AAR

  15. #15
    Member Member Elmar Bijlsma's Avatar
    Join Date
    Sep 2004
    Location
    The Netherlands
    Posts
    236

    Default Re: Battle AI Blog

    In lieu of clever AI, cleverly scripts can be pretty effective.

  16. #16
    Villiage Idiot Member antisocialmunky's Avatar
    Join Date
    Feb 2005
    Location
    ゞ( ゚Д゚)ゞ
    Posts
    5,974

    Default Re: Battle AI Blog

    Less chance of machine rebellion anyways.
    Fighting isn't about winning, it's about depriving your enemy of all options except to lose.



    "Hi, Billy Mays Here!" 1958-2009

  17. #17
    Member Member Elmar Bijlsma's Avatar
    Join Date
    Sep 2004
    Location
    The Netherlands
    Posts
    236

    Default Re: Battle AI Blog

    Good point!
    Get too clever an AI and there is bound to be a hot robotic chick being teleported to the past causing all kinds of messy paradoxes and outdated history books.

  18. #18

    Default Re: Battle AI Blog

    Hmm. I honestly was hoping for more information out of this. Looking at the sad state of BAI, andd the cool things the modders have done WITHOUT tools, the BAI is decent now but still not that great.

    To me, all this says is "Oh, now we're blaming the guy who did some programming. Go buy Napoleon and we (once again) promise that it will be awesome. Oh, and we challenge you to do better except you don't get tools."

  19. #19
    Praefectus Fabrum Senior Member Anime BlackJack Champion, Flash Poker Champion, Word Up Champion, Shape Game Champion, Snake Shooter Champion, Fishwater Challenge Champion, Rocket Racer MX Champion, Jukebox Hero Champion, My House Is Bigger Than Your House Champion, Funky Pong Champion, Cutie Quake Champion, Fling The Cow Champion, Tiger Punch Champion, Virus Champion, Solitaire Champion, Worm Race Champion, Rope Walker Champion, Penguin Pass Champion, Skate Park Champion, Watch Out Champion, Lawn Pac Champion, Weapons Of Mass Destruction Champion, Skate Boarder Champion, Lane Bowling Champion, Bugz Champion, Makai Grand Prix 2 Champion, White Van Man Champion, Parachute Panic Champion, BlackJack Champion, Stans Ski Jumping Champion, Smaugs Treasure Champion, Sofa Longjump Champion Seamus Fermanagh's Avatar
    Join Date
    Jul 2005
    Location
    Latibulm mali regis in muris.
    Posts
    11,454

    Default Re: Battle AI Blog

    Each AI has been better than the last.

    CA cannot possibly expend the resources needed to resolve the problem. The market for 500 USD/copy games is much smaller than the 50 USD/copy market. The US DOD buys military simulator games with sophisticated AI...but they aren't worried about making a profit, now, are they?

    If they open the engine to the modders who WOULD expend the time, then they lose their game entirely and make nothing.

    All-in-all, despite the flaws. I have liked the entire series. Modded with better values in the data sets etc. (e.g. EB, XGM, RTR) the results are quite enjoyable.
    "The only way that has ever been discovered to have a lot of people cooperate together voluntarily is through the free market. And that's why it's so essential to preserving individual freedom.” -- Milton Friedman

    "The urge to save humanity is almost always a false front for the urge to rule." -- H. L. Mencken

  20. #20
    Mr Self Important Senior Member Beskar's Avatar
    Join Date
    Feb 2008
    Location
    Albion
    Posts
    15,930
    Blog Entries
    1

    Default Re: Battle AI Blog

    But the 500 USD/Copy games only sell to a specific audience opposed to the mass market, where such a price would be dropped anyway.

    The sales for 500USD a copy game would probably be 1,000 or so, CA with E:TW is looking at near the million mark, or which ever it is.

    Also, couldn't they look at the source code of such a simulator anyway?
    Last edited by Beskar; 11-16-2009 at 23:54.
    Days since the Apocalypse began
    "We are living in space-age times but there's too many of us thinking with stone-age minds" | How to spot a Humanist
    "Men of Quality do not fear Equality." | "Belief doesn't change facts. Facts, if you are reasonable, should change your beliefs."

  21. #21
    Deadhead Member Owen Glyndwr's Avatar
    Join Date
    Jan 2007
    Location
    Santa Cruz, California, USA
    Posts
    464

    Default Re: Battle AI Blog

    All I know is that I was promised modding tools, so I want modding tools.

    In a choice between online multiplayer and modding tools I'd have to go with the tools. At this point, mods are the only reason I play ANY of the TW games anymore.
    "You must know, then, that there are two methods of fight, the one by law, the other by force: the first method is that of men, the second of beasts; but as the first method is often insufficient, one must have recourse to the second. It is therefore necessary for a prince to know well how to use both the beast and the man.
    -Niccolo Machiavelli


    AARs:
    The Aeduic War: A Casse Mini AAR
    The Kings of Land's End: A Lusitani AAR

  22. #22
    Loitering Senior Member AussieGiant's Avatar
    Join Date
    Mar 2005
    Location
    Zurich
    Posts
    4,162

    Default Re: Battle AI Blog

    As usual, I hope we are all aware of what exactly we are all talking about.

    Try and imagine the Intellectual Property of "human realistic" Artificial Intelligence in a game code...

    ....just take a few short "crack induced" moments to comprehend that.





    Excellent...

    now ask yourself what part of the military or scientific multi billion dollar industry would pay for it?

    Great...so lets get it straight...IF CA actually did manage to code "human realistic" AI in their game, we'd bloody well know about it, or maybe they would just disappear because DARPA buy's them out for lets say....1 Billion dollars!!!



    Christ on the cross people.

    It's 50 dollar game and your equating a section of CA's code with something that would be as valuable as what the quantum physic coders make for billion dollar investment companies to predict the stock market.

  23. #23
    The Count of Bohemia Senior Member Cecil XIX's Avatar
    Join Date
    Oct 2005
    Location
    Neo-Richmond
    Posts
    2,434
    Blog Entries
    4

    Default Re: Battle AI Blog

    It's true that AI is a difficult thing to achieve properly. But I think most, if not almost all, of the people complaining about ETW's AI also think that the AI in the first games was markedly better than that in Rome onward. So I think most people aren't asking CA to come up with new, hyper-intelligent software. Most are asking for a return to the competance of Shogun and Medievel. To focus on AI, rather than graphics.

    Perhaps that's unreasonable as well, but it's not asking for a miracle. They made a living with those games as well.
    Last edited by Cecil XIX; 11-18-2009 at 01:40.

  24. #24
    Villiage Idiot Member antisocialmunky's Avatar
    Join Date
    Feb 2005
    Location
    ゞ( ゚Д゚)ゞ
    Posts
    5,974

    Default Re: Battle AI Blog

    TW has always been a primarily singleplayer experience so it needs a decent AI.
    Fighting isn't about winning, it's about depriving your enemy of all options except to lose.



    "Hi, Billy Mays Here!" 1958-2009

  25. #25

    Default Re: Battle AI Blog

    Quote Originally Posted by AussieGiant View Post
    As usual, I hope we are all aware of what exactly we are all talking about.

    Try and imagine the Intellectual Property of "human realistic" Artificial Intelligence in a game code...

    ....just take a few short "crack induced" moments to comprehend that.





    Excellent...

    now ask yourself what part of the military or scientific multi billion dollar industry would pay for it?

    Great...so lets get it straight...IF CA actually did manage to code "human realistic" AI in their game, we'd bloody well know about it, or maybe they would just disappear because DARPA buy's them out for lets say....1 Billion dollars!!!



    Christ on the cross people.

    It's 50 dollar game and your equating a section of CA's code with something that would be as valuable as what the quantum physic coders make for billion dollar investment companies to predict the stock market.
    CA promised a revolutionary new AI, never before seen. In the demo of the game, when playing as the British, it seemed like they had made good on their promise. The American troops defending the fjord stayed in place and ripped any units you sent at them to pieces. If you moved troops to cross the undefended fjord, they would swing around 60% of their army to meet your troops, and march toward you in order, engage you in order, mimicking tactics of the day, and would put up a bloody good fight.

    All scripted behaviour, deviously designed to fool people into buying Empire. If we played that battle with the AI we have now, the American soldiers would charge at you over the first fjord, the one they have fortified, and abandon their excellent defensive position. If you crossed the second fjord, you would be lucky if they sent a unit of cavalry, and if they did send a unit of cavalry it would charge head-on into a 4-rank deep unit of line infantry with bayonnets equipped, getting ripped to shreds.

    The rest of their army would then bunch up into a huge cluster, unable to make a decision, and be annihlated.

    If CA can't make anything but crap AI, then they ought to just admit it, not lie to me and talk about revolutionary this and revolutionary that, and then let sympathizers like you try to convince me (unsuccesfully) that they did the best they could with the funding available.

    Once again, perhaps they did do the best they could with the funding available, but the AI is not revoltuionary, nor is it an improvement on Rome or M2, and it is a hell of a lot worse than MTW1, which I find funny, considering that was released... 9 years ago?

  26. #26

    Default Re: Battle AI Blog

    7 years ago...
    The Caravel Mod: a (very much) improvedvanilla MTW/VI v2.1 early campaign

    Please make sure you have the latest version (v3.3)
    Since v3.3 the Caravel Mod includes customised campaigns for huge and default unit settings

    Download v3.3
    Info & Discussion Thread

  27. #27

    Default Re: Battle AI Blog

    Peh. I just want an AI that can stand and shoot, not cluster up 10 feet from my men and do the chicken dance. It doesn't have to outsmart me, just make me believe that it isn't as stupid as it may actually be.

  28. #28

    Default Re: Battle AI Blog

    CA just fails... so badly...

    And no it ain't rocket science it is much much easier than that...CA just can't make good AI so there marketing policy is to tell poeple that a good AI is not doable

    Just look at the campain map AI for example and compare it with that of paradox games and you will see why CA fails...

  29. #29
    Member Member Alexander the Pretty Good's Avatar
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    4,979

    Default Re: Battle AI Blog

    Quote Originally Posted by peacemaker View Post
    Peh. I just want an AI that can stand and shoot, not cluster up 10 feet from my men and do the chicken dance. It doesn't have to outsmart me, just make me believe that it isn't as stupid as it may actually be.
    'Zactly. No one's saying we expect the AI to outwit us at every turn. But at least be plausible. I didn't lose a whole lot in MTW but that's because I picked my battles when I could, in an attempt to bring more and better troops to bear against the AI. Not because I could just plow through their flanks with cav and insta-rout or whichever cluster the AI is engaging.

  30. #30
    Blue Eyed Samurai Senior Member Wishazu's Avatar
    Join Date
    May 2002
    Location
    Great Britain
    Posts
    1,679

    Default Re: Battle AI Blog

    Shogun Total War for the win

    The last game they did with at least reasonable AI was RTW: Barbarian Invasion. I had high hopes for ETW but since I bought it at launch I have yet to finish my first campaign, in fact I havnt played it for about 6 months. I thought that perhaps the AI would improve over time with patches etc. but if that is going to happen it looks like I`ll have a long wait...

    I have gone back to playing Shoggy again and even after all this time it is still an engaging all round experience. I actually lose battles from time to time
    "Wishazu does his usual hero thing and slices all the zombies to death, wiping out yet another horde." - Askthepizzaguy, Resident Evil: Dark Falls

    "Move not unless you see an advantage; use not your troops unless there is something to be gained; fight not unless the position is critical"
    Sun Tzu the Art of War

    Blue eyes for our samurai
    Red blood for his sword
    Your ronin days are over
    For your home is now the Org
    By Gregoshi

Page 1 of 2 12 LastLast

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