SlideShare a Scribd company logo
1 of 37
SHOP 2
Simple Hierarchical Ordered
Planner 2
slides by Andrea Tucci
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications (SHOP & SHOP 2)
● References
Overview
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
● References
Overview
Introduction
Simple Hierarchical Ordered Planner 2 (SHOP 2) :
● Based on Hierarchical Task Network (HTN)
● Implemented in LISP
● Developed by D.Nau, T.Au, O.Ilghami, U.Kuter, D.Wu,
and F.Yaman, H. Muñoz-Avila, J.W. Murdock in 2001;
● Award-winning at International Planning Competition
(2002) for its performance
Introduction (2)
● Steps of a plan have the same order as their execution
(like SHOP).
>> this speed up reasoning process
● SHOP 2 characteristics go further :
○ task and subtask can be partially ordered;
○ many PDDL features included (e.g. quantifiers,
conditional effects)
○ possibilities to satisfy a method's precondition are
sorted according to specifications provided by the
programmer
○ others
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
● References
Overview
Hierarchical Task Networks
(HTNs)
● Produces actions to reach a (complex) task.
● Task can be decomposed in subtasks, primitive or
complex
● Method : how a complex task can be decomposed
● Planner decomposes complex tasks until a primitive one
is found
Hierarchical Task Networks
(HTNs) - (2)
Hierarchical Task Networks
(HTNs) - (3)
Planner :
● Choose a method for decompose a complex task into
subtasks
● Repeat until a plan is found or we came out with an
infeasible plan
● In the latter case, backtrack and try other implementing
methods.
Hierarchical Task Networks
(HTNs) - (4)
Example :
(transport-two p1 p2)
initial state :
(package p1), (at p1 l1), (destination p1
l3), (available-truck t1), (at t1 home)
(package p2), (at p2 l2), (destination p2
l4), (available-truck t2), (at t2 home)
Hierarchical task Networks
(HTNs) - (4)
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
● References
Overview
Features - Basic Elements
Specify a domain description that consists of a set of
methods, operators and axioms.
>Syntactical Note
A variable is preceded by "?" symbol.
A comment is preceded by ";".
● Tasks
Action to be done. They can be either primitive or
complex.
(s t1 t2 ... tn)
A primitive task is preceded by "!" symbol.
● Operators
Indicates how a primitive task can be executed.
(:operator h P D A [c])
Features - Basic Elements - (2)
● Methods
How to decompose a complex task.
(:method h [n1] C1 T1 [n2] C2 T2 ... [nk] Ck
Tk)
● Axioms
Used to infer precondition that are not explicitly
asserted in our current state (e.g. including quantifiers,
implications etc).
(:- a [name1] E1 ... [namen] En)
(:- head tail)
Which means that head is true if tail is true (Horn
clauses).
Features - Basic Elements 6
● External Function Call
Result is returned by a procedure, e.g
numeric evaluation.
( call f t1 t2 ... tn )
where f is a function symbol
Features - Additional
● Sorting variable bindings
● Branch and Bound Optimization
● PDDL Operator Translation
● Protected Condition and Anti-Interleaving
● Debugging Facilities
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
● References
Overview
SHOP 2 Algorithm
if t is primitive, use an instance a of an
operator that matches t and has satisfied
precondition in s. Apply a.
if t is complex, find a method that can be
applied to t and decompose it.
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
● References
Overview
Using SHOP 2
● SHOP 2 requires lisp
● JSHOP also available, based on Java
Create a program in SHOP 2
1. Define a domain
2. Define one (or more) problems
3. run!
Using SHOP 2 - (2)
; extremely simple example
(defdomain basic (
(:operator (!pickup ?a) () () ((have ?a)))
(:operator (!drop ?a) ((have ?a)) ((have ?a)) ())
(:method (swap ?x ?y)
((have ?x) (in-range ?x ?y))
((!drop ?x) (!pickup ?y))
((have ?y) (in-range ?x ?y))
((!drop ?y) (!pickup ?x))))
)
; axiom
(:- (in-range ?x)
yes
((position ?x ?p1) (position ?y ?p2) (max-range ?r) (call >= ?r
(call - ?p2 ?p1)))
)
)
(defproblem problem basic
((have phone) (max-range 20) (position phone 5) (position key 10))
((swap phone key)))
PLAN -> (!drop phone) (!pickup key)
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
Overview
○ Video games
○ Evacuation
○ Evaluation of terrorist threats
○ Automated composition of web services
○ ...more.
● Resources
Application - Video games
Application - Video Games (2)
● The use of HTNs in video games arise in
the last years.
Application - Video Game (3)
● An example : Killzone 2 (Guerrilla Games, PS3 2009)
● First Person Shooter (FPS)
● Planner based on SHOP syntax
● Killzone AI structure : goal driven
● Behavior associated with the selected goal
Application - Video Games (4)
● Killzone 2 AI : HTN-based
● High-level rules -> what to do
● Low-level rules -> how to do selected task(s)
● More flexibility
● HTN also control squads
Application - Video Games (5)
example
(:method (select_weapon_and_attack_as_turret ?inp_threat)
(branch_use_bullets // Only use bullets against humanoids and turrets.
(and
(or (threat ?inp_threat humanoid) (threat ?inp_threat turret) )
(distance_to_threat ?inp_threat ?threat_distance)
(call lt ?threat_distance @weapon_bullet_max_range) )
((attack_as_turret_using_weapon_pref ?inp_threat wp_bullets))
)
( branch_use_rockets // Don't use rockets against humanoids and turrets.
(and
(not (threat ?inp_threat humanoid)) (not (threat ?inp_threat
turret))
(distance_to_threat ?inp_threat ?threat_distance)
(call lt ?threat_distance @weapon_rocket_max_range) )
((attack_as_turret_using_weapon_pref ?inp_threat wp_rockets))
)
)
Application - Video Games (6)
some numbers
Individual bot domain
● 360 methods
● 1048 branches
● 138 behaviors
● 147 continue branches
During multiplayer game (14 bots / max. 10 turrets / max. 6
drones / squads)
● Approx. 500 plans generated per second
● Approx. 8000 decompositions per second
● Avg. 15 decompositions per planning.
● Approx 24000 branch evaluations per second.
Application - Evacuation
● US Naval Research Laboratory’s Hierarchical
Interactive Case-Based Architecture for Planning
(HICAP) helps human planners to build evacuation
plans.
● Generative and case-specific planning. SHOP provides
the generative component.
● Interactive plan modification : human expert can modify
tasks and plans interactively.
Application - evaluating terrorist
threats
● Naval Research Laboratory’s Analogical
Hypothesis Elaboration for Activity
Detection (AHEAD) helps to understand
and evaluate terrorists threats.
● A HTN domain encode hostile activities.
● AHEAD takes a hypothesis as input and
returns a model of the hostile activity.
Application - evaluating terrorist
threats
● SHOP 2 produces a plan compatible with
hypothesis.
● SHOP 2 queries an external evidence
database to make some tests
Application - automated
composition of web services
● Web service : a part of web that offer
functionality
● The OWL-S (Web Ontology Language for
Services) is a language for semantic markup
of Web services
● It describes services as complex or atomic
processes with preconditions and effects.
● University of Maryland has developed an
algorithm to translate OWL-S process-
models to SHOP 2 methods and operators.
Application - automated
composition of web services (2)
● Goal : compose web services
● User can compose them by using SHOP
2
● Result : HTN plan that corresponds to the
composite process.
Application - others
● Fighting forest fires
● Material selection for manifacturing
● Project Planning
etc
Check this paper out SHOP & SHOP 2
applications
● Introduction
● Hierarchical Task Networks
● Features
● SHOP 2 Algorithm
● Using SHOP 2
● Applications
○ Video games
○ Evacuation
○ Location-based services
○ Automated composition of web services
○ ...more.
● References
Overview
References
● SHOP 2 : An HTN Planning System - (D.
Nau et al, 2003)
● A hierarchically-layered multiplayer bot
system for a first-person shooter (Tim
Verweij, 2007)
● Killzone 2 Multiplayer Bots - ( Alex
Champandard, Tim Verweij, Remco
Straatman, 2009)
● Application of SHOP and SHOP 2 - (D.Nau
et al, 2005)
● Documentation for SHOP 2
Thanks for your attention
Andrea Tucci
@andreatux

