Constraining Autonomous Character Behavior with Human Concepts - PowerPoint PPT Presentation

About This Presentation
Title:

Constraining Autonomous Character Behavior with Human Concepts

Description:

Create Autonomous Characters ... A character can 'own' one set of objects at a time ... object with the class or classes of character that can interact use it ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 13
Provided by: jonatha119
Category:

less

Transcript and Presenter's Notes

Title: Constraining Autonomous Character Behavior with Human Concepts


1
Constraining Autonomous Character Behavior with
Human Concepts
  • Presentation by Jonathan Martin
  • Based on Chapter 3.1 of AI Game Programming
    Wisdom 2, by Jeff Orkin

2
Two Ways to Create Lifelike Behavior
  • Script it in
  • This ensures we get the behavior we want
  • Its also extremely time-consuming
  • If the scripter makes a mistake, could have
    drastic consequences

3
The Alternative Create Autonomous Characters
  • Whereas scripting involves programming an action
    for every possible situation
  • Autonomous agents calculate their action based on

Desires
Sensory Input
Proximity to items of interest
4
A Hypothetical Situation
  • We want to design a Tactical Espionage Action
    game
  • The player will be sneaking around an enemy base,
    hopefully undetected
  • Guards should have behavior that is both
    realistic and interesting

5
Creating our AI
  • Step 1 Create enemies that can perform certain
    actions
  • Step 2 Populate level with tagged objects
  • Tags indicate the action that can be performed on
    an object

6
Pseudocode
  • While (alive)
  • Gather input from perceptors
  • Select object on which to perform action
  • Execute action

7
I want some Hot Coffee
I feel asleep
I need to get some work done
8
Adding Human Concepts to the AI
  • Ownership
  • Group Objects into sets
  • A character can own one set of objects at a
    time
  • Public objects can be in their own set, or none
    at all
  • Dependancy
  • Certain actions can only be performed before or
    after another
  • Add a dependency tag to each object, which
    indicates actions that are preconditions for the
    current action

9
Adding Human Concepts to the AI
  • Responsibility
  • Tag each object with the class or classes of
    character that can interact use it
  • We dont want soldiers performing experiments in
    a lab, or scientists picking up assault rifles
  • Priority
  • Divide behaviors into categories
  • When choosing an action, choose the highest
    priority behavior possible
  • Attack player might be the highest-priority
    behavior

10
Adding Human Concepts to the AI
  • State of Consciousness
  • If the game includes sleep/unconscious states,
    make sure actions are disabled while in those
    states
  • Expected State
  • On seeing an ally, check if he/she is in an
    unexpected state
  • If an object is moved, set a changed flag, so
    that NPCs will notice the change

11
Adding Human Concepts to the AI
  • Presence of Others
  • Evaluate how an action will affect other
    characters
  • This will be covered in the next section

12
A Modified Pseudocode
  • While (alive)
  • Gather input from perceptors
  • Select object on which to perform action
  • Am I awake?
  • What is most important right now?
  • Has anything changed?
  • What is my purpose?
  • Is this object mine to use?
  • Is there anything I need to do before using
    this object?
  • How will this action affect other characters?
  • Execute action
Write a Comment
User Comments (0)
About PowerShow.com