SlideShare una empresa de Scribd logo
1 de 49
Descargar para leer sin conexión
NPCAI-2011: AIIDE Workshop on Non-Player Character AI   stavrosv@di.uoa.gr   October 2011




          The SimpleFPS Planning Domain:
          A PDDL Benchmark for Proactive NPCs


          Stavros Vassos Michail Papakonstantinou
          University of Athens, Greece
Very brief introduction
2



       Focus on first-person shooter (FPS) games and the
        non-player characters (NPCs) that act against the
        human player.

       Focus on goal-oriented action planning (GOAP) for
        NPC behavior.
Very brief introduction
3



       Focus on first-person shooter (FPS) games and the
        non-player characters (NPCs) that act against the
        human player.

       Focus on goal-oriented action planning (GOAP) for
        NPC behavior.

       SimpleFPS is a first step towards evaluating how the
        existing academic approaches for planning would
        perform if directly applied in an FPS setting.
Overview
4



       STRIPS planning and PDDL

       The SimpleFPS planning domain

       Preliminary results using award-winning planners

       Conclusions and future work
STRIPS Planning
5


       Given:
         Initial   State
STRIPS Planning
6


       Given:
         Initial   State

         Goal
STRIPS Planning
7


       Given:
         Initial   State

         Goal


         Available    actions
STRIPS Planning
8


       Given:
         Initial   State

         Goal


         Available    actions


       Find:
        A  sequence of actions that satisfy the goal
         E.g.: [Left, Down, Left, Up, …]
STRIPS Planning
9


       Given:
         Initial   State

         Goal


         Available    actions


       Find:
        A   sequence of actions that satisfy the goal

       Planner: Works for every initial state/goal
STRIPS Planning
10


        Given:
          Initial   State

          Goal


          Available    actions


        Find:
         A   sequence of actions that satisfy the goal

        Planner: Works for every initial state/goal, domain
Planning Domain Description Language
11


        Language for specifying STRIPS planning problems
        Formal syntax like a programming language

          Initial State   (:init …)
          Goal            (:goal …)
          Actions         (:action name
                                    :parameters (?from ?to ?dir)
                                    :preconditions (…)
                                    :effects (…)
                           )
Planning Domain Description Language
12


        Language for specifying STRIPS planning problems
        Formal syntax like a programming language

          Initial State   (:init …)
          Goal            (:goal …)
          Actions         (:action name
                                    :parameters (?from ?to ?dir)
                                    :preconditions (…)
                                    :effects (…)
                           )

        Based on literals, e.g., bot-at(area1) (bot-at area1)
Planning Domain Description Language
13


        Language for specifying STRIPS planning problems
        Formal syntax like a programming language

          Predicates      (:predicates …)
          Actions         (:action name
                                    :parameters (?from ?to ?dir)
                                    :preconditions (…)           Planning
                                    :effects (…)                 Domain
                           )

          Objects         (:objects …)                         Planning
          Initial State   (:init …)                            Problem
          Goal            (:goal …)
Planning Domain Description Language
14


        International Planning Competition 1998 – today

          SAT  Plan
                         Planning Domains in PDDL:
          TL Plan              Blocks world,
                            Storage, Trucks, …
          FF

          BlackBox      Planning Problems in PDDL
                             for these domains
          SHOP2

          TALPlanner

         …                    Comparisons
                               Evaluation
                               Conclusions
Planning Domain Description Language
15


        International Planning Competition 1998 – today

          SAT  Plan
                         Planning Domains in PDDL:
          TL Plan              SimpleFPS
                                  Domain
          FF

          BlackBox      Planning Problems in PDDL
                           for SimpleFPS domain
          SHOP2

          TALPlanner

         …                    Comparisons
                               Evaluation
                               Conclusions
Motivation for SimpleFPS
16


        Planning in academia: extensively tested
          Many PDDL planning domains and problems available
          Many off-the-shelf PDDL planners available


        Planning in FPS video games: not extensively tested
         A  few success stories but not clear if the same works
           under different assumptions or what is the best approach

        SimpleFPS: A PDDL domain for evaluating academic
         planning techniques for NPCs in First-Person Shooters