More Related Content

What's hot

Session 6 sv_randomization
Session 6 sv_randomizationSession 6 sv_randomization
Session 6 sv_randomizationNirav Desai
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprPrabhavathi P
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLE2MATRIX
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.MOHIT DADU
 
Declarative Gesture Spotting Using Inferred and Refined Control Points
Declarative Gesture Spotting Using Inferred and Refined Control PointsDeclarative Gesture Spotting Using Inferred and Refined Control Points
Declarative Gesture Spotting Using Inferred and Refined Control PointsBeat Signer
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionBipul Chandra Kar
 
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 TutorialSystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 TutorialAmiq Consulting
 
Platform-independent static binary code analysis using a meta-assembly language
Platform-independent static binary code analysis using a meta-assembly languagePlatform-independent static binary code analysis using a meta-assembly language
Platform-independent static binary code analysis using a meta-assembly languagezynamics GmbH
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to AlgorithmsVenkatesh Iyer
 
02 intel v_tune_session_02
02 intel v_tune_session_0202 intel v_tune_session_02
02 intel v_tune_session_02Vivek chan
 
Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Jonathan Salwan
 
Unit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process SynchronizationUnit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process Synchronizationcscarcas
 

What's hot (20)

Session 6 sv_randomization
Session 6 sv_randomizationSession 6 sv_randomization
Session 6 sv_randomization
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl ppr
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDL
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
 
