Game AI - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Game AI

Description:

... go through doors and straight lines joining rooms always go ... At corners, because shortest paths go through corners. Design Way points using polygons ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 29
Provided by: ist6
Category:
Tags: game

less

Transcript and Presenter's Notes

Title: Game AI


1
Game AI
  • Research Groups
  • Ken Forbus, Ian Horswill (Northwestern)
  • Michael Young (NC State)
  • John Laird (Umich)
  • Andrew Gordon, Michael Van Lent, others at ICT
    (USC)
  • in France (marc Cavaza, Fred Charles, )
  • and many others

2
Game AI
  • Goals of game AI
  • Be fun
  • Run fast
  • Use minimal memory
  • Believability, consistency, character vs.
    intelligence

3
AI in Games
  • Character (Laird, ICT, Mateas, OZ project, Stern,
    many others in the game industry)
  • Navigation
  • Behavior and planning
  • Graphics and behavior execution
  • Believability and Emotions
  • Problem Solving
  • Camera (many game companies, Young, Nvidia)
  • Lighting (primarily me)
  • Narrative and event engine (Young, Cavazza, ICT,
    Mateas, Stern, and others)

4
Navigation
  • What do you need to navigate from one point to
    another?
  • A world representation
  • Path planning
  • Collision avoidance?

5
World Representation
  • Linear (race track)
  • Waypoints
  • (predetermined by level designers)
  • Grid
  • (predetermined by level designers)
  • Objects and boundaries
  • What is a better representation?

6
Where Would You Put Waypoints?
7
Way points
  • Many heuristics for good places
  • In doorways, because characters have to go
    through doors and straight lines joining rooms
    always go through doors
  • Along walls, for characters seeking cover
  • At other discontinuities in the environments
    (edges of rivers, for example)
  • At corners, because shortest paths go through
    corners

8
Design Way points using polygons
  • Choose waypoints based on the floor polygons in
    your world
  • Or, explicitly design polygons to be used for
    generating waypoints
  • How do we go from polygons to waypoints?
  • Hint there are two obvious options

9
Design Way points using polygons
10
Grid
11
Navigation using Path Planning
  • Search Problem
  • Expand Root node
  • Expand all Root nodes children
  • Expand all Root nodes grandchildren
  • And so on .
  • Problems?

Root
Root
Root
Child2
Child1
Child2
Child1
GChild1
GChild2
GChild4
GChild3
12
Breadth First Search
13
A Algorithm (A-Star)
  • Minimize sum of costs
  • g(n) h(n)
  • Cost so far heuristic to goal
  • Guaranteed to work
  • If h(n) does not overestimate cost
  • Examples
  • Euclidean distance

14
A Algorithm (A-Star)
15
Unbiased A
16
A Heuristics
17
Navigation and path planning
  • Can deadlocks happen?
  • If so, how can you avoid them?

18
Other Techniques
  • Obstacle avoidance (robotics research)
  • We watch an ant make his laborious way across a
    wind- and wave-molded beach. He moves ahead,
    angles to the right to ease his climb up a steep
    dunelet, detours around a pebble, stops for a
    moment to exchange information with a compatriot.
    Thus he makes his weaving, halting way back to
    his home
  • He has general sense of where home lies, but he
    cannot foresee all the obstacles between. He must
    adapt his course repeatedly to the difficulties
    he encounters and often detour uncrossable
    barriers. His horizons are ways around and over
    it, without much thought for future obstacles. It
    is easy to trap him in detours.
  • Viewed as a geometric figure, the ants path is
    irregular, complex, hard to describe. But its
    complexity is really a complexity of the surface
    of the beach, not a complexity in the ant. On
    that same beach another small creature with a
    home at the same place as the ant might well
    follow a very similar path
  • - Simon 1969, The sciences of the Artificial

19
AI in Games
  • Character (Laird, ICT, Mateas, OZ project, Stern,
    many others in the game industry)
  • Navigation
  • Behavior and planning
  • Graphics and behavior execution
  • Believability and Emotions
  • Problem Solving
  • Camera (many game companies, Young, Nvidia)
  • Lighting (primarily me)
  • Narrative and event engine (Young, Cavazza, ICT,
    Mateas, Stern, and others)

20
Constraints goals
  • Line of sight
  • Hearing
  • Reaction to events
  • Goals change
  • Competing goals and needs

21
State Machines
  • Behaviors are represented by states and can
    transition to other states based on rules
  • Exactly one state is active at any time
  • Even simple behaviors may require a series of
    distinct steps
  • State machines can be designed by game designers,
    but could also be procedurally constructed in
    certain situations (i.e., planning)

22
Subsumption
  • In the subsumption approach, an entity has
    several distinct behaviors it could do, but it is
    usually restricted to one at a time.
  • Every behavior first generates an importance
    value based on its current situation.
  • After all behaviors are tested, the one with the
    highest importance is allowed to apply its
    control to the entity.
  • Example behaviors
  • Wander
  • Follow
  • Avoid collision
  • Avoid enemy
  • Find food
  • Sleep

23
Reactive Planning
  • What is Planning with a capital P?
  • Produces a sequence of tasks
  • Dumb executive - not flexible
  • Problems with Planning
  • Complexity - scalability issues
  • Combinatorial problems
  • Uncertainty
  • Immediacy of action not possible
  • Complete representation not possible

24
Reactive Planning
  • What do they mean by this?
  • Simple strategies, opportunistic behavior
  • Goals simple skills complex world
    complex-looking behavior
  • What is a routine?
  • Pattern of interaction
  • Not a plan or procedure
  • Rules expressing a pattern of activity
  • Reactive behavior

25
Animation
  • Generativety of the system still depends on a big
    part on the underlying animation engine.
  • Behaviors can be portrayed
  • Canned animations
  • Procedurally generated animations

26
Additional Topics
  • Genetic Algorithms
  • Reasoning belief networks
  • Reactive planning
  • Neural networks

27
Neural Networks
28
New Possibilities
  • Speech recognition
  • Speech synthesis
  • Computer vision
  • Facial recognition
  • Expression (emotion) recognition
  • Posture, motion recognition
Write a Comment
User Comments (0)
About PowerShow.com