SimpleFPS
17


        SimpleFPS_PDDL_Domain.txt




        SimpleFPS_PDDL_ProblemGenerator.c
SimpleFPS
18


        SimpleFPS_PDDL_Domain.txt:
          Specifies   the predicates that can be used to describe
           the initial state of the game-world and the goal
           condition for the NPC.
          Specifies a list of available actions that the NPC can
           perform, along with their preconditions and effects in
           terms of the predicates of the domain.

        SimpleFPS_PDDL_ProblemGenerator.c:
         A  tool to generate problem instances, i.e., an initial
           state of the game-world and a goal for the NPC.
SimpleFPS domain
19
SimpleFPS domain
20


        Represent only very simple features:

          Game-world   consists of interconnected areas, each of
           which has a number of points of interest (POIs).

         A few types of items located at POIs (weapons, ammo,
           med-kits, keycards).

          NPC  can perform basic actions (move between areas
           or POIs, pick-up/use items, attack, take cover).
A SimpleFPS problem instance
21


        (:init …)
A SimpleFPS problem instance
22


        (:init …)
                                6 areas, some of them
                                 connected through doors
     a1                    a3    and corridors:
                     a2
                                 (area a1)
                                 (area a2)

                           a4    (area a3)

                                 (area a4)
     a6               a5
                                 (area a5)

                                 (area a6)
A SimpleFPS problem instance
23


        (:init …)
                          6  areas, some of them
                            connected through doors
     a1                     and corridors:
                     a2
                           (poi door1 a1)
                           (waypoint door1)

                           (connected a1 a2 door1)

                           (closed door1)

                           (opens door1 keycard1)
A SimpleFPS problem instance
24


        (:init …)
                           For each area a number
                            of POIs are listed along
                            with their properties:
                     a2
                           (poi door1 a2)
                           (poi c1 a2)

                           (poi c2 a2)

                           (connected a2 a1 door1)

                           (cover-point c1)

                           (cover-point c2)
A SimpleFPS problem instance
25


        (:init …)
                           For each area a number
                            of POIs are listed along
                            with their properties:

                           (poi g1 a5)
                           (poi amm1 a5)

                           (gun g1)

                           (unloaded g1)
                     a5
                           (ammo amm1 g1)
A SimpleFPS problem instance
26


        (:init …)
                                 For each area a number
                                  of POIs are listed along
     a1                    a3     with their properties:
                     a2
                                 knife

                                 med-kit

                           a4    control-box

                                 night-vision-gun
     a6               a5
                                …
SimpleFPS domain: Predicates
27



    NPC-related              Area-related             Item-related:
      (npc-at ?a)              (area  ?a)               (med-kit  ?m)
      (npc-close-to ?p)        (conn ?a1 ?a2 ?w)        (knife ?k)

      (npc-covered)            (waypoint ?w)            (gun ?g)

      (npc-uncovered)          (lighted ?area)          (loaded ?g)

      (npc-holding ?o)         (dark ?area)             (unloaded ?g)

      (npc-injured)            (poi ?p ?a)              (ammo ?i ?g)

      (npc-full-health)        (control-box ?p)         (night-vision ?g)

      (npc-aware)              (cover-point ?p)

      (npc-unaware)            (item ?p)
SimpleFPS domain: Actions
28


        (: action …)
                              Available   NPC actions:

     a1                 a3    move-to-area
                 a2
                              move-to-poi

                              pick-up-item

                              use-item
                        a4    take-cover

     a6            a5         un-cover
SimpleFPS domain: move-to-point
29


      (:action move-to-point
         :parameters (?area ?point)
         :precondition (and
                   (npc-at ?area)
                   (point-of-interest ?point ?area)
         )
         :effect (and
                   (npc-close-to ?point)
         )
      )
SimpleFPS domain: reload
30


      (:action reload
         :parameters (?gun ?item)
         :precondition (and
                    (npc-holding ?gun) (gun ?gun) (unloaded ?gun)
                    (npc-holding ?item) (ammo ?item ?gun)
         )
         :effect (and
                    (not (unloaded ?gun))
                    (loaded ?gun)
                    (not (npc-holding ?item))
         )
      )