verilog
verilogverilog
verilog
 
6 Synchronisation
6 Synchronisation6 Synchronisation
6 Synchronisation
 
Declarative Gesture Spotting Using Inferred and Refined Control Points
Declarative Gesture Spotting Using Inferred and Refined Control PointsDeclarative Gesture Spotting Using Inferred and Refined Control Points
Declarative Gesture Spotting Using Inferred and Refined Control Points
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 TutorialSystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 
Platform-independent static binary code analysis using a meta-assembly language
Platform-independent static binary code analysis using a meta-assembly languagePlatform-independent static binary code analysis using a meta-assembly language
Platform-independent static binary code analysis using a meta-assembly language
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
02 intel v_tune_session_02
02 intel v_tune_session_0202 intel v_tune_session_02
02 intel v_tune_session_02
 
Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes
 
Unit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process SynchronizationUnit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process Synchronization
 
Os5
Os5Os5
Os5
 

Similar to Shop 2 presentation slide

BlaBlaCar Elastic Search Feedback
BlaBlaCar Elastic Search FeedbackBlaBlaCar Elastic Search Feedback
BlaBlaCar Elastic Search Feedbacksinfomicien
 
Htn Planning In A Tool Supported
Htn Planning In A Tool SupportedHtn Planning In A Tool Supported
Htn Planning In A Tool Supportedahmad bassiouny
 
A taste of GlobalISel
A taste of GlobalISelA taste of GlobalISel
A taste of GlobalISelIgalia
 
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using Automata
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using AutomataModeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using Automata
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using AutomataDaniel Bristot de Oliveira
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGlobalLogic Ukraine
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysislienhard
 
Computer Architecture and Organization
Computer Architecture and OrganizationComputer Architecture and Organization
Computer Architecture and Organizationssuserdfc773
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012DefCamp
 
Java 8 - functional features
Java 8 - functional featuresJava 8 - functional features
Java 8 - functional featuresRafal Rybacki
 
Dynamic PHP web-application analysis
Dynamic PHP web-application analysisDynamic PHP web-application analysis
Dynamic PHP web-application analysisax330d
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonoveurobsdcon
 
Fyber - airflow best practices in production
Fyber - airflow best practices in productionFyber - airflow best practices in production
Fyber - airflow best practices in productionItai Yaffe
 
Apache Calcite: One Frontend to Rule Them All
Apache Calcite: One Frontend to Rule Them AllApache Calcite: One Frontend to Rule Them All
Apache Calcite: One Frontend to Rule Them AllMichael Mior
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP ExtensionsMichaelBrunoLochemem
 
Making Automation Work
Making Automation WorkMaking Automation Work
Making Automation Workstrikr .
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffAdam Culp
 
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...PROIDEA
 

Similar to Shop 2 presentation slide (20)

An Htn Planning System
An Htn Planning SystemAn Htn Planning System
An Htn Planning System
 
BlaBlaCar Elastic Search Feedback
BlaBlaCar Elastic Search FeedbackBlaBlaCar Elastic Search Feedback
BlaBlaCar Elastic Search Feedback
 
Htn Planning In A Tool Supported
Htn Planning In A Tool SupportedHtn Planning In A Tool Supported
Htn Planning In A Tool Supported
 
A taste of GlobalISel
A taste of GlobalISelA taste of GlobalISel
A taste of GlobalISel
 
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using Automata
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using AutomataModeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using Automata
Modeling the Behavior of Threads in the PREEMPT_RT Linux Kernel Using Automata
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii Shapoval
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Computer Architecture and Organization
Computer Architecture and OrganizationComputer Architecture and Organization
Computer Architecture and Organization
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 
Java 8 - functional features
Java 8 - functional featuresJava 8 - functional features
Java 8 - functional features
 
Dynamic PHP web-application analysis
Dynamic PHP web-application analysisDynamic PHP web-application analysis
Dynamic PHP web-application analysis
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
 
