Artificial Intelligence in Computer Games by MikeJenny

VIEWS: 15 PAGES: 25

									Artificial Intelligence
in Computer Games
                     Knut Vidar Siem
  City University of New York, College of Staten Island
           Department of Computer Science
                           for
      Seminar in Computer Science (CSC490-6220)
                       Spring 2006
              Covered Topics
   AI techniques used in games
   Some game genres and how they use AI
   Quick case study: Quake III: Arena
   AI research and game developing
   Effects of AI in games
   (AI for education and tutoring)
    AI in a Computer Game Setting
   The “look and feel” of the AI is far more
    important than it’s inner workings
   The player is supposed to win
   The overall goal is to create a fun and
    entertaining game
   With this in mind (commercial) game developers
    can include AI in their games
AI Techniques in Computer Games
   Finite state machines (FSM)
   Artificial neural networks (ANN)
   Fuzzy logic
   Expert systems
   Genetic algorithms
             Finite State Machine
   A finite state machine is a model of behavior
    that can be organized in states
   Strengths:
       As complex as the desired
        complexity of the subject
        being modeled
   Weaknesses:
       Not very accurate for
        modeling human behavior
         Artificial Neural Network
   Models a network of biological neurons
   Each node has input and output
   Strengths:
     Generalization
     Human-like solutions

   Weaknesses:
       Training takes time
                  Fuzzy Logic
   Derived from fuzzy set
    theory
   Elements have membership
    values in the interval [0, 1]
   Introduces the possibility
    of imprecision
                  Expert System
   Components:
     Knowledge base
     Set of production rules
     Inference engine for reasoning over the knowledge

   Strengths:
       Can solve problems requiring expert knowledge
   Weaknesses:
     Narrow domain of knowledge
     Inherently just decision logic
            Genetic Algorithms
   Principles from genetics and natural selection
   Evolutionary techniques are used to optimize
    the solution to a problem
   A population of solutions evolve over
    generations by combining properties (often with
    the possibility of mutation)
The Most Popular Game Genres
   There are a wide variety of genres; the following
    are the most popular of the major ones:
     First-person shooters (FPS)
     Real-time strategy games (RTS)

     Role-playing games (RPG)

   Among others are simulator, sports and fighting
    games
    The AI requirements varies with the genre
             First-Person Shooters
   Animation: control the body
    and make it blend with the
    environment e.g. using a
    decision system
   Movement: how the entity
    moves in the world with path
    finding                                   Quake III: Arena, 1999

   Combat: should do spatial reasoning, tactics,
    perceptions and e.g. using FSMs
   Behavior: control the entity’s “state of mind” using
    FSMs and fuzzy logic
              Real-Time Strategy
   Analysis: define goals and
    prioritize through map analysis
    and area labeling
   Resource allocation: match
    means with goals with the
                                                  StarCraft, 1998
    help of network flow algorithms
   High-level AI: switch between AI modes using
    an FSM, a rule-based system or a fuzzy logic system.
             Role-Playing Games
   Historically not a genre
    with a lot of AI
   Random encounters are
    more common
   How much AI is used
    depends on how rigid the            Final Fantasy XII, 2006
    story line is
   The AI techniques used depend greatly on the
    kind of intelligence being modeled.
                 Case Study:
               Quake III: Arena
   “First-person shooter” (FPS) released by Id
    Software in 1999.
   The player moves around in a 3D environment
    fighting enemies and assisting teammates
   In this virtual world lies items such as weapons
    and power-ups
   The players can be either human or computer
    controlled bots
              Quake III: Arena
   "Half way through the project, I think
    everyone said, 'The bots suck. We have to
    get our act together.'"
    - Christian Antkow, Level Designer
   Their rescue was Jean-Paul van Waveren, a 22-
    year-old Master student from the Netherlands
          Quake III: Arena Bots
   are autonomous; self-controlled
   use a cognitive model of the world,
    eliminating the need for waypoints
   use an FSM-like structure to think
   have some “wired” domain
    knowledge
   can issue and react to team           “Crash”

    commands
          Quake III: Arena Bots
   use an interface of commands similar to the one
    presented to the player
   depend on fuzzy relations that specifies how
    much they want to do, have or use something (in a
    tree)
   have goals and sub-goals on a stack
   don’t do much planning
   do not cheat by accessing more information
    than they should
         Quake III: Arena Bots
   Video from a human viewpoint
   Video from a bot’s viewpoint
           Common AI Problems
   Cheating, i.e. peeking into
    “secret” information
   Super-powers, more health,
    resources etc.
   Unless an AI entity is made a bit
    dumb it appears to be a super-
    human
   Unhandled mistakes look bad
    (and they always happen)
           Expected AI Qualities
    These qualities are parts of “the ultimate goal”
    in AI:
   Predictability vs. unpredictability
   Creativity in problem solving
   Personality                               “HAL 9000”


   Intension and autonomous acting
   Improvising and planning
   Learning
                                                    “Data”
    Why Computer Games are suitable
           for AI research
   Technical reasons:
     The virtual environment of a game is not a
      simulation of the problem domain, it is the problem
      domain
     Games free AI researchers from building the
      environment
     They often come with good APIs and modification
      possibilities
    Why Computer Games are suitable
           for AI research
   Non-technical reasons:
     Games are cheap, often below $50
     Game development is a big, high-paced industry

     As games continue to improve, AI is expected to be
      the next discriminant (as graphics was a few years
      ago)
          Effects of AI in Games
   A good AI doesn’t necessarily make the game
    fun
   More interesting behavior
     Better adaptability and improvisation
     More human-like flaws (if implemented)

   Further blurring of the border between reality
    and unreality
   What are the ethical issues with AI entities?
          AI in Educational Tools
   Can reduce cost of expensive training
   Can simplify training operations that are difficult to
    arrange.
   An AI entity can adapt to the progress and attend to
    the specific needs of a student.
   Adds personality, empathy and emotion to the tool
   Programs exist e.g. to teach programmers to detect
    bugs (PROUST) and to prevent bullying in schools
    (FearNot!)
                             References
   Human-Level AI's Killer Application; Interactive Computer
    Games, John E. Laird; Michael van Lent, 2001
   Agent design to pass computer games, Astrid Glende, 2004
   The Quake III Arena Bot, J.M.P. van Waveren, 2001
    http://www.kbs.twi.tudelft.nl/docs/MSc/2001/Waveren_Jean-Paul_van/thesis.pdf
   Strategies for Strategy Game AI, Ian Lane Davis, 1999
    http://www.maddocsoftware.com/pdf/I_Davis_99-Strategy.pdf
   Learning by Feeling: Evoking Empathy with Synthetic,
    Characters, Ana Paiva, 2005
   Links: artificial intelligence and interactive entertainment,
   AI in First-Person Shooter Games, John McCloskey, Jeffrey
    Miller, Amish Prasad & Lars Linden
    http://ai.eecs.umich.edu/soar/Classes/494/talks/Fps.pdf

								
To top