The SimpleFPS domain: Actions
31



    Location-related:               Attack-related:
      moving-to-patrol                make-contact

      moving-to-take-position         take-cover

      move-away-from-point            uncover

      move-to-point                   use-med-kit

      move-to-point-from-point        reload

      make-accessible                 attack-melee

      place-in-inventory              attack-ranged

      turn-on-lights                  sneak-kill

      turn-off-lights
A SimpleFPS problem instance
32


        (:goal …)
                                NPC    goals:

     a1                   a3    g1: (player-wounded)
                a2
                                g2: (npc-covered)

                                g3: (npc-full-health)


                          a4    g4:   (and g1 g2 g3)
     a6              a5
A SimpleFPS problem instance
33

        1.    (move-to-point area0 door3-0)
        2.    (moving-to-patrol area0 area3 door3-0)
        3.    (move-to-point area3 control-box3)
        4.    (turn-on-lights area3 control-box3)
        5.    (move-to-point-from-point area3 ammogun3 control-box3)
        6.    (make-contact area3 p)
        7.    (place-in-inventory area3 ammogun3)
        8.    (move-to-point area3 gun3)
        9.    (place-in-inventory area3 gun3)
        10.   (move-to-point area3 firstaid1)
        11.   (reload gun3 ammogun3)
        12.   (attack-ranged area3 gun3 p)
        13.   (place-in-inventory area3 firstaid1)
        14.   (move-to-point area3 coverpoint1)
        15.   (use-medikit firstaid1)
        16.   (take-cover area3 coverpoint1)
SimpleFPS problem generator
34
SimpleFPS problem generator
35


        Takes as input:
          -a  number of areas,
          -c the probability that two areas are connected

          -n total number of points of interest

          -g the goal condition as one of g1, g2, g3, g4

          -l the number of instances to be generated

        Generates problem instances also using some rules:
          Card-keysare added for locked doors
          Ammo is added for guns that are unloaded

         …
Preliminary results with SimpleFPS
36


        Used the tool to generate 3 datasets:
           5  areas
            7 areas
            10 areas

        For each dataset we generated 10 instances with:
            10    items
           …
            100    items
        For each of the 4 goals:
            g1,   g2, g3, g4
Preliminary results with SimpleFPS
37


        Used three award-winning planners in these datasets:

          BlackBox   (Kauts and Selman 1999)

          FastForward   (Hoffman 2001)

          FastDownward    (Helmert 2006)


        Laptop specs
Preliminary results with SimpleFPS
38


        BlackBox, FastForward: Two graphs in the paper
          Problems   planners always return an answer within 1.5sec

     BB: up to 5 areas/50 POIs          FF: up to 10 areas/70 POIs
Preliminary results with SimpleFPS
39


        BlackBox,Different planning techniques paper
                  FastForward: Two graphs in the
          Problems   planners a lot of difference within 1.5sec
                       make always return an answer
     BB: up to 5 areas/50 POIs         FF: up to 10 areas/70 POIs
Preliminary results with SimpleFPS
40


        FastDownward:
          Always   returns an answer within ~0.25sec

     FD: 10 areas/100 POIs/g4           FF: up to 10 areas/70 POIs
Preliminary results with SimpleFPS
41


        FastDownward: techniques and planners
               Planning
          Always   returns an answer within ~0.25sec
                          get better over time
     FD: 10 areas/100 POIs/g4           FF: up to 10 areas/70 POIs
Preliminary results with SimpleFPS
42


        FastDownward:
          Uses   up to ~6.5MBs

     FD: Running time             FD: Memory
Preliminary results with SimpleFPS
43


        Relatively small-sized problems wrt FPS games:
         7   areas/100 POIs

        The planner takes a lot of resources:
         A  lots of time: ~7 frames to respond using 100% of
           the CPU resources of a laptop
          A lot of memory: ~6.5MB
Preliminary results with SimpleFPS
44


        Relatively small-sized problems wrt FPS games:
         7   areas/100 POIs

        The planner takes a lot of resources:
         A  lots of time: ~7 frames to respond using 100% of
           the CPU resources of a laptop
          A lot of memory: ~6.5MB


        Different assumptions in academia and FPS games
