the next generation of game planners

113
The Next Generation of Game Planners The "Everything You (N)Ever Wanted to Know" Tour Luke Dicken Strathclyde AI and Games Research Group University of Strathclyde

Upload: luke-dicken

Post on 21-Jun-2015

834 views

Category:

Technology


2 download

DESCRIPTION

Tutorial given during the 2011 Paris Game AI Conference on Automated Planning applied to Games

TRANSCRIPT

Page 1: The Next Generation of Game Planners

The Next Generation of Game Planners

The "Everything You (N)Ever Wanted to Know" Tour

Luke DickenStrathclyde AI and Games Research Group

University of Strathclyde

Page 2: The Next Generation of Game Planners

Controversy!

2

Page 3: The Next Generation of Game Planners

Controversy!

• “...STRIPS-style goal oriented action planning has turned out

to be a dead end.”

2

Page 4: The Next Generation of Game Planners

Controversy!

• “...STRIPS-style goal oriented action planning has turned out

to be a dead end.”

• “Academia has long discarded such planners in favor of

hierarchical ones...”

2

Page 5: The Next Generation of Game Planners

Controversy!

• “...STRIPS-style goal oriented action planning has turned out

to be a dead end.”

• “Academia has long discarded such planners in favor of

hierarchical ones...”

2

Alex, “This Year in Game AI”(Jan ’11)

Page 6: The Next Generation of Game Planners

Controversy!

• “...STRIPS-style goal oriented action planning has turned out

to be a dead end.”

• “Academia has long discarded such planners in favor of

hierarchical ones...”

• This session will drill into what Automated Planning is and

why (some) parts of it are still relevant for Game AI

2

Alex, “This Year in Game AI”(Jan ’11)

Page 7: The Next Generation of Game Planners

What is Automated Planning?

3

Page 8: The Next Generation of Game Planners

What is Automated Planning?

• “Strong” AI

3

Page 9: The Next Generation of Game Planners

What is Automated Planning?

• “Strong” AI

• Finds action sequences - Plan

3

Page 10: The Next Generation of Game Planners

What is Automated Planning?

• “Strong” AI

• Finds action sequences - Plan

• Over 40 years of research

3

Page 11: The Next Generation of Game Planners

What is Automated Planning?

• “Strong” AI

• Finds action sequences - Plan

• Over 40 years of research

• Planning Domain Description Language (PDDL) - 1998

3

Page 12: The Next Generation of Game Planners

How Does it Work?

4

Page 13: The Next Generation of Game Planners

How Does it Work?

1. Description of actions possible

4

Page 14: The Next Generation of Game Planners

How Does it Work?

1. Description of actions possible

2. Complete description of initial state of the world

4

Page 15: The Next Generation of Game Planners

How Does it Work?

1. Description of actions possible

2. Complete description of initial state of the world

3. Definition of goals that need to be achieved

4

Page 16: The Next Generation of Game Planners

Planning

5

S0

Page 17: The Next Generation of Game Planners

Planning

5

S0

S1 S2 S3

Page 18: The Next Generation of Game Planners

Planning

5

S0

S1

Page 19: The Next Generation of Game Planners

Planning

5

S0

S1

S4 S5 S6

Page 20: The Next Generation of Game Planners

Planning

5

S0

S1

S6

Page 21: The Next Generation of Game Planners

Planning

5

S0

S1

S6

And so on, until goal reached.

Page 22: The Next Generation of Game Planners

GOAP

6

Page 23: The Next Generation of Game Planners

GOAP

6

Page 24: The Next Generation of Game Planners

GOAP

6

Page 25: The Next Generation of Game Planners

GOAP

6

Page 26: The Next Generation of Game Planners

GOAP

6

Page 27: The Next Generation of Game Planners

GOAP

6

Page 28: The Next Generation of Game Planners

Issues with GOAP

7

Page 29: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 : Lack of directorial control.

7

Page 30: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 : Lack of directorial control.

‣When NPCs get smart enough to realise standing next

to exploding barrels is hazardous, cinematic experience is

diminished.

7

Page 31: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 : Lack of directorial control.

‣When NPCs get smart enough to realise standing next

to exploding barrels is hazardous, cinematic experience is

diminished.

• Issue 2 : Computational Complexity

7

Page 32: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 : Lack of directorial control.

‣When NPCs get smart enough to realise standing next

to exploding barrels is hazardous, cinematic experience is

diminished.

• Issue 2 : Computational Complexity

‣ GOAP is derived directly from STRIPS. NP-Hard search

problems in the general case.

7

Page 33: The Next Generation of Game Planners

Issues with GOAP

8

