automated planning computer games perspectives and applications n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Automated Planning & Computer Games: Perspectives and Applications PowerPoint Presentation
Download Presentation
Automated Planning & Computer Games: Perspectives and Applications

Loading in 2 Seconds...

play fullscreen
1 / 18

Automated Planning & Computer Games: Perspectives and Applications - PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on

Automated Planning & Computer Games: Perspectives and Applications. Hector Munoz-Avila. General-Purpose Planning: State & Goals. Initial state : (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals : (on C Table) (on B C) (on A B) (clear A). A. Initial state. Goals. C. B. A. B.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Automated Planning & Computer Games: Perspectives and Applications' - tulia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
general purpose planning state goals
General-Purpose Planning: State & Goals
  • Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C)
  • Goals: (on C Table) (on B C) (on A B) (clear A)

A

Initial state

Goals

C

B

A

B

C

(Ke Xu)

general purpose planning operators

No block on top of ?x

No block on top of ?y nor ?x

transformation

On table

General-Purpose Planning: Operators

Operator: (Unstack ?x)

  • Preconditions: (on ?x ?y) (clear ?x)
  • Effects:
    • Add: (on ?x table) (clear ?y)
    • Delete: (on ?x ?y)

?x

?y

?y

?x

general purpose planning operators ii

No block on top of ?x

No block on top of ?y nor ?x

transformation

General-Purpose Planning: Operators (II)

Operator: (Stack ?x ?y ?z)

  • Preconditions: (on ?x ?z) (clear ?y) (clear ?x)
  • Effects:
    • Add: (on ?x ?y) (clear ?z)
    • Delete: (on ?x ?z) (clear ?y)

?x

?y

?z

?y

?x

?z

so what is the solution plan for this problem
So what is the solution plan for this problem?
  • Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C)
  • Goals: (on C Table) (on B C) (on A B) (clear A)
  • Operators: (Stack ?x ?y), (Unstack ?x ?y ?z)

A

Initial state

Goals

C

B

A

B

C

(Ke Xu)

planning search space
Planning: Search Space

C

A

B

C

A

B

C

B

A

B

A

C

B

A

C

B

A

B

C

C

B

A

B

A

C

A

C

A

A

B

C

B

C

C

B

A

A

B

C

(Michael Moll)

some examples
Some Examples

Which of the following problems can be modeled as AI planning problems?

  • Route search: Find a route between Lehigh University and the Naval Research Laboratory
  • Project management: Construct a project plan for organizing an event (e.g., the Musikfest)
  • Military operations: Develop an air campaign
  • Information gathering: Find and reserve an airline ticket to travel from Newark to Miami
  • Game playing: plan the behavior of a computer controlled player
  • Resources control: Plan the stops of several of elevators in a skyscraper building.

Answer: ALL!

classes of general purpose planners

state

  • plan
  • Hierarchical
  • Disjunctive plans
Classes of General-Purpose Planners

General purpose planners can be classified according to the space where the search is performed:

  • SAT
but does automated planning has any use in computer games
But… Does Automated Planning has any use in Computer Games?
  • Intro: http://www.youtube.com/watch?v=iNiss2ccDjA
  • Combat sequence

http://www.youtube.com/watch?v=5-IyYGSGekk

implementation points in fear
Implementation Points in FEAR
  • Goal
  • Three categories of gaming goals
  • Relaxed
  • Investigative
  • Aggressive
  • Planner Search: state-space planning
  • World Representation: compiled in a data structure
  • Planner Optimization: compiled operators, heuristics (factoring the gaming goals)
automated planning uses in games

positioned

Enemy attacked

Attack

Weapon ready

preconditions

effects

Automated Planning: Uses in Games
  • AI paradigm used to implement opponent’s behavior in FEAR (see previous class)
  • Automated Planning is used to gain flexibility in designing Game AI behavior
    • An action:
example

positioned

Stay-put

FEAR defines 30+ such actions. So could generate many plans.

How else could we use to create an opponent AI?

positioned

Take cover

positioned

Ammo loaded

Enemy attacked

Attack

Prepare Weapon

Weapon is ready

Weapon is ready

Holding weapon

Example

FSMs

(Project 1)

How many plans can we generate to achieve Enemy attacked?

optimization representation

Declared as a C++ procedure:

Action Attack()

{ if (positioned && WeaponISReady)

EnemyAttacked = true;

}

positioned

Enemy attacked

Attack

Weapon is ready

Declared as a variable in standard C++:

Boolean EnemyAttacked;

Optimization: Representation
  • Discussion points:
  • Complexity versus an standard AI planner
  • So why AI planners do not adopt this?
optimization search
Optimization: Search

C

A

B

C

A

B

C

B

A

B

A

C

B

A

C

B

A

B

C

C

B

A

B

A

C

A

C

A

A

B

C

B

C

C

B

A

A

B

C

(Michael Moll)

Can you think of a good heuristic to choose next state?

implementation continued1
Implementation Continued
  • Operators are represented as code
  • Allows fast running time evaluation
fsm vs ai planning

Patrol

    • Preconditions:

No Monster

    • Effects:

patrolled

  • Fight
    • Preconditions:

Monster in sight

    • Effects:

No Monster

FSM:

Monster In Sight

Planning Operators

Patrol

Fight

No Monster

A resulting plan:

Monster in sight

No Monster

patrolled

Fight

Patrol

FSM vs AI Planning

(for details see FSM lectures)

Neither is more powerful than the other one

planning gives more flexibility but developer may loose control

Patrol

    • Preconditions:

No Monster

    • Effects:

patrolled

  • Fight
    • Preconditions:

Monster in sight

    • Effects:

No Monster

reasoning

knowledge

Many potential plans:

Planning Operators

Fight

Fight

Fight

Fight

Fight

Patrol

Patrol

Patrol

Patrol

Patrol

Planning Gives More Flexibility But Developer May Loose Control
  • “Separates implementation from data” --- Orkin

If conditions in the state change making the current plan unfeasible: replan!