Fyber - airflow best practices in production
Fyber - airflow best practices in productionFyber - airflow best practices in production
Fyber - airflow best practices in production
 
Apache Calcite: One Frontend to Rule Them All
Apache Calcite: One Frontend to Rule Them AllApache Calcite: One Frontend to Rule Them All
Apache Calcite: One Frontend to Rule Them All
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
 
Making Automation Work
Making Automation WorkMaking Automation Work
Making Automation Work
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
 
GooglePropsal
GooglePropsalGooglePropsal
GooglePropsal
 
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
 
Software Development with PHP & Laravel
Software Development  with PHP & LaravelSoftware Development  with PHP & Laravel
Software Development with PHP & Laravel
 

Recently uploaded

Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 

Recently uploaded (20)

Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 

Shop 2 presentation slide

  • 1. SHOP 2 Simple Hierarchical Ordered Planner 2 slides by Andrea Tucci
  • 2. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications (SHOP & SHOP 2) ● References Overview
  • 3. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ● References Overview
  • 4. Introduction Simple Hierarchical Ordered Planner 2 (SHOP 2) : ● Based on Hierarchical Task Network (HTN) ● Implemented in LISP ● Developed by D.Nau, T.Au, O.Ilghami, U.Kuter, D.Wu, and F.Yaman, H. Muñoz-Avila, J.W. Murdock in 2001; ● Award-winning at International Planning Competition (2002) for its performance
  • 5. Introduction (2) ● Steps of a plan have the same order as their execution (like SHOP). >> this speed up reasoning process ● SHOP 2 characteristics go further : ○ task and subtask can be partially ordered; ○ many PDDL features included (e.g. quantifiers, conditional effects) ○ possibilities to satisfy a method's precondition are sorted according to specifications provided by the programmer ○ others
  • 6. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ● References Overview
  • 7. Hierarchical Task Networks (HTNs) ● Produces actions to reach a (complex) task. ● Task can be decomposed in subtasks, primitive or complex ● Method : how a complex task can be decomposed ● Planner decomposes complex tasks until a primitive one is found
  • 9. Hierarchical Task Networks (HTNs) - (3) Planner : ● Choose a method for decompose a complex task into subtasks ● Repeat until a plan is found or we came out with an infeasible plan ● In the latter case, backtrack and try other implementing methods.
  • 10. Hierarchical Task Networks (HTNs) - (4) Example : (transport-two p1 p2) initial state : (package p1), (at p1 l1), (destination p1 l3), (available-truck t1), (at t1 home) (package p2), (at p2 l2), (destination p2 l4), (available-truck t2), (at t2 home)
  • 12. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ● References Overview
  • 13. Features - Basic Elements Specify a domain description that consists of a set of methods, operators and axioms. >Syntactical Note A variable is preceded by "?" symbol. A comment is preceded by ";". ● Tasks Action to be done. They can be either primitive or complex. (s t1 t2 ... tn) A primitive task is preceded by "!" symbol. ● Operators Indicates how a primitive task can be executed. (:operator h P D A [c])
  • 14. Features - Basic Elements - (2) ● Methods How to decompose a complex task. (:method h [n1] C1 T1 [n2] C2 T2 ... [nk] Ck Tk) ● Axioms Used to infer precondition that are not explicitly asserted in our current state (e.g. including quantifiers, implications etc). (:- a [name1] E1 ... [namen] En) (:- head tail) Which means that head is true if tail is true (Horn clauses).
  • 15. Features - Basic Elements 6 ● External Function Call Result is returned by a procedure, e.g numeric evaluation. ( call f t1 t2 ... tn ) where f is a function symbol
  • 16. Features - Additional ● Sorting variable bindings ● Branch and Bound Optimization ● PDDL Operator Translation ● Protected Condition and Anti-Interleaving ● Debugging Facilities
  • 17. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ● References Overview
  • 18. SHOP 2 Algorithm if t is primitive, use an instance a of an operator that matches t and has satisfied precondition in s. Apply a. if t is complex, find a method that can be applied to t and decompose it.
  • 19. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ● References Overview
  • 20. Using SHOP 2 ● SHOP 2 requires lisp ● JSHOP also available, based on Java Create a program in SHOP 2 1. Define a domain 2. Define one (or more) problems 3. run!
  • 21. Using SHOP 2 - (2) ; extremely simple example (defdomain basic ( (:operator (!pickup ?a) () () ((have ?a))) (:operator (!drop ?a) ((have ?a)) ((have ?a)) ()) (:method (swap ?x ?y) ((have ?x) (in-range ?x ?y)) ((!drop ?x) (!pickup ?y)) ((have ?y) (in-range ?x ?y)) ((!drop ?y) (!pickup ?x)))) ) ; axiom (:- (in-range ?x) yes ((position ?x ?p1) (position ?y ?p2) (max-range ?r) (call >= ?r (call - ?p2 ?p1))) ) ) (defproblem problem basic ((have phone) (max-range 20) (position phone 5) (position key 10)) ((swap phone key))) PLAN -> (!drop phone) (!pickup key)
  • 22. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications Overview ○ Video games ○ Evacuation ○ Evaluation of terrorist threats ○ Automated composition of web services ○ ...more. ● Resources
  • 24. Application - Video Games (2) ● The use of HTNs in video games arise in the last years.
  • 25. Application - Video Game (3) ● An example : Killzone 2 (Guerrilla Games, PS3 2009) ● First Person Shooter (FPS) ● Planner based on SHOP syntax ● Killzone AI structure : goal driven ● Behavior associated with the selected goal
  • 26. Application - Video Games (4) ● Killzone 2 AI : HTN-based ● High-level rules -> what to do ● Low-level rules -> how to do selected task(s) ● More flexibility ● HTN also control squads
  • 27. Application - Video Games (5) example (:method (select_weapon_and_attack_as_turret ?inp_threat) (branch_use_bullets // Only use bullets against humanoids and turrets. (and (or (threat ?inp_threat humanoid) (threat ?inp_threat turret) ) (distance_to_threat ?inp_threat ?threat_distance) (call lt ?threat_distance @weapon_bullet_max_range) ) ((attack_as_turret_using_weapon_pref ?inp_threat wp_bullets)) ) ( branch_use_rockets // Don't use rockets against humanoids and turrets. (and (not (threat ?inp_threat humanoid)) (not (threat ?inp_threat turret)) (distance_to_threat ?inp_threat ?threat_distance) (call lt ?threat_distance @weapon_rocket_max_range) ) ((attack_as_turret_using_weapon_pref ?inp_threat wp_rockets)) ) )
  • 28. Application - Video Games (6) some numbers Individual bot domain ● 360 methods ● 1048 branches ● 138 behaviors ● 147 continue branches During multiplayer game (14 bots / max. 10 turrets / max. 6 drones / squads) ● Approx. 500 plans generated per second ● Approx. 8000 decompositions per second ● Avg. 15 decompositions per planning. ● Approx 24000 branch evaluations per second.
  • 29. Application - Evacuation ● US Naval Research Laboratory’s Hierarchical Interactive Case-Based Architecture for Planning (HICAP) helps human planners to build evacuation plans. ● Generative and case-specific planning. SHOP provides the generative component. ● Interactive plan modification : human expert can modify tasks and plans interactively.
  • 30. Application - evaluating terrorist threats ● Naval Research Laboratory’s Analogical Hypothesis Elaboration for Activity Detection (AHEAD) helps to understand and evaluate terrorists threats. ● A HTN domain encode hostile activities. ● AHEAD takes a hypothesis as input and returns a model of the hostile activity.
  • 31. Application - evaluating terrorist threats ● SHOP 2 produces a plan compatible with hypothesis. ● SHOP 2 queries an external evidence database to make some tests
  • 32. Application - automated composition of web services ● Web service : a part of web that offer functionality ● The OWL-S (Web Ontology Language for Services) is a language for semantic markup of Web services ● It describes services as complex or atomic processes with preconditions and effects. ● University of Maryland has developed an algorithm to translate OWL-S process- models to SHOP 2 methods and operators.
  • 33. Application - automated composition of web services (2) ● Goal : compose web services ● User can compose them by using SHOP 2 ● Result : HTN plan that corresponds to the composite process.
  • 34. Application - others ● Fighting forest fires ● Material selection for manifacturing ● Project Planning etc Check this paper out SHOP & SHOP 2 applications
  • 35. ● Introduction ● Hierarchical Task Networks ● Features ● SHOP 2 Algorithm ● Using SHOP 2 ● Applications ○ Video games ○ Evacuation ○ Location-based services ○ Automated composition of web services ○ ...more. ● References Overview
  • 36. References ● SHOP 2 : An HTN Planning System - (D. Nau et al, 2003) ● A hierarchically-layered multiplayer bot system for a first-person shooter (Tim Verweij, 2007) ● Killzone 2 Multiplayer Bots - ( Alex Champandard, Tim Verweij, Remco Straatman, 2009) ● Application of SHOP and SHOP 2 - (D.Nau et al, 2005) ● Documentation for SHOP 2
  • 37. Thanks for your attention Andrea Tucci @andreatux