Page 34: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 - either a “strong” AI approach is suitable to your

design or it isn’t. Places it often will be include sandbox

environments and companion AI.

8

Page 35: The Next Generation of Game Planners

Issues with GOAP

• Issue 1 - either a “strong” AI approach is suitable to your

design or it isn’t. Places it often will be include sandbox

environments and companion AI.

• Issue 2 is what will be the focus of the rest of the session -

how have planning systems improved since STRIPS/GOAP?

8

Page 36: The Next Generation of Game Planners

Complexity Reduction

9

Page 37: The Next Generation of Game Planners

Complexity Reduction

• If you can reduce complexity of the problem, it

becomes easier to solve...

9

Page 38: The Next Generation of Game Planners

Complexity Reduction

• If you can reduce complexity of the problem, it

becomes easier to solve...

• Either less depth to the problem or less breadth.

9

Page 39: The Next Generation of Game Planners

Landmark Analysis

10

Page 40: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Page 41: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Page 42: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Page 43: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Page 44: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Landmark 1

Page 45: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Landmark 1

Page 46: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Landmark 1

Landmark 2

Page 47: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Landmark 1

Landmark 2

Page 48: The Next Generation of Game Planners

Landmark Analysis

10

Initial State

Goal Found

Landmark 1

Landmark 2

Page 49: The Next Generation of Game Planners

Abstraction

11

A

B

E

C D

F

Page 50: The Next Generation of Game Planners

Abstraction

11

A

B

E

C D

F

Page 51: The Next Generation of Game Planners

Abstraction

11

Page 52: The Next Generation of Game Planners

Horizon Management

12

A

B

E

C D

F

Page 53: The Next Generation of Game Planners

Horizon Management

12

Page 54: The Next Generation of Game Planners

Horizon Management

12

E

Page 55: The Next Generation of Game Planners

Horizon Management

12

B

E

Page 56: The Next Generation of Game Planners

Horizon Management

12

B

E

C

Page 57: The Next Generation of Game Planners

Horizon Management

12

B

E

C D

Page 58: The Next Generation of Game Planners

Horizon Management

12

B

E

C D

F

B

E

C D

F

Page 59: The Next Generation of Game Planners

Heuristics

13

Page 60: The Next Generation of Game Planners

Heuristics

• Since GOAP came out, major advances in heuristics

13

Page 61: The Next Generation of Game Planners

Heuristics

• Since GOAP came out, major advances in heuristics

• Most significant :

13

Page 62: The Next Generation of Game Planners

Heuristics

• Since GOAP came out, major advances in heuristics

• Most significant :

‣ Relaxed Plan Graph

13

Page 63: The Next Generation of Game Planners

Heuristics

• Since GOAP came out, major advances in heuristics

• Most significant :

‣ Relaxed Plan Graph

‣ Landmark Heuristic

13

Page 64: The Next Generation of Game Planners

Hierarchical Task Network

14

Page 65: The Next Generation of Game Planners

Hierarchical Task Network

14

Kill Enemy

Page 66: The Next Generation of Game Planners

Hierarchical Task Network

14

Kill Enemy

Approach Enemy Face Enemy Shoot

Enemy

Page 67: The Next Generation of Game Planners

Hierarchical Task Network

14

Kill Enemy

Approach Enemy Face Enemy Shoot

Enemy

Leave Cover Navigate

Page 68: The Next Generation of Game Planners

Hierarchical Task Network

14

Kill Enemy

Approach Enemy Face Enemy Shoot

Enemy

Leave Cover Navigate ...and so on

Page 69: The Next Generation of Game Planners

Hierarchical Task Network

14

Kill Enemy

Approach Enemy Face Enemy Shoot

Enemy

Leave Cover Navigate ...and so on

Until executable actions reached.

Page 70: The Next Generation of Game Planners

Optimality

15

Page 71: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

15

Page 72: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

• Academics

15

Page 73: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

• Academics

‣ Aim is optimal - shortest, most efficient, least cost

15

Page 74: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

• Academics

‣ Aim is optimal - shortest, most efficient, least cost

• Industry

15

Page 75: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

• Academics

‣ Aim is optimal - shortest, most efficient, least cost

• Industry

‣ Aim is entertaining - believable, beatable, pseudo-smart

15

Page 76: The Next Generation of Game Planners

Optimality

•Optimality is a big issue for academic vs industry

• Academics

‣ Aim is optimal - shortest, most efficient, least cost

• Industry

‣ Aim is entertaining - believable, beatable, pseudo-smart

• How can we bridge this disconnect?

15

Page 77: The Next Generation of Game Planners

Metrics

16

