Next-Generation Game AI

31
Next-Generation Game AI or, “We’ve figured out shooting. Now what do we do?” Ryan Houlette – Lead AI Software Engineer Stottler Henke Associates [email protected] 617-616-1293 CS196-2: Innovating Game Development

description

Next-Generation Game AI. CS196-2: Innovating Game Development. Ryan Houlette – Lead AI Software Engineer Stottler Henke Associates [email protected] 617-616-1293. or, “We’ve figured out shooting. Now what do we do?”. Outline. Who am I? State of the art Future directions - PowerPoint PPT Presentation

Transcript of Next-Generation Game AI

Page 1: Next-Generation Game AI

Next-Generation Game AIor, “We’ve figured out shooting. Now what do we do?”

Ryan Houlette – Lead AI Software EngineerStottler Henke Associates

[email protected]

CS196-2: Innovating Game Development

Page 2: Next-Generation Game AI

2

Outline

• Who am I?

• State of the art

• Future directions

• Questions

• Tools

Page 3: Next-Generation Game AI

3

Who am I?

• Lead AI Software Engineer at Stottler Henke Associates since 1998– AI consulting firm– commercial & government clients (NASA &

DoD)

• Architect of SimBionic game AI middleware• Author & section editor in AI Game

Programming Wisdom series• Gamer since about 1984

Page 4: Next-Generation Game AI

4

State of the Art

• In a word: disappointing.• Only a fraction of today’s games have good AI• Even then AI rarely matches the quality of the

graphics and sound (and increasingly, physics)• Many games have merely passable or sub par AI

– unrealistic behavior– not challenging or unfairly difficult– boring, predictable, or unresponsive– just plain stupid

• Why is this?

Page 5: Next-Generation Game AI

5

A Game AI Programmer’s Life is Hard

• Developing game AI is hard– one of the most complex parts of gameplay– demands extensive tuning and balancing– requires a mostly-working game world to test– developers often start from scratch

• Tension between character design and character autonomy

• Currently game AI is written in code or scripting language– game designers are often non-programmers– separates the design of the AI from the implementation

• translation barrier• long design-code-test cycle

Page 6: Next-Generation Game AI

6

…and AI is Hard

• Many human-level capabilities cannot currently be easily replicated by computers– vision– natural language– movement– common sense– learning

• AI algorithms tend to be computationally expensive– so are nice graphics and physics– AI ends up getting a small slice of the CPU (about

10%)

Page 7: Next-Generation Game AI

7

Current Technology

• Code– C++, Lua, Python, UnrealScript, etc….

• Finite state machines

• A* for pathfinding– Annotated worlds (“smart environments”)

• A few specialized algorithms– influence maps for RTS

Page 8: Next-Generation Game AI

8

There is Hope!

• A few ambitious developers– e.g. F.E.A.R. (Monolith), Black & White (Lionhead)

• More contact between academia & industry– AIIDE conference– lots of game-development curricula

• Dawning recognition of AI as “next big thing” after graphics, physics

• Faster machines; offloading of graphics, physics chores on specialized hardware

Page 9: Next-Generation Game AI

9

Directions for Next-Gen Game AI

#0: Eliminate glaring stupidity– instantly breaks the suspension of disbelief

and ruins immersion– usual culprits: abysmal pathfinding,

unresponsiveness, insensitivity to context, repetitive behavior

• Much of this is due to brittleness of current game AI

Page 10: Next-Generation Game AI

10

Getting to Zero

• Overcoming NIH syndrome– Standard algorithms

• AI Game Programming Wisdom series, Gamasutra, Game Developer Magazine, etc.

– Middleware– Open-source packages

• Recognizing the importance of good AI– requires dedicated developers w/specialized expertise– needs to be included in pre-production and tool-building

• More open-ended games are forcing more open-ended AI

Page 11: Next-Generation Game AI

11

Direction #1

• Increase behavioral verisimilitude– to complement increasingly realistic character models– more realistic gestures, gaze, facial expressions,

movement– can be done manually by animators, but content

creation is a huge and growing cost in game development

• AAA title cost jumping from $2-10M for Xbox/PS2 to $10-30M for Xbox360/PS3

– “subtle AI” needed to imbue characters with the appearance of emotion, attention, intention

– caveat: aim is the illusion of life, not the real thing

Page 12: Next-Generation Game AI

12

The Uncanny Valley

• Described by Masahiro Mori in 1970

• Humans are more sensitive to subtle behavioral miscues in human-like characters

• As characters look more realistic, they run the risk of becoming increasingly unconvincing

• Subtle AI needs to model and capture these nuances to avoid the valley

GFDL Karl MacDorman, Wikipedia

Page 13: Next-Generation Game AI

13

Example: Half-Life 2

• Valve pushed the state of the art in facial animation, gestures

• Excellent series of articles on gaze in Game Developer Magazine, Aug-Sep 05

• Based on study of real human behavior

• Still lots of scripting behind the scenes

Page 14: Next-Generation Game AI

14

Half-Life 2

Page 15: Next-Generation Game AI