Preliminary results with SimpleFPS
45


        Relatively small-sized problems wrt FPS games:
         7   areas/100 POIs

        The planner takes a lot of resources:
         A  lots of time: ~7 frames to respond using 100% of
           the CPU resources of a laptop
          A lot of memory: ~6.5MB


        Different assumptions in academia and FPS games
          Plan   length up to 20 actions
Conclusions
46


        BB, FF, FD more or less perform as expected:
          One of them performs poorly
          One of them is slow but not too slow

          One of them is good but not good enough for real-time
           planning
Conclusions
47


        BB, FF, FD more or less perform as expected:
          One of them performs poorly
          One of them is slow but not too slow

          One of them is good but not good enough for real-time
           planning
        But this is not necessarily bad news as these
         planners are designed to fulfill different needs:
          Find complete solutions as long lists of actions
          Optimal

          Aim for speed using memory at will
Future work
48


        Search for plans that are:
          not optimal
          not complete


        Take advantage of “propositionalization”
          6.5   MBs is too much for 1 character but how about 100?

        Combine with non-planning approaches for NPCs
         along with minimal planning capabilities
          The   Golog family of languages
The SimpleFPS benchmark
49


        Available at http://stavros.lostre.org/sFPS
          SimpleFPS_PDDL_Domain.txt

          SimpleFPS_PDDL_ProblemGenerator.c

          Datasets   with 5 areas, 7 areas, 10 areas


        Feel free to download and experiment!
        Any feedback is mostly appreciated!

        Email: stavros@cs.toronto.edu

Más contenido relacionado

Similar a The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs

nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言鍾誠 陳鍾誠
 
Declarative Language Definition
Declarative Language DefinitionDeclarative Language Definition
Declarative Language DefinitionEelco Visser
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-finalRobert Taylor
 
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++jamieayre
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to HadoopApache Apex
 
Unit1 jwfiles
Unit1 jwfilesUnit1 jwfiles
Unit1 jwfilesmrecedu
 
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...Fahad Cheema
 
Introduction to MapReduce using Disco
Introduction to MapReduce using DiscoIntroduction to MapReduce using Disco
Introduction to MapReduce using DiscoJim Roepcke
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийSigma Software
 
A MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryA MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryKen Friis Larsen
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List ProceduresDavid Evans
 
Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Magnus Christerson
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkPatrick Wendell
 

Similar a The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs (20)

nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言
 
Declarative Language Definition
Declarative Language DefinitionDeclarative Language Definition
Declarative Language Definition
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-final
 
Machine language
Machine languageMachine language
Machine language
 
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
 
Hadoop-Introduction
Hadoop-IntroductionHadoop-Introduction
Hadoop-Introduction
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
Unit1 jwfiles
Unit1 jwfilesUnit1 jwfiles
Unit1 jwfiles
 
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...
Resource to Performance Tradeoff Adjustment for Fine-Grained Architectures ─A...
 
Introduction to MapReduce using Disco
Introduction to MapReduce using DiscoIntroduction to MapReduce using Disco
Introduction to MapReduce using Disco
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола Мозговий
 
C Language Unit-1
C Language Unit-1C Language Unit-1
C Language Unit-1
 
A MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryA MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD Library
 
EEDC Programming Models
EEDC Programming ModelsEEDC Programming Models
EEDC Programming Models
 
02paradigms.ppt
02paradigms.ppt02paradigms.ppt
02paradigms.ppt
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List Procedures
 
Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31
 
Rsltollvm
RsltollvmRsltollvm
Rsltollvm
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache Spark
 

Más de Stavros Vassos

Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsStavros Vassos
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityStavros Vassos
 
Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchStavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Stavros Vassos
 

