1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Best PC Game AI Ever - Maybe Firaxis Can Hire Their Coders as Consultants?

Discussion in 'Civ5 - General Discussions' started by Mark the Bold, Oct 27, 2010.

  1. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    I respectfully disagree. Just because you have not seen it firsthand does not mean that it cannot be done, nor does it mean that it cannot be done efficiently and effectively.

    The problem with AI's is not when they are desgined and implemented in the development cycle. The problem is with the fact that there simply isn't enough quality or talented AI programmers to go around.

    Can you provide that source? I would be interested in reading about this. Thanks. Civ4's AI wasn't very good, by the way. It was decent enough in BtS to get by, but just barely.
     
  2. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    Well, I never witnessed a pig fly, and from my knowledge of pigs and gravity, I feel confident in concluding that they can't. ;) (Sorry, couldn't resist. ;) The real response follows below:)

    I'm looking at the problem from this perspective:
    - The strength of an AI is determied by its ability to evaluate game situations, and to choose moves that lead to game situations which favor its position.
    - In every sufficiently complex TBS game, the evaluation of a game situation is a complex and difficult task. However, competent programmers (and here I agree with you) can achieve a lot in this regard.
    - However, the number of possible moves and actions shoots through the roof quickly, making it impossible to evaluate them even if the programmer highly optimizes the algorithm.

    I agree with you that competent AI programmers are underrepresented among game developers (and the studios don't use as much of their budget for AI development as I'd like them to), but there's only so much that a programmer can achieve. In order to make an AI workable on current machines, the programmer has to do so many shortcuts that the result will always leave something to be desired.

    Perhaps I shouldn't have talked about "good AI", because what constitutes "good" is always dependent on the frame of reference. I think Civ4's AI was excellent considering which new features it brought into the franchise and how it removed many cheats that were present in previous games. But of course, seen from the perspective of a hardcore player who has precisely analyzed all its shortcomings and is now in the awkward situation of either having to consciously exploit the AI, or consciously restraining himself so that the AI may still provide a challenge. Not a lot of fun admittedly, but it's a very specialized perspective.

    I don't have a specific source unfortunately. I did follow Civ4's design pretty closely though, especially Soren's descriptions of the AI and its design philosophy. I did get the impression that Soren, while designing the game, always thought "Will the AI be able to handle this?" when a new feature was discussed. This is a very different approach from previous Civ games, where the AI was rather an afterthought in design. The focus was on giving the player lots of interesting things to do, and then produce an AI that can grasp the game's basics well enough to to provide a challenge (if given lots of bonuses), but that also completely ignores whole parts of the game.
     
  3. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    LOL. It's all good. I've had bacon on an airplane. Does that count?

    I agree that it absolutely can be done in that direction. I would guess that this method would be used by those that want a good AI but don't necessarily know how to do it, so they have to incorporate the two to mask the fact that it's probably inferior. This does not include GCII, as Wardell is pretty good at AI from what I have seen.

    I honestly think that the really good AI programmers get snatched up by a big job when they write some revolutionary snippet of code, leaving the gaming community a bit void. William Bull being swept up by Apple is a great example.

    It is my firm belief that the answer will ultimately be an AI engine that can be plugged into any system, no different than a graphics engine, gravity engine, sound, game, etc. etc. etc.

    Ugh. My apologies. Going to be late for work. I'll be back.
     
  4. klokwerk

    klokwerk Prince

    Joined:
    Sep 3, 2006
    Messages:
    433
    Location:
    Paris
    Galciv AI is poor, it's only in your head. I had games where I could invade every single planet without encountering any resistance, and that's with huge AI bonuses.

    Civ 4 BetterAI > Vanilla Civ 5 AI > Vanilla Civ 4 AI > Galciv 2 AI any day.

    Look at elemental AI if you want to understand how overrated and weak Stardock AIs are. Opponents basically suicide on your citites, even Civ 1 AI was far superior.

    Brad Wardell has a very vocal group of fanatics, but his AIs are completely overrated. It's mostly smoke and mirrors.

    It's more like Stardock should hire Firaxis AI devs to make their AIs, especially Elemental AI.
     
  5. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    Yeah, okay.
     
  6. klokwerk

    klokwerk Prince

    Joined:
    Sep 3, 2006
    Messages:
    433
    Location:
    Paris
    Yeah, okay.
     
  7. zonk

    zonk Prince

    Joined:
    Oct 30, 2005
    Messages:
    572
    I'd have to disagree on the EU3 AI --

    Paradox AIs generally are more... how can I put this... formulaic. That doesn't mean they don't work, but if you dig into the event and save game files - they're generally a pretty straightforward combination of the omnipresent "badboy" with 2 to 3 other variables (IIRC, 'protect', 'befriend', 'frustration'). Don't get me wrong - often there's beauty in simplicity and when Paradox manages to tweak the formula just right (as I would agree they did in HTT, if not In Nomine in EU) - it does hum within the framework of the game itself... i.e., a game limited to a specific period where the outlines -- nations, borders, etc -- are expected to largely stay within the rails.

    I would, however, wholeheartedly agree with the GalCiv2 AI being tops. The implementation of the more the varied "evil - chaotic evil - neutral - chaotic good - good" settings certainly helped.
     
  8. Soro

    Soro Warlord

    Joined:
    May 22, 2003
    Messages:
    193
    You should consider giving it a try. I agree, it was abominable when the game first came out, especially for the player that knew something about how to win. ;) Now, it's a solid challenge. You sound like an intelligent player who would appreciate that.

    I don't want to argue the point, but I did play the original Sargon after its port to the TRS-80, in 1982, I think. It was terrible--so bad, even I beat it, and I'm a bad chessplayer. :D It looked ahead only the amount of time you allowed it--so if you forced it to go within, say, 2 minute of the start of its turn, it would make laughable decisions.

    I'd suggest that the problem for Civ V is a combination of the complexity of decision-making required, the design of the game (how AI-friendly it is, you might say), and poorly written rules-based AI. Thinking ahead won't help if it lacks the rules to make reasonable decisions, and right now it's making very foolish ones. I'm honestly surprised the game was released with the AI in that state, and saddened (but not surprised) that many reviewers (and I use the term lightly) didn't notice in combat the incredibly simple mistakes, such as putting weak ranged units ahead of tougher melee ones, that the AI makes.

    The best way to improve this would simply be to write good rules-based AI code. There's no way of getting around it. If they can't do that, they should farm out the code to someone else to improve. I do think Civ V will get better in that respect, but whether they can do it soon enough to regain veteran players remains to be seen.
     
  9. Mark the Bold

    Mark the Bold Warlord

    Joined:
    Oct 4, 2010
    Messages:
    149
    Good point. I have great sympathy for game developers in these decisions. Lets say a game developer actually prioritizes AI in his budget over shiny/ pretty graphics and makes an awesomely fun and challenging game that doesnt have next gen graphics. What's going to happen to reviews of that game? Have you read the forums over on gamespot and ign?

    The game would be so poorly reviewed just because it doesnt have next gen graphics and art, that the developer would go out of business very soon. Same thing over at E3 and conventions. The sad truth is that pretty graphics / art sell and there is currently no market evidence that quality AI sells. There are people I know who won't even try the Wii because they say "the graphics suck". Despite the occasional yet thoughtful negative review, most of the reviews of Civ 5 were glowing. Why? Pretty graphics and cool cut scenes.

    So even the most powerful game developers are going to get bludgeoned over the head in marketing meetings with these facts so its really hard to justify increased efforts ($$$) on AI. Most likely their boss will say "Less AI. More rendered arm hair. (I'm looking at you Madden)

    Now not all hope is lost. As the gaming industry continues to grow, there is bound to be some pioneering game developer who will market and sell his game BASED on how smart it is. Make commercials like "You think you're good at video games? You're not. Prove it." Sure all the gamespot reviewers will yawn and go back to playing Call of Cuty 27. But I know the strategic gaming community will be intrigued.

    For instance, Treasure games out of Japan make games that are ludicrously difficult (not via AI mind you) and they have a niche market locked down.
     
  10. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    Two words.

    Dwarf Fortress.

    :D

    But, yes. I do agree for the most part.
     
  11. t0mme

    t0mme Great Red One

    Joined:
    Dec 17, 2002
    Messages:
    363
    Location:
    Groningen, the Netherlands
  12. LDiCesare

    LDiCesare Deity

    Joined:
    Dec 22, 2005
    Messages:
    2,612
    Location:
    France
    Building a game around the ai is not the only way to have a good ai.
    But ignoring ai when doing the game design will certainly make it impossible to code a decent ai.
    All the talk about memes is fine and all, but the most complex stuff in ai and decision making is NOT decision making. It's gathering and interpreting information. This is usually an extremely expensive operation.
    Information gathering can be achieved by cheating (ignoring fog of war). This however prevents players from using stealth tactics and is therefore evil and should be avoided.
    The current Civ V system (also used in Galciv) of knowing the opponent military strength through an abstract score is a way around that, but it's only useful at a broad strategic level.
    Processing information is the hardest part. What does it mean that opponent 1 is fighting with player 2? Should I consider his military rating to be lower since ganging up on him would be more likely to succeed?

    Fortunately, in Civ V, there are many design errors and ai issues that aren't even related to complex questions like these, but just show a total lack of understanding of Game Theory.
    For instance the Wealth producing 10% of production was a strictly dominated strategy, and thus could not be used by any rational player. Simple gmae theory but it needed a patch to get fixed.
    For instance, Research agreements are extremely strong and it doesn't make sense not to try to get as many as possible, but the ai doesn't try very hard.

    Then again there are goals. Chess ai learns finishing moves. In fact, checkmates are the first lessons taught in chess. How do you win a game with king + rook? The current ai has no clue that it should be able to win with spaceship or UN despite these being extremely simple victories to accomplish when they are available.

    All these glaring issues are rather good news in the sense they can be fixed quite easily. The tactical ai is another matter entirely, however, but I'd say fix the strategy first and only then look at the tactics.
     
  13. Fluxx

    Fluxx Mr. Almost There

    Joined:
    Apr 21, 2009
    Messages:
    635
    The AI of Galciv was actually kinda poor. Sure it is very decent after 2 expansions and a very long period in which patches came out.

    The thing is that AI is one of the hardest things to code in a game. It is funny that you see always so much complaints, but the people who complain most of the time never typed a single line of code in their lifes.

    Try to think about it. There will be an certain amount of people in a gamingcompany dedicated to making the AI for the game.
    Now those programmers have to think of every strategy that should be viable for the game, then let the AI follow one of those strategies. Also they have to think of proper counters against strategies that then can be employed by the Player. New strategies are being found years after a game came out. That is why we got these forums.
    Next to that you got decisionmaking, automated governors/workers, detailed pathfinding, decisionmaking about pathfinding, long term planning, pattern recognisition, diplomacy decisions, trade decisions, etc etc etc.

    It is not even close to an easy task.
     
  14. Jolly Rogerer

    Jolly Rogerer Prince

    Joined:
    May 16, 2008
    Messages:
    402

    Another reason that AI can be an economic loser is that good AI adds immensely to game replayability. When you are playing (say) Civ4 for the thousandth time rather than buying Civ5, Fireaxis doesn't make money.
     
  15. Mark the Bold

    Mark the Bold Warlord

    Joined:
    Oct 4, 2010
    Messages:
    149
    Couldnt agree with you more. I think AI is the most challenging programming science because it is not possible (yet) to make a computer think. Basically a programmer has to anticipate all possible actions and then code the reactions. And if there is one cheezy exploit possible, some forum member will run to the top of highest hill (figuratively speaking) on this forum and decry how crappy the AI is. But none of these posters have yet to put a SINGLE example on this thread with any kind of broad consensus of what good AI should be. Of all PC games, ever made. So obviously it is difficult.
     
  16. Sox

    Sox Chieftain

    Joined:
    Sep 28, 2006
    Messages:
    20
    So true. That´s why I think it´s a good think that Firaxis just put silly spaceships
    and yawny diplomacy in the back and focused on the military win and the tactical AI.
    I think that worked out just gre... Oh wai...
    :D
     
  17. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    I don't see the relevance, to be honest. Wanting to be challenged by a moderately sophisticated AI has no bearing on whether you have the ability to write code or not.

    And it's not one of the hardest things to code. It IS the hardest thing to code.
     
  18. Sox

    Sox Chieftain

    Joined:
    Sep 28, 2006
    Messages:
    20
    I love how you added me to the quote also, maybe you should read my post again.

    I wholeheartedly agree with your post though. Just because I havn´t recorded a song, directed even a shortfilm or raise a single cow doesn´t mean I don´t want cool music, nice movies and tasty steaks.

    BRB kitchen
     
  19. Fluxx

    Fluxx Mr. Almost There

    Joined:
    Apr 21, 2009
    Messages:
    635
    It has relevance for two reasons.

    1. People can have very high and even unrealistic expectations of the AI
    2. Some of them call the programmers useless scrubs that should be fired, or things that carry that line of thinking.

    Also, you can not say without any counterargument it is THE hardest thing to code. For example certain procedural coding can be insanely complex.
     
  20. Jharii

    Jharii King

    Joined:
    Sep 3, 2007
    Messages:
    696
    Location:
    Walled Lake, MI
    Sorry, I included you to maintain the chain, not to point the finger. I should have clarified.
     

Share This Page