Adaptive AI Engine for RTS Games

Discussing the theory and practice

Basic Definitions and Concepts

Posted by Ogail on June 26, 2009

Basic Defintions and Concepts

Article in PDF –> Basic Defintions and Concepts

  • Aim:
    • Game AI will be defined
    • Many other expressions will be defined also
    • Discuss areas of future expansions
  • What is Intelligence:
    • Dictionary:
      • capacity to acquire and apply knowledge
      • faculty of thought and reason
    • Thankfully, making good games doesn’t require this definition
    • An intelligent game agent is one that acquires knowledge about the world and then acts on that knowledge
    • From AI: a Modern Approach: creation of computer programs that emulate four things:
      • Thinking humanity
      • Thinking rationally (Sheer Logic)
      • Acting humanity (Turing test)
      • Acting rationally
  • What is “Game AI”:
    • AI is the creation of computer programs that emulate acting and thinking like a human, as well acting and thinking rationally
    • Game Ai is the code in a game that makes the computer-controlled opponents (or cooperative elements) appear to make smart decisions when the game has multiple choices for a given simulation results in behaviors that are relevant, effective, and useful
    • We are only interested in the responses that the system will generate and don’t care about how the system arrived it
    • We care about how system acts not how in how it thinks
    • In old days AI programming was called gameplay programming
    • How Game AI Evolve:
      • Page 34 Game AI Timeline
      • Patterns Approach
        • At the start the patterns were fixed
        • Then, they used simple random number generators
        • After that, used complex number generators
      • PI-Approach:
        • Allowing computer to cheat; in other words have more information about world so the decisions it takes seems remarkably smart!
        • Examples:
          • Gathering resources
          • Giving gifts to computer (unlimited recourses, no time constraint…)
          • Rubber banding:
            • If you are ending a race and you are beating AI-Controlled cars by too much, some games simply speed up the other cars until they’ve caught up with you, and then they return to normal
      • In the past CPU was concerned with graphics more than AI, now many VEGA Cards have their own PU so CPU is free for AI calculations
      • 1-2% of CPU time was dedicated for AI-Calculations not 10-35% of CPU time in consumed in AI-Processing
  • What Game AI is NOT:
    • Game AI is considered as: collision avoidance (path-finding), player controls, UI and game animation!
    • This book emphasize on the differentiation between:
      • Game AI makes decision where there are multiple options or directions to play
      • Making a decision from pool of solutions/animations/paths are more “Find the BEST” solution for particular input
    • The main AI might have many equally good solutions but needs to consider planning resources, player attributes and so on to decisions for game’s bigger picture
    • Difference between low-level AI and high-level AI (soda example)
    • Gamers will not care about your shiny new algorithm if it doesn’t feel smarter and fun!
    • Game AI is not the best code; its best use of code and a large dollop of “whatever works (WW)”
    • There isn’t elegant solution for everything
  • How this definition differs from Academic AI:
    • Academic AI has 2 goals:
      • Understand intelligent entities, which will in turn help us to understand ourselves
        • This goal is not targeting:
          • Why we are intelligent (philosophy)
          • Where in the brain does intelligent come from? (psychology)
        • Our goal targeting:
          • How that guy is finds right answers? (AI)
      • Build intelligent entities
    • sheer logic systems try to solve problems without personal bias or emotion, by thinking purely rationally
    • Game AI focus on acting as human with less dependence of total rationality
    • Game AI needs to model the highs and lows of human task performance instead of searching for best decision at all time (This is for entertainment reason for sure!)
    • Example: Chess Game:
      • How it will be developed as Academic AI
      • How it will be developed as Game AI
    • The people who coded Big Blue didn’t care if Kasparov was having fun when playing against it. But people behind Chessmaster games surely spend a lot of time thinking about fun factor, especially the default difficulty settings
  • Applicable mind science and psychology theory:
    • This section give you ideas and notions of how to break down intelligence tasks in same way human mind does it
    • Brain Organization:
      • Brain is broken classically into 3 groups: hindbrain( brain stem), midbrain, forebrain
      • Also these three were called: reptilian brain, mammalian brain, human brain
      • These brain regions operate independently by using local working memory areas accessing neighboring synaptic connections to do specific tasks for organism. But these regions are also interconnected so to perform global level tasking

  • Knowledge Base and Learning:
    • The information is stored in the form of small changes in brain nerve at the synapse connection level
    • If you use a particular neural pathway it gets stronger!
    • Games AI may use principle of plasticity that’s instead of creating a set-in-stone list of AI behaviors and reactions to human actions, we keep the behavior exhibited by AI malleable
      • See the human response
    • AI systems would require a dependable system for determining what’s “good” to learn whereas the human brain just stores everything
      • Punching example
    • Rate of memory reinforcement and degradation in human brain is not the same for all systems (i.e. pain aversion is may never fully extinguish) so that lead to long term memory. This is a good example of nature dynamic hard coding
    • Differences between short-term & long-term memory
      • Hitting in arm example (page 42) à as short term & long term. Observing results
    • Brian make uses of modulators, chemicals that are released into the blood that:
      • Enhance firing of neurons in specific brain areas
        • Leads to more focused set-mind
        • Flavoring memories of particular contextual way
    • Modulators could be applied in Game AI using State-Based AI (i.e. alert/angry state)
      • Hurt guard using a state system with modifiers, could stay in Normal Guard State with “aggressive” modulator
    • Human brain learns by storing things in different memory centers of the brain by: exploration, direct experience, imitation (التقليد), imaginative speculation
    • When you decide that your game is going to use learning techniques, carefully decide gow you want the game to come up with its learned data (keeping statistics that seem to work against human is one way)
    • Question # 3
    • Influence maps makes the AI opponent seems smart from one or two applications: (44)
      • RTS Game save pathfinding algorithm
      • Sport games (scoring goals and block enemy passes)
    • Influence maps advantages
      • Have low iterations because the information to store is so specific and also the storing of misleading information is also minimized
  • Cognition:
    • Some questions:
      • How does the brain know which info to deal with first
      • Which pieces to throw away
    • Brain does this by systems that quickly categorize and prioritize incoming data
    • Cognition can be thought of as taking all your incoming sense data, called perceptions, and filtering them through your innate knowledge (instinctual and intuitive) as well as your reasoning centers (stored memories) to come up with understanding of what those perceptions mean to you
    • Be carful not to oversimplify that makes your-Controller output predictable
    • Sound ranges (if you make a big noise outside sound range what should happened?)
      • Also take into consideration environment attributes (closed/open area)
    • Most AI systems are just different ways of searching through variety of possibilities
    • The topography (State-Space of game) of your game’s possibilities can be used to conceptually consider the best AI technique to use:
      • If your game’s possible outcomes to different perceptions is mostly isolated islands of response with no real gray conditions state-based system in suitable for you
      • If the range of possible responses is more continuous and a graph out more like a rolling hillside neural networks based system. Because they work better at identifying local maxima and minima in continuous fields of response
  • Theory of Mind (ToM):
    • That will help us because we want to create systems that seems intelligent
    • ToM means that open person has the ability to understand others as having minds and a worldview that are separate from his own
    • ToM technical definition: knowing that others are intentional agents, and interpret their minds through theoretical concepts of intentional states such as beliefs and desires
    • False-Belief-Task Test (46)
      • If he passes the test that means he can model others facts, desires and believes
    • Turing test (that’s exactly what we want in our games!)
    • We must model mind not behavior
    • Rules in combat game (53)
      • The player will create a ToM about them and think they are working together!
  • Bounded Optimality:
    • Main goal of game AI is to emulate human performance level not perfect rationality
    • One of the reasons that humans make mistakes is the idea of bounded optimality (BO)
    • BO = System will make its best decision given computation (and other resources) restrictions
    • Decision making by people is limited under some factors:
      • Quality and depth of relevant knowledge
      • Cognitive speed
      • Problem solving ability
    • We create optimal programs rather than optimal actions!
  • Lessons from Robotics:
    • Simplicity of design and solution
      • Instead of trying to navigate areas by recognizing obstacles and trying …. Insectile creations that blindly use general purpose methods to force their way over obstacles
      • Lesson here is what while others spend years trying tech-heavy methods for cleave ring getting around obstacles and failing, Brooks’s robot design are being incorporated into robots that are headed to Mars!
    • Theory of Mind:
      • Trying to give the robot ability to show desires and intents instead of raw behaviors
    • Multi-layered decision architecture (Subsumbtions Techniques):
      • Bottom-up behavior design (high-level decision layer tends to be about world)
      • High level is most important in decision making
  • Future Work and Researches:
    • Game AI in the future should be generic and be able to play any game!
  • Questions:
    • AI programmers of old were somewhat forced to use these questionable methods to cram info their systems
    • What is sheer logic systems
    • Require to understand this portion:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: