Announcement

Collapse
No announcement yet.

General AI

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

  • #16
    I had an interesting idea for the AI. Obviously I don't know about the programming side, but I am intrigued by the concept so I thought I'd put it out for comments.

    Humans learn and adapt. They develop new strategies and figure out how to use old ones in a more effective manner. This means that any ststic AI we build will seem more and more incompetent over time, as the humans get better.

    I read in the old AI threads that the tactical and operational AI's were coming along fairly well, but that there were no good plans for the grand strategy AI. It seems that we will have to use heuristics for that section, which means the strategy could easily go obsolete.

    In the past, many attempts have been made to make an AI that reacts to the human strategy. They usually don't work, because the human mind is far better at innovation and grand strategy.

    Could we make an AI that simply copied the player's strategy if it saw that the that strategy was more effective than anything in its toolbox? That way, a brilliant and super-effective new plan discivered by the player would also be used by the AI, so the AI wouldn't be helpless against that plan in the future. This copycat AI would basically let the human do the thinking for it.

    If the player then developed a strategy that killed the new system the AI was using, then the AI could just start using that. Eventually, the AI could start building up a memory that told it which strategy worked best against the other strategies.

    Now, this by itself is pretty boring. My big idea was this: Have the AI's share memory files with all of the other AI's whenever the computers are linked to form a multiplayer game. There should be plenty of free time when the players are planning their moves.

    This way, the AI learns the best strategies used by anyone connected to the game. It also has the files from anyone who has played a game with any of those people, and anyone who has played with those people, et cetera. If there is enough file sharing, the AI would have access to all of the best strategies used by the best human players on the web.

    And if we do a good job, the AI will know exactly when to use the strategies. It would simply memorize the situations that the humans use the strategies in. It would build a decision grid, so if it sensed that the human was using a certain strategy it would search its ever-growing library of strategies and pick the one best able to counter the human.

    It seems to me that most of this could be done using simple if-then-else commands. The hardest part would be analyzing which strategy the human was using, but it should just be a matter of recording what the player is doing and matching that with attributes of strategies it has memorized. And if the human's actions do not match any prerecorded strategies, it knows that the human is doing something new enough to be recorded as a seperate strategy.

    If this system works, it will produce an AI that is always able to match or even exceed the strategic abilities of human players. And the best part is that we shouldn't have to code any strategies. The AI should learn the basics from our playtesting.

    Then there is the issue of the AI in scenarios. In most games, the AI in heavily modified scenarios is worse than the general game AI because it didn't have any rules for dealing with the new situations. But this system would let the AI learn how to deal with any scenario, no matter how weird it was. It would simply see how the human solved the problems. The scenario designer would get a few people to play every side in the scenario, and by the time they were done playtesting the AI would be as competent as the humans.

    It seems to me that effort spent making the "copycat and communicate" system work will give better results than eforts spent teaching it a certain strategy. Teaching something how to learn gives better results than teching it a certain thing.

    Is there a chance that this will work, or is it just a silly dream?

    Comment


    • #17
      I don't know if its possible, but if it is, it should be stored on the HD, but it could get quite large after a while. It would need to be stored there for future use, just like a human remembers past stategies that worked and didn't.
      Which Love Hina Girl Are You?
      Mitsumi Otohime
      Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

      Comment


      • #18
        Yes, it would be put on the hard drive and saved permanently. If search times or disk space became a problem for some reason, the computer could delete the worst strategies.

        I forgot to say that the entire file wouldn't have to be transferred. Each strategy and its associated use guidelines could be marked with a tag. The computers would compare their tag lists and only swap strategies the other computer didn't already have.

        Comment


        • #19
          Hi Richard:

          You're completely correct about the defects of a static AI. Even the idea that you say is "pretty boring" on having the AI adapt to use the player's strategy is cutting-edge AI! I have some ideas for how to do something like this, but only at a kludgy level. What you have in mind is Extremely difficult to do since the AI has to be smart enough to realize what the critical different things that the player is doing that result in them winning. This is like finding a needle in haystack, an exponentially large haystack. Just think a little bit about the complexity of knowing what the critical strategy is, and the situations in which it should be used, and I think you can see why even current processing power is not up to it. When we get to the year 2030 or so and computers are as complex as the human brain (providing Moore's Law keeps going) then there would be some hope of achieving what you are shooting for. If we figure out how to do even the "pretty boring" part the game will be Vastly better than everything on the market. So I will defer worrying about how to hook up different AIs so they can collaborate and swap "war stories" until we get somewhere near that point.

          Gaming AI is a really fun topic, and if you are interested in that I encourage you to poke around the Web reading about it.
          Project Lead for The Clash of Civilizations
          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
          Check it out at the Clash Web Site and Forum right here at Apolyton!

          Comment


          • #20
            It seems to me that some things would be obvious enough for the AI to grasp. For example, consider the Infinite City Sleaze tactic in Civ 2. How much analysis does it take for the AI to see that the player is building lots of little cities, putting no improvements in them, keeping them at size 2 by building settlers, and using those settlers to expand more? It is a very simple heuristic plan that the designers could have put in the AI if they had thought about it.

            An analysis of game logs would quickly show the pattern. The AI could see the build order in each city and the actions of the settlers. It would realize that it got beat, so next game it would copy that build order. No real analysis is required; it simply apes a superior. Even a poorly implemented and misguided ICS attempt by the AI would probably give better results than what the AI currently does.

            Of course, it could be that Clash will be too complex for that sort of analysis. Still, the difference between total war and perfectionist buildup should be obvious. I am assuming that the AI knows the difference between the grand strategy, tactical and mid-level decision processes. I thought it was able to ignore decisions made at lower levels, and analyze the player's decisions as follows:

            1) Player aggressively expands civ.
            2) Player invests mostly in infrastructure.
            3) Player switches to free market, resulting in fast tech growth.
            4) After discovering gunpowder, player immediately switches to command economy and begins total war.

            Basically, I thought the AI could ignore administrative details and figure out the basic player grand strategy. If it can't do this, then of course my ideas won't work at all.

            Comment


            • #21
              Although important, I think we should wait on worrying what to do with the AI for the most part (mainly what Mark doesn't know since he seems to be the only one here who understands how it works well) and perhaps post an advertisement for knowledgeable AI programers and/or resources.
              Which Love Hina Girl Are You?
              Mitsumi Otohime
              Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

              Comment

              Working...
              X