Más de Stavros Vassos (6)

Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basics
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in Unity
 
Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic search
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs

  • 1. NPCAI-2011: AIIDE Workshop on Non-Player Character AI stavrosv@di.uoa.gr October 2011 The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs Stavros Vassos Michail Papakonstantinou University of Athens, Greece
  • 2. Very brief introduction 2  Focus on first-person shooter (FPS) games and the non-player characters (NPCs) that act against the human player.  Focus on goal-oriented action planning (GOAP) for NPC behavior.
  • 3. Very brief introduction 3  Focus on first-person shooter (FPS) games and the non-player characters (NPCs) that act against the human player.  Focus on goal-oriented action planning (GOAP) for NPC behavior.  SimpleFPS is a first step towards evaluating how the existing academic approaches for planning would perform if directly applied in an FPS setting.
  • 4. Overview 4  STRIPS planning and PDDL  The SimpleFPS planning domain  Preliminary results using award-winning planners  Conclusions and future work
  • 5. STRIPS Planning 5  Given:  Initial State
  • 6. STRIPS Planning 6  Given:  Initial State  Goal
  • 7. STRIPS Planning 7  Given:  Initial State  Goal  Available actions
  • 8. STRIPS Planning 8  Given:  Initial State  Goal  Available actions  Find: A sequence of actions that satisfy the goal  E.g.: [Left, Down, Left, Up, …]
  • 9. STRIPS Planning 9  Given:  Initial State  Goal  Available actions  Find: A sequence of actions that satisfy the goal  Planner: Works for every initial state/goal
  • 10. STRIPS Planning 10  Given:  Initial State  Goal  Available actions  Find: A sequence of actions that satisfy the goal  Planner: Works for every initial state/goal, domain
  • 11. Planning Domain Description Language 11  Language for specifying STRIPS planning problems  Formal syntax like a programming language  Initial State (:init …)  Goal (:goal …)  Actions (:action name :parameters (?from ?to ?dir) :preconditions (…) :effects (…) )
  • 12. Planning Domain Description Language 12  Language for specifying STRIPS planning problems  Formal syntax like a programming language  Initial State (:init …)  Goal (:goal …)  Actions (:action name :parameters (?from ?to ?dir) :preconditions (…) :effects (…) )  Based on literals, e.g., bot-at(area1) (bot-at area1)
  • 13. Planning Domain Description Language 13  Language for specifying STRIPS planning problems  Formal syntax like a programming language  Predicates (:predicates …)  Actions (:action name :parameters (?from ?to ?dir) :preconditions (…) Planning :effects (…) Domain )  Objects (:objects …) Planning  Initial State (:init …) Problem  Goal (:goal …)
  • 14. Planning Domain Description Language 14  International Planning Competition 1998 – today  SAT Plan Planning Domains in PDDL:  TL Plan Blocks world, Storage, Trucks, …  FF  BlackBox Planning Problems in PDDL for these domains  SHOP2  TALPlanner … Comparisons Evaluation Conclusions
  • 15. Planning Domain Description Language 15  International Planning Competition 1998 – today  SAT Plan Planning Domains in PDDL:  TL Plan SimpleFPS Domain  FF  BlackBox Planning Problems in PDDL for SimpleFPS domain  SHOP2  TALPlanner … Comparisons Evaluation Conclusions
  • 16. Motivation for SimpleFPS 16  Planning in academia: extensively tested  Many PDDL planning domains and problems available  Many off-the-shelf PDDL planners available  Planning in FPS video games: not extensively tested A few success stories but not clear if the same works under different assumptions or what is the best approach  SimpleFPS: A PDDL domain for evaluating academic planning techniques for NPCs in First-Person Shooters
  • 17. SimpleFPS 17  SimpleFPS_PDDL_Domain.txt  SimpleFPS_PDDL_ProblemGenerator.c
  • 18. SimpleFPS 18  SimpleFPS_PDDL_Domain.txt:  Specifies the predicates that can be used to describe the initial state of the game-world and the goal condition for the NPC.  Specifies a list of available actions that the NPC can perform, along with their preconditions and effects in terms of the predicates of the domain.  SimpleFPS_PDDL_ProblemGenerator.c: A tool to generate problem instances, i.e., an initial state of the game-world and a goal for the NPC.
  • 20. SimpleFPS domain 20  Represent only very simple features:  Game-world consists of interconnected areas, each of which has a number of points of interest (POIs). A few types of items located at POIs (weapons, ammo, med-kits, keycards).  NPC can perform basic actions (move between areas or POIs, pick-up/use items, attack, take cover).
  • 21. A SimpleFPS problem instance 21  (:init …)
  • 22. A SimpleFPS problem instance 22  (:init …) 6 areas, some of them connected through doors a1 a3 and corridors: a2  (area a1)  (area a2) a4  (area a3)  (area a4) a6 a5  (area a5)  (area a6)
  • 23. A SimpleFPS problem instance 23  (:init …) 6 areas, some of them connected through doors a1 and corridors: a2  (poi door1 a1)  (waypoint door1)  (connected a1 a2 door1)  (closed door1)  (opens door1 keycard1)
  • 24. A SimpleFPS problem instance 24  (:init …)  For each area a number of POIs are listed along with their properties: a2  (poi door1 a2)  (poi c1 a2)  (poi c2 a2)  (connected a2 a1 door1)  (cover-point c1)  (cover-point c2)
  • 25. A SimpleFPS problem instance 25  (:init …)  For each area a number of POIs are listed along with their properties:  (poi g1 a5)  (poi amm1 a5)  (gun g1)  (unloaded g1) a5  (ammo amm1 g1)
  • 26. A SimpleFPS problem instance 26  (:init …)  For each area a number of POIs are listed along a1 a3 with their properties: a2  knife  med-kit a4  control-box  night-vision-gun a6 a5 …
  • 27. SimpleFPS domain: Predicates 27  NPC-related  Area-related  Item-related:  (npc-at ?a)  (area ?a)  (med-kit ?m)  (npc-close-to ?p)  (conn ?a1 ?a2 ?w)  (knife ?k)  (npc-covered)  (waypoint ?w)  (gun ?g)  (npc-uncovered)  (lighted ?area)  (loaded ?g)  (npc-holding ?o)  (dark ?area)  (unloaded ?g)  (npc-injured)  (poi ?p ?a)  (ammo ?i ?g)  (npc-full-health)  (control-box ?p)  (night-vision ?g)  (npc-aware)  (cover-point ?p)  (npc-unaware)  (item ?p)
  • 28. SimpleFPS domain: Actions 28  (: action …)  Available NPC actions: a1 a3  move-to-area a2  move-to-poi  pick-up-item  use-item a4  take-cover a6 a5  un-cover
  • 29. SimpleFPS domain: move-to-point 29 (:action move-to-point :parameters (?area ?point) :precondition (and (npc-at ?area) (point-of-interest ?point ?area) ) :effect (and (npc-close-to ?point) ) )
  • 30. SimpleFPS domain: reload 30 (:action reload :parameters (?gun ?item) :precondition (and (npc-holding ?gun) (gun ?gun) (unloaded ?gun) (npc-holding ?item) (ammo ?item ?gun) ) :effect (and (not (unloaded ?gun)) (loaded ?gun) (not (npc-holding ?item)) ) )
  • 31. The SimpleFPS domain: Actions 31  Location-related:  Attack-related:  moving-to-patrol  make-contact  moving-to-take-position  take-cover  move-away-from-point  uncover  move-to-point  use-med-kit  move-to-point-from-point  reload  make-accessible  attack-melee  place-in-inventory  attack-ranged  turn-on-lights  sneak-kill  turn-off-lights
  • 32. A SimpleFPS problem instance 32  (:goal …)  NPC goals: a1 a3  g1: (player-wounded) a2  g2: (npc-covered)  g3: (npc-full-health) a4  g4: (and g1 g2 g3) a6 a5
  • 33. A SimpleFPS problem instance 33  1. (move-to-point area0 door3-0)  2. (moving-to-patrol area0 area3 door3-0)  3. (move-to-point area3 control-box3)  4. (turn-on-lights area3 control-box3)  5. (move-to-point-from-point area3 ammogun3 control-box3)  6. (make-contact area3 p)  7. (place-in-inventory area3 ammogun3)  8. (move-to-point area3 gun3)  9. (place-in-inventory area3 gun3)  10. (move-to-point area3 firstaid1)  11. (reload gun3 ammogun3)  12. (attack-ranged area3 gun3 p)  13. (place-in-inventory area3 firstaid1)  14. (move-to-point area3 coverpoint1)  15. (use-medikit firstaid1)  16. (take-cover area3 coverpoint1)
  • 35. SimpleFPS problem generator 35  Takes as input:  -a number of areas,  -c the probability that two areas are connected  -n total number of points of interest  -g the goal condition as one of g1, g2, g3, g4  -l the number of instances to be generated  Generates problem instances also using some rules:  Card-keysare added for locked doors  Ammo is added for guns that are unloaded …
  • 36. Preliminary results with SimpleFPS 36  Used the tool to generate 3 datasets: 5 areas  7 areas  10 areas  For each dataset we generated 10 instances with:  10 items …  100 items  For each of the 4 goals:  g1, g2, g3, g4
  • 37. Preliminary results with SimpleFPS 37  Used three award-winning planners in these datasets:  BlackBox (Kauts and Selman 1999)  FastForward (Hoffman 2001)  FastDownward (Helmert 2006)  Laptop specs
  • 38. Preliminary results with SimpleFPS 38  BlackBox, FastForward: Two graphs in the paper  Problems planners always return an answer within 1.5sec BB: up to 5 areas/50 POIs FF: up to 10 areas/70 POIs
  • 39. Preliminary results with SimpleFPS 39  BlackBox,Different planning techniques paper FastForward: Two graphs in the  Problems planners a lot of difference within 1.5sec make always return an answer BB: up to 5 areas/50 POIs FF: up to 10 areas/70 POIs
  • 40. Preliminary results with SimpleFPS 40  FastDownward:  Always returns an answer within ~0.25sec FD: 10 areas/100 POIs/g4 FF: up to 10 areas/70 POIs
  • 41. Preliminary results with SimpleFPS 41  FastDownward: techniques and planners Planning  Always returns an answer within ~0.25sec get better over time FD: 10 areas/100 POIs/g4 FF: up to 10 areas/70 POIs
  • 42. Preliminary results with SimpleFPS 42  FastDownward:  Uses up to ~6.5MBs FD: Running time FD: Memory
  • 43. Preliminary results with SimpleFPS 43  Relatively small-sized problems wrt FPS games: 7 areas/100 POIs  The planner takes a lot of resources: A lots of time: ~7 frames to respond using 100% of the CPU resources of a laptop  A lot of memory: ~6.5MB
  • 44. Preliminary results with SimpleFPS 44  Relatively small-sized problems wrt FPS games: 7 areas/100 POIs  The planner takes a lot of resources: A lots of time: ~7 frames to respond using 100% of the CPU resources of a laptop  A lot of memory: ~6.5MB  Different assumptions in academia and FPS games
  • 45. Preliminary results with SimpleFPS 45  Relatively small-sized problems wrt FPS games: 7 areas/100 POIs  The planner takes a lot of resources: A lots of time: ~7 frames to respond using 100% of the CPU resources of a laptop  A lot of memory: ~6.5MB  Different assumptions in academia and FPS games  Plan length up to 20 actions
  • 46. Conclusions 46  BB, FF, FD more or less perform as expected:  One of them performs poorly  One of them is slow but not too slow  One of them is good but not good enough for real-time planning
  • 47. Conclusions 47  BB, FF, FD more or less perform as expected:  One of them performs poorly  One of them is slow but not too slow  One of them is good but not good enough for real-time planning  But this is not necessarily bad news as these planners are designed to fulfill different needs:  Find complete solutions as long lists of actions  Optimal  Aim for speed using memory at will
  • 48. Future work 48  Search for plans that are:  not optimal  not complete  Take advantage of “propositionalization”  6.5 MBs is too much for 1 character but how about 100?  Combine with non-planning approaches for NPCs along with minimal planning capabilities  The Golog family of languages
  • 49. The SimpleFPS benchmark 49  Available at http://stavros.lostre.org/sFPS  SimpleFPS_PDDL_Domain.txt  SimpleFPS_PDDL_ProblemGenerator.c  Datasets with 5 areas, 7 areas, 10 areas  Feel free to download and experiment!  Any feedback is mostly appreciated!  Email: stavros@cs.toronto.edu