Page 78: The Next Generation of Game Planners

Metrics

• Plan Metrics allow you to define optimal on your

terms.

16

Page 79: The Next Generation of Game Planners

Metrics

• Plan Metrics allow you to define optimal on your

terms.

• Not a total solution, adds extra compute time.

16

Page 80: The Next Generation of Game Planners

17

Page 81: The Next Generation of Game Planners

But what happens after planning?

17

Page 82: The Next Generation of Game Planners

Plan Execution

18

Page 83: The Next Generation of Game Planners

Plan Execution

• Planning is not the same as doing something

18

Page 84: The Next Generation of Game Planners

Plan Execution

• Planning is not the same as doing something

• Big question is: “what happens next?”

18

Page 85: The Next Generation of Game Planners

Plan Execution

• Planning is not the same as doing something

• Big question is: “what happens next?”

‣ Especially considering that the traditional assumptions of

planning make doing things with plans “challenging”!

18

Page 86: The Next Generation of Game Planners

Execute Blind

19

Page 87: The Next Generation of Game Planners

Execute Blind

19

ExecutePlanStart

PlanEnd

Page 88: The Next Generation of Game Planners

Execute Blind

19

Page 89: The Next Generation of Game Planners

Execute Blind

19

Page 90: The Next Generation of Game Planners

Execute Blind

19

Page 91: The Next Generation of Game Planners

Execute/Replan

20

Page 92: The Next Generation of Game Planners

Execute/Replan

20

ExecutePlanStart

Page 93: The Next Generation of Game Planners

Execute/Replan

20

ExecutePlanStart

??? ?

Page 94: The Next Generation of Game Planners

Execute/Replan

20

ExecutePlanStart

??? ?

Replan

Page 95: The Next Generation of Game Planners

Execute/Replan

20

ExecutePlanStart

??? ?

Execute

Replan

Page 96: The Next Generation of Game Planners

Execute/Replan

20

ExecutePlanStart

??? ?

Execute

Replan

GoalReached

Page 97: The Next Generation of Game Planners

Execution Monitoring

21

Page 98: The Next Generation of Game Planners

Execution Monitoring

21

Page 99: The Next Generation of Game Planners

Integrated Influence

22

Page 100: The Next Generation of Game Planners

Integrated Influence

22

Page 101: The Next Generation of Game Planners

Integrated Influence

22

Page 102: The Next Generation of Game Planners

Integrated Influence

22

Page 103: The Next Generation of Game Planners

Integrated Influence

22

Page 104: The Next Generation of Game Planners

Integrated Influence

22

Page 105: The Next Generation of Game Planners

Integrated Influence

22

Page 106: The Next Generation of Game Planners

Integrated Influence

22

Page 107: The Next Generation of Game Planners

Summary

23

Page 108: The Next Generation of Game Planners

Summary

• GOAP is not the extent of planning

23

Page 109: The Next Generation of Game Planners

Summary

• GOAP is not the extent of planning

•We’ve come a long way in the 40 years since

STRIPS was invented.

23

Page 110: The Next Generation of Game Planners

Summary

• GOAP is not the extent of planning

•We’ve come a long way in the 40 years since

STRIPS was invented.

• Planning is still mostly focused on the “big”

problems.

23

Page 111: The Next Generation of Game Planners

Summary

• GOAP is not the extent of planning

•We’ve come a long way in the 40 years since

STRIPS was invented.

• Planning is still mostly focused on the “big”

problems.

• There is work in planning of relevance.

23

Page 112: The Next Generation of Game Planners

Contact

• Email - [email protected]

•Website - http://saig.cis.strath.ac.uk

• Twitter - @LukeD

24

Page 113: The Next Generation of Game Planners

References• Landmarks

‣ “On the Extraction, Ordering and Usage of Landmarks in Planning” Porteous et al, ECP ’01

• Abstraction

‣ “Applying Clustering Techniques to Reduce Complexity in Automated Planning Domains” Dicken &

Levine, IDEAL ’10

• Relaxed Plan Graph

‣ “The FF Planning System: Fast plan Generation Through Heuristic Search” Hoffman, JAIR Vol. 14

• Landmark Heuristic

‣ “The LAMA Planner Using Landmark Counting in Heuristic Search” Richter & Westphal, IPC ’08

• HTNs

‣ “SHOP2 : An HTN Planning System” Nau et al, JAIR Vol. 20

• Execute/Replan

‣ “FF-Replan: A baseline for probabilistic planning” Yoon et al, ICAPS ’07

• Execution Monitoring

‣ “T-REX: A Deliberative System for AUV Control” McGann et al, PPERWS ’07

25