34
INTRODUCTION TO AI STRIPS PLANNING .. and Applications to Video-games! May 2012 Stavros Vassos, University of Athens, Greece [email protected]

Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Embed Size (px)

DESCRIPTION

This is a short course that aims to provide an introduction to the techniques currently used for the decision making of non-player characters (NPCs) in commercial video games, and show how a simple deliberation technique from academic artificial intelligence research can be employed to advance the state-of-the art. For more information and downloading the supplementary material please use the following links: http://stavros.lostre.org/2012/05/19/video-games-sapienza-roma-2012/ http://tinyurl.com/AI-NPC-LaSapienza

Citation preview

Page 1: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

INTRODUCTION TO AI

STRIPS PLANNING

.. and Applications to Video-games!

May 2012Stavros Vassos, University of Athens, Greece [email protected]

Page 2: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

2

This course aims to

Provide an introduction to the AI techniques currently

used for the decision making of non-player characters

(NPCs) in commercial video games

Show how a simple AI technique from academic

research (STRIPS planning) can be employed to

advance the state-of-the art.

Course overview

Page 3: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

3

This course aims to

Get you started with doing a research/programming

project related to AI and video games!

Using AI tools for STRIPS planning

Using state-of-the-art game engines such as Unity3D and

Source Engine (Half-life, Counter Strike, …)

Course overview

Page 4: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

4

Lecture 1: Game-inspired competitions for AI research,

AI decision making for non-player characters in games

Lecture 2: STRIPS planning, state-space search

Lecture 3: Planning Domain Definition Language (PDDL),

using an award winning planner to solve Sokoban

Lecture 4: Planning graphs, domain independent

heuristics for STRIPS planning

Lecture 5: Employing STRIPS planning in games:

SimpleFPS, iThinkUnity3D, SmartWorkersRTS

Lecture 6: Planning beyond STRIPS

Course overview

Page 5: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

5

Course overview

Material based on the following textbooks, research

papers, and student projects at University of Athens:

Page 6: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

6

Lecture 1: Game-inspired competitions for AI research,

AI decision making for non-player characters in games

Lecture 2: STRIPS planning, state-space search

Lecture 3: Planning Domain Definition Language (PDDL),

using an award winning planner to solve Sokoban

Lecture 4: Planning graphs, domain independent

heuristics for STRIPS planning

Lecture 5: Employing STRIPS planning in games:

SimpleFPS, iThinkUnity3D, SmartWorkersRTS

Lecture 6: Planning beyond STRIPS

Course overview

Page 7: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games7

Is academic AI useful to (commercial) video games?

Are (commercial) video games useful to academic AI?

Page 8: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games8

Is academic AI useful to (commercial) video games?

Academics say: Yes! …

Game developers say: No! …

Are (commercial) video games useful to academic AI?

Page 9: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games9

Is academic AI useful to (commercial) video games?

Academics say: Yes! …

Game developers say: No! …

Are (commercial) video games useful to academic AI?

Puzzle games: complex logical problems

Strategy games: complex resource management and

decision making problems

First-person games: non-player characters as autonomous

agents

Page 10: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games10

Are (commercial) video games useful to academic AI?

Often, the real-world problems are too difficult/complex

to handle

Video games offer a level of abstraction that allows the

AI academic community to experiment focusing on one

aspect of the problem each time

E.g., think of an autonomous robotic bartender

In a bar in Rome

In a controlled environment specifically for this purpose

In a MMORPG (massively multiplayer online RPG)

Page 11: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

11

Performing simple actions in the real world is difficult

Artificial Intelligence and Video Games

youtube link

Page 12: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

12

Acting (and sensing) in video-game worlds is easy!

Artificial Intelligence and Video Games

Page 13: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

13

Acting (and sensing) in video-game worlds is easy!

..and AI can focus on, e.g., decision making

Artificial Intelligence and Video Games

Page 14: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games14

Video-game worlds feature common objects and

realistic physics

Page 15: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games15

Video-game worlds feature realistic navigation

characteristics

Page 16: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games16

Video-game worlds feature interaction with other

characters!

Page 17: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games17

Non Player Characters (NPCs)

Page 18: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games18

Are video games useful to academic AI?

AI Competitions for research problems of academic AI

based on commercial video games

Page 19: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Annual Starcraft Competition at AIIDE19

http://webdocs.cs.ualberta.ca/~cdavid/starcraftaicomp

Artificial

Intelligence &

Interactive

Digital

Entertainment

Starcraft

Real-time

Strategy game

Page 20: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Annual Starcraft Competition at AIIDE20

http://webdocs.cs.ualberta.ca/~cdavid/starcraftaicomp

Brood War Application Programming Interface

C++ API

Retrieve information about the state of the game

Control units and buildings

http://code.google.com/p/bwapi/

Registration deadline: 1 July

Page 21: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Annual Starcraft Competition at AIIDE21

Krasi0 vs Skynet (2011): youtube link

Page 22: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Ms Pac-Man vs Ghost Team Competition

22

http://www.pacman-vs-ghosts.net

Build a program that controls

Ms Pac-Man or one of the ghosts

The game server transmits the state

of the game as an image, 15 times

per second

Java API

Registration deadline: 27 May

Page 23: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

General Game Playing Competition23

http://games.stanford.edu/

You build a program that plays chess

So, it’s smart!

Can it play backgammon then?

Page 24: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

General Game Playing Competition24

http://games.stanford.edu/

Build a program that plays board games.. all of them!

In the beginning of each match the program receives a

description of the game to play in a language that

resembles PDDL

C++, Java, Prolog API, …

Page 25: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Multi-agent programming contest25

http://www.multiagentcontest.org/

Emphasis on multi-agent systems

Since 2005 with different scenarios every year that

force agents to work as a team

Page 28: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games28

People do AI research (e.g., M.Sc., Ph.D.) based on

techniques and results on such competitions

Page 29: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games29

Is academic AI useful to (commercial) video games?

Page 30: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games30

Is academic AI useful to (commercial) video games?

Path finding

Realistic motion

Models of emotion

Decision making

Learning

Nonlinear story telling

Page 31: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games31

Is academic AI useful to (commercial) video games?

Let’s focus on

Games with non-player characters (NPCs)

E.g., First-Person Shooter (FPS) games

The decision making process of an NPC

Page 32: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games32

Video Games:

Finite State Machines

Decision Diagrams

Behavior Trees

Goal Oriented Action Planning

Academic AI on agents:

Knowledge representation, First-order logic,

Classical planning, Planning with preferences, …

Belief-Desire-Intention architecture, Agent-based

programming, …

Probabilistic reasoning, Bayesian networks,

Utility theory, Markov Decision Processes, …

Page 33: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games33

Video Games:

Finite State Machines

Decision Diagrams

Behavior Trees

Goal Oriented Action Planning

Academic AI on agents:

Knowledge representation, First-order logic,

Classical planning, Planning with preferences, …

Belief-Desire-Intention architecture, Agent-based

programming, …

Probabilistic reasoning, Bayesian networks,

Utility theory, Markov Decision Processes, …

Page 34: Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1

Artificial Intelligence and Video Games34

Next:

Finite State Machines (FSMs)

Behavior Trees (BTs)

Goal Oriented Action Planning (GOAP)