Announcement

Collapse
No announcement yet.

Arguments why its nearly impossible to program an "almost human" AI.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    quote:

    Originally posted by Simpson II on 04-19-2001 06:17 AM
    Mostly, what needs to be done in CivIII is to fix bone-headed decisions like the above, which are made simply because the programmers are not terribly great strategy gamers.


    I think you have a totally different playingstyle, then I have. This is why we have such different viewpoints on the importance of a better AI-city placement strategy & pathfinding, then in Civ-2/SMAC.

    Consider this:

    On two identical big-sized twin-islands far away from each other, with a good perfectionist/expansionist style human civ-player on one island, and one AI-civ on the other island; the human player near the end-game, is most likely to...

    - have 95%+ of all available good fertile tiles under some city-area influence.
    - have some deliberate city-area overlapping in order to maximize number of cities on a given island-area.
    - have as many coastal cities as possible in order to maximize the number of potential inland tiles left to be exploited by inland cities.
    - always avoid or have as few unproductive/less productive tiles, as much as possible.

    The alone AI-civ one the other identical island however, is likely to have...

    - only 50-70% of all available good fertile tiles under some city-area influence.
    - either too much overlapping, or AI-cities too far appart with too many wasted tiles between city-areas.
    - rather few coastal cities, with less potential inland cities left as a consequence.
    - less efficient distinction between productive and unproductive terrain-tiles.

    Now, since the ICS-problem is going to be combated in Civ-3 by some rather expansion-restrictive methods compared to Civ-2 (empires above 50+ cities perhaps not practically possible - read my last reply in Poll 20: Settler vs Public works), its pretty important that Firaxis do some radical AI pathfinding/ city-placement improvement in Civ-3, compared with the weak one in Civ-2 and SMAC.

    By the way, have you actually read this thread in its whole, and perhaps Should the map-generator be scrapped? link before you answered? Its not that you must, of course. I was just wondering.

    [This message has been edited by Ralf (edited April 21, 2001).]

    Comment


    • #47
      quote:

      Originally posted by Simpson II on 04-19-2001 06:17 AM
      Mostly, what needs to be done in CivIII is to fix bone-headed decisions like the above, which are made simply because the programmers are not terribly great strategy gamers.


      Thats a pretty harsh statement, one that I totally disagree with. If you spend years of your life programming civ-style games, you're gonna be pretty good at playing them as well. And while you ***** about the programming, lets keep in mind that the Civ series has had the best balanced and AI of any similar game, I don't see many people lauding the CTP programmers. Programming isn't gonna be perfect, buy the very existence of deadlines, it would be impossible to be perfect. If you think that programmers aren't good strategy players and that you are, go ahead and program your own AI. If you can do better then you can talk $hit, but until we see some of you AI programming, I wouldn't start the OT name-calling crap in here. Especally with people we're relying to get out a good product for our benefit.

      Comment


      • #48
        quote:

        If you think that programmers aren't good strategy players and that you are, go ahead and program your own AI. If you can do better then you can talk $hit, but until we see some of you AI programming, I wouldn't start the OT name-calling crap in here.


        While I agree that name-calling is in poor taste, it's an unfortunate fact that all previous Civ (and variant) games have not allowed players to design an AI. I, for one, would be thrilled to see Firaxis make the AI code open source, or at least let us have more access to the fundamental building blocks of AI thinking. Until Firaxis gives us this capability, suggestions like "go ahead and program your own AI" are pretty meaningless.

        Comment


        • #49
          Well, sorry all, I didn't realize that The Sacred Ones were to be held in The Highest Reverence on pain of eternal flaming. I'm not totally sure how calling someone 'not a terribly great strategy gamer' became name-calling, either, though if anyone was offended by it then I'll certainly apologize to them.

          On the other hand, I don't believe that I said anything basically incorrect. Unlike me, the Civ/Smac programmers have the tremendous strategy gaming disadvantage of being people with lives. My fairly extensive observation of the Smac AI (from creating factions, and watching how they perform) has shown problems with the AI which no good Civ-player would ever have induced; behaviour which actually must have taken trouble to program, but which is plain wrong. That's aside from things which could have ben programmed easily in a couple of days, but which would have made the AI far stronger.

          I have programmed AI, to a limited extent; I have an ongoing project on a chess AI, and I've done a strategic AI for Age of Kings that is not too bad given the limitations of the tactical AI (it whumps the standard AI hard, as well as the tournament-winning custom AIs which I've tested it against. ) If I ever get my hands on the code for civ or smac (probably vain hope) I'll definitely have a bash at creating a decent AI. I may even do some work on FreeeCiv when I get Linux installed again, though more likely it'll be whenever the C++ version is done. The FreeCiv AI is supposedly quite good at the moment, though, since they taught it to ICS effectively, do proper marine assaults etc.

          Ralf,

          Yeah, I had read pretty much all of both threads. I totally agree with what you say about what the AI does, and what a decent human player will do in civ. In fact I'd say you're pretty generous towards the AI. We just disagree - in a small part - about why it happens, whether pathfinding is at fault.
          In civ the pathfinding was, frankly, terrible; somehow I doubt they looked at any texts on the problem, it must be some sort of homebrew algorithm. However, in Smac pathfinding is actually very good The AI finds it's way around quite effectively (a bit too effectively, but giving it the map does make things a lot easier for the AI programmers, so what the hell.) The issue is the choices it makes in city placement. There are two problems which I can see;

          1) Locations are selected (semi-at random?) according to how attractive they are, but not enough attention is payed to their distance from the place they're produced. In reality it's virtually always better to place cities close to the place the settler was produced.
          2) City placement appears to be decided on a unit-by-unit level. For a laugh, play a game where all city governors are on and all units are automated as they are produced. What happens is virtually indistinguishable from the AI's behaviour! I strongly suspect that, in large part, that is the AI.

          So, overall, pathfinding for settlers is a small to non-existant part of the issue for Civ3.

          Your ideas would certainly fix the problems above. An overall city-placement routine which directs settlers to an appropriate spot should fix it, too, IMO. It wouldn't be too complex. Placing cities in a grid or holey grid is close enough to optimal to compete with almost all players. In fact, in Smac it pretty much was optimal! It would, in principle, still allow pre-made maps with AI city-locations mapped out, while still functioning on random maps.

          Edit: for an ultra-simple expansion strategy which beats the CivII AI's, go here. If you haven't heard the news then you definitely need to!
          [This message has been edited by Simpson II (edited April 20, 2001).]
          "Wise men make proverbs, but fools repeat them."
          - Samuel Palmer

          Comment


          • #50
            quote:

            I'm not totally sure how calling someone 'not a terribly great strategy gamer' became name-calling


            I think people were reacting to the use of the term 'bone-headed', actually.

            Comment


            • #51
              quote:

              Originally posted by Simpson II on 04-20-2001 08:52 AM
              Your ideas would certainly fix the problems above.


              Thanks! Finally I get at least some recognition for my ideas. With few exceptions, I mostly been fighting an uphill struggle when it comes to getting people to understand the need for premade user-tweakable AI-build lists, and also the need for a revamped AI-city placement methods, with all potential AI-city placements already invisibly layed out (like yet unlit red diodes that punctures a electric standalone touristmap - you know; the kind that you can find on most big city railwaystations), in conjunction with the map-generation.

              On which potential/invisible AI-city location (or unlit red diode) each AI-civ chooses to build its first capitol city, may very well be totally random as long as the starting-locations are reasonably far away from each other. Also, in which direction each AI-civ chooses to expand may also be random, or then they start to get contact with each other; according to varying non-foreseeable in-game factors.
              It is however, then Civ-3 scenario-creators starts to make use of potential AI-city placements on their own maps, that this idea really showes off its advantages. Suddenly the Civ-playing scenario-creator gets a whole new time-dimension under his fingertips. Not only can he now exactly pin-point ideal potential AI-city locations (and distances between them): But he can also determing how each AI-Civ should expand into map-sections thats not yet uncovered in the beginning of the scenario - if they want to have that control, of course.

              Imagine the scenario-creating possibilities that this idea can create.

              quote:

              An overall city-placement routine which directs settlers to an appropriate spot should fix it, too, IMO. It wouldn't be too complex. Placing cities in a grid or holey grid is close enough to optimal to compete with almost all players. In fact, in Smac it pretty much was optimal! It would, in principle, still allow pre-made maps with AI city-locations mapped out, while still functioning on random maps.


              Well, it all comes down how much work the AI-programmers at Firaxis are willing to put into it, of course. As long as it good enough to compete with most players. But, I still think they should do something drastic about those disadvantageous figures in my previous post.
              And Civ-3 is pretty AI-demanding as it is, so the more map-analysing and AI-city placements calculation that they can squeeze in in conjunction with each map-generation, instead of between turns - the better it is.

              [This message has been edited by Ralf (edited April 21, 2001).]

              Comment


              • #52
                If this has already been mentioned in the thread, let me know and I'll go back and read the relevant sections....i skimmed it but haven't read every post or word.

                A lot of the time when people talk about better AI, they seem to mean "smarter AI" (e.g. "Napolean-like tactical brilliance"). However, I do not see that this is necessarily an improvement. My problem with AI in strategy games is not that it makes BAD moves, but that it makes PREDICTABLE moves (of course, some of the bad moves are a result of a formula that doesn't fit well with an odd situation). But what I relish about playing human opponents is not only their technical and tactical ability, but their quirkiness and occasional howlers. There is nothing so satisfying as waiting for your opponent (especially a good one) to make a mistake, and then dissecting him/her along that fault line. Of course, the same happens to you too . Someone early on said in this thread that what makes humans different from AI is that we have a bird's-eye method of sorting options in which we exclude (possibly not even consider) hundreds of untenable or bad options. Of course, the flip side is that each person has a slightly different birds-eye view, and LOOKS for slightly different salient features/information upon which decisions will be made.
                The problem with AI is that often it seems that (especially when one is winning) the game devolves into a sort of war of attrition, where the human player figures out what area to ever-so-slightly outpace the AI in, then (programmitcally) build that strength up and slowly wear the AI down. But wouldn't it be fun if the computer switched strategies, made a stupid mistake, or just did ANYTHING a little odd now and again? Of course, oddness cannot be programmed by its very nature, but maybe mimicked? A few suggestions/questions:

                1. Is it possible to set up an AI that will (a) weight certain factors over others, maybe not the BEST factors, but just certain ones, and that (b) from time to time changes its selection of important factors (quite possibly based upon earlier successes/failures). I am NOT suggesting a "learning AI", but rather one with several (10? 50?) "personalities" that will weight different things differently. Failure or success (relative to the AI's opponent(s)) can be checked, and then, if the AI player is doing poorly, a different strategy can be chosen. E.g. if the AI player is falling behind, and is ESPECIALLy far behind in research, a new "personality" could be chosen that weights research and tech possibilities/opportunities, and pays less attention to production. Of course, there is nothing like success to make us complacent, and a successul personality would more likely remain at the helm (of course, this would mean that the burgeoning empire, which got ahead in, say, research, would keep getting further ahead; a good thing, but as human players find the weak spots ignored in the quest for technology, the once mighty empire could (maybe) be cut down by its Achilles' heel). Maybe instead of relative strength, switches or modifications to personality could be tied to relative growth (a weak, but rapidly growing AI player, should continue with the same personality, b/c if growing more rapidly than humans, it should be able to catch up soon). This would go some way toward a more malleable opponent, one that changes in unpredictable ways as the game goes on. Even an occasional personality-switch by a large opponent (a low-prob event) would be interesting---even if random. Consider: you're being mercilessly attacked by a superior player, and they are getting close. All of the sudden, the attack stops, they ask for peace. Granted, the AI may have done this randomly, and without real reason, but it could mimic the human player (ever chatted after a game with a human and said, "you could have destroyed me if you'd have just gone a step further," and they slap themselves, saying something like, "i thought you had a MUCH bigger force stored up at your base...." "nope, I had ONE unit.." "DOHHHHH!!"

                Comment


                • #53
                  oops, hit send by accident. so i'll take it as a sign and finish up:

                  My main point: while the AI in the above example did not THINK you had a bigger force, or have any reason for stopping the attack, it LOOKED like it thought it did. Of course, this is still deficient (if it happened to me against a real human, i might be able to figure out his/her mistake and milk the deception for all it was worth).

                  Another way of saying this: there is no way to program the AI for a BEST strategy, since there are no best strategies. Many people THINK they have the "best," and act like it (and are often taught otherwise), but if there was one best strategy algorithmically speaking, then in any argument, one could make a demonstrative argument for it. Then the game wouldn't be much fun anymore, since eveyone would just follow it.

                  Of course, I know snot about AI, so something like the above is probably either impossible or has already been done.

                  One last bit: how about a modular central AI program, that would allow small patches at later dates? The idea being that as players discover good strategies (either in SP or MP games) that were not anticipated in the design stage, the designers could update the AI to include these:

                  Player on forum: "Hey! lookie what I discovered I can do with this lowly engineer!! Who'd have thunk it?"

                  Sid and friends: "Hmmmmm, maybe we should have the AI do that too...."

                  Dominant strategies in strategy games often evolve (read back through BBS!), so why not let the AI reflect it?

                  Of course, a great idea IMHO, but the main problem is that there is little incentive for producing such new AI modules (unless the central program was designed so that the modules could be relatively small, and then maybe sold over the net for low-cost ($5? $9.99?).

                  Comment


                  • #54
                    Sure, it's entirely possible to do that, but the programming must be done in a completely different way.

                    Right now, the AI are hardwired into the game. Programmers play the game a bit, find out how to do things, and code the AI accordingly. This is a very dumb way of approaching it.

                    First, the AI should be heuristic, i.e., it learns from past mistakes. That way, it becomes stronger as more and more games are played.

                    Second, there is no need to hardwire the AI. Once the programming is done, just play against the AI many many times so it starts learning.

                    Third, playing style and difficulty level can be adjusted by modifying parameters.

                    Forth, conditions can be added to trigger scripts. This is done to a) further differentiate playing styles b) allow for user tweaking c) allow for easy AI updates.
                    (\__/) 07/07/1937 - Never forget
                    (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                    (")_(") "Starting the fire from within."

                    Comment

                    Working...
                    X