15

Direction #2

• Engage the player’s mind– games have their eyes, ears, and hands already– goal is not to build “super-AIs” that always win

• relatively easy• not much fun for the player

– better to build AI that puts up an epic fight and then loses excitingly

– want the player to treat characters as thinking adversaries (or allies!)

• encourages emotional engagement• allows the player to reason about and outsmart NPCs

Page 16: Next-Generation Game AI

16

Tools of Engagement (1)

• Goal-based planning– gives AI explicit goals that the player can

deduce– enables AI to choose among multiple means

of achieving the same end• adds variety, reduces brittleness

– used in F.E.A.R.– must be carefully constrained to avoid

search combinatorics

Page 17: Next-Generation Game AI

17

Tools of Engagement (2)

• Team/social intelligence– characters are largely unaware of one

another– ability to work as a team to achieve shared

goals creates a challenge for the player– both player-visible and –invisible inter-NPC

communication are useful tools– next level: characters that have a model of

other NPCs’ goals and intentions– difficulties: joint planning, synchronization

Page 18: Next-Generation Game AI

18

Tools of Engagement (3)

• Emotions and personalities– NPCs who have distinct personalities are

easier for the player to anthropomorphize• not “just another guard”

– NPCs whose behavior is affected by their emotional state may require more subtlety from the player

– Even relatively simple models can be effective

– Can be tied to team/social behavior

Page 19: Next-Generation Game AI

19

Tools of Engagement (4)

• Adaptive behavior– characters who learn and exploit player’s habits, strengths,

weaknesses– can be used to dynamically adjust difficulty to keep game

constantly engaging• more sophisticated than simply scaling the number or accuracy of

enemies

– smart advisors/teammates that help out when player is stuck– in-game vs between-game learning

• learning can be costly• for some genres (e.g. RTS), between-game learning is

appropriate• ranges from simple statistical approaches to more complex

induction/pattern recognition

Page 20: Next-Generation Game AI

20

Direction #3

• Enable new kinds of gameplay– AI is intimately tied to game design, even

more closely than physics– game genres have been limited by the

capabilities of game AI• look at all of the movie/book genres yet to be

tapped by games!

– demands more than incremental improvements to AI

Page 21: Next-Generation Game AI

21

Exploring New Frontiers (1)

• Dialogue-capable NPCs– basically shunned in games since Infocom

• speech recognition is tough• parsing is tough• understanding is really tough• speech generation is not nearly as good as voice actors

– the potential rewards are huge• non-combat-based games• richer stories• more natural, open-ended interactions with characters• new modalities for player interaction

Page 22: Next-Generation Game AI

22

Exploring New Frontiers (2)

• Virtual stagecraft– NPCs who know how to act

• games, like movies, already make heavy use of selective omission

• want to emphasize the important and interesting stuff

– Virtual directors who manage the pacing and intensity of the story development

– Virtual storytellers who build customized storylines for the player and adapt them dynamically

Page 23: Next-Generation Game AI

23

Exploring New Frontiers (3)

• Persistent worlds– current MMOGs have barely scratched the

surface here– e.g. player surrogates

• take over for the player when he/she is offline (in an RTS-style game)

• learn and mimic the player’s playing style

– integrating NPCs socially into communities• rumor, history, reputation, memory

Page 24: Next-Generation Game AI

24

Direction #4

• Develop better AI tools and standards– content creation is the single biggest challenge

facing the industry today– AI tools have traditionally been home-grown (if they

exist at all)– better tools are needed if AI is to improve

• usable by designers• reusable across projects (incremental improvement)• more data-driven

– the analogue of a “higher-level language” for AI is desperately needed

• permit designers to work at the conceptual level rather than micromanaging every footstep and eyeblink

Page 25: Next-Generation Game AI

25

Summary

• Current state of game AI: C-

• Plenty of room for innovation:– ransacking academic AI for algorithms– exploring interplay of AI and game design– building better tools

• AI will soon be a major selling point for games on a par with graphics & physics

• How about an “AI Game Jam”?

Page 26: Next-Generation Game AI

Questions?

Page 27: Next-Generation Game AI

27

Tools for Class Projects

• SimBionic– game AI middleware that allows visual

authoring of NPC behaviors– integrates with Java/C++ game engine

• SimVentive– entire visual platform for developing games

and simulations

Page 28: Next-Generation Game AI

28

SimBionic Overview

Authoring Runtime

SimBionicEditor

Interface

Designers &Developers

SimBionicRuntimeEngine

BehaviorLibrary

Predicate &Action

Declarations

Game Engine

Predicate &Action Code

Game

Page 29: Next-Generation Game AI

SimBionic Demo

Page 30: Next-Generation Game AI

30

SimVentive Overview

• Authoring– Create or modify– Test and debug

ScenarioLibrary

SimAuthoring

Tool

SimSpecification

Author SimExecution

Engine

Sta

ndar

dize

d G

UI

Player

Playing– Standard Windows PC– New games can be

easily distributed

Page 31: Next-Generation Game AI

SimVentive Demo