SlideShare a Scribd company logo
Planning in situational calculus




                                   1
Situation Calculus
• The idea behind situation calculus is that
  (reachable) states are definable in terms of
  the actions required to reach them.
• These reachable states are called situations.
  What is true in a situation can be defined in
  terms of relations with the situation as an
  argument.


                                                  2
Situation Calculus contd..
• Situation calculus is defined in terms of
  situations. A situation is either
• init, the initial situation, or
• do(A,S), the situation resulting from doing
  action A in situation S, if it is possible to do
  action A in situation S.



                                                     3
Contd..
• Situations are connected by the Result
  function
• e.g. s1= Result(a,s0) is the function giving the
  situation that results from doing action a
  while in situation s0
• Here, we represent an action sequence (plan)
  by a list [first | rest ] where


                                                     4
Contd..
• first is the initial action and rest is a list of
  remaining actions.
• PlanResult(p,s) generalizes Result to give the
  situation resulting from executing p starting
  from state s:
• ∀s PlanResult([],s) = s
• ∀s,a,p PlanResult([a | p], s) =
  PlanResult(p, Result(a,s))

                                                      5
Contd..
• Provides a framework for representing
  change, actions and reasoning about them.
• Situational calculus:
• - is based on FOPL;
• - a situation variable models new stars of the
  world;
• - action objects model activities;
• - uses inference methods developed for FOPL to
  do the reasoning.

                                               6
Planning in Situational Calculus
• Situational calculus is a dialect of first order predicate
  calculus formalization of states, actions and the effects of
  actions on states.
• Actions:- every change requires actions. The constant and
  function symbols for actions are completely dependent on
  the application. Actions typically have preconditions.
• Situations:- denote possible world histories.
   – Constant s0 and function symbol do are used, s0 denotes
      the initial situation before any action has been
      performed.
   – do(a, s) denotes the new situation that results from the
      performing action a in situation s.

                                                             7
SITUATIONAL CALCULUS
Situational calculus is based on FOPL plus:
 Special variables: s,a – objects of type situation and action

 Action functions: return actions.

     E.g., move(A, TABLE, B) represents a move action

     move(x, y, z) represents an action schema

Two special function symbols of type situation

    s0 – initial situation

    do(a,s)    – denotes the situation obtained after
    performing an action a in situation s.
Situation-dependent functions and relations

    also called fluents

    Relation: on(x, y, s) – object x is on object y in

    situation s;
    Function: above(x, s) – object that is above x in

    situation s.                                                8
Situational Calculus Example
• Shopping Problem
   – “Get a liter of milk, a bunch of bananas and a variable-
     speed cordless drill.”
• Need to define
   – Initial state
   – Operations
• A planning problem represented in situational calculus by
  logical sentences
   – initial state : For shopping problem
     at(Home,s0)  ¬have(Milk, s0)  ¬have(Banana, s0) 
     ¬have(Drill,s)

   – goal state: a logical query
     s: at(Home,s)  have(Milk,s)  have(Bananas,s)  have(Drill,s)

                                                                       9
Operators in Situational Calculus


• Operators : description of actions
 a,s: have(Milk,Result(a,s))  [(a=buy(Milk) 
  at(Supermarket,s)  (have(Milk,s)  a  drop(Milk))]
• Result’(l,s) means result from sequence of actions l
  starting in s.
  s: Result’([],s)=s
  a,p,s: Result’([a|p],s)=Result’(p,Result(a,s))




                                                   10
Solutions in Situational Calculus


• Solutions
  – solution : a plan that an agent guarantees achievement of
    the goal
  – a solution is a complete and consistent plan
  – a complete plan : every precondition of every step is
    achieved by some other step
  – a consistent plan : no contradictions in the ordering or
    binding constraints. When we meet a inconsistent plan we
    backtrack and try another branch

                                                           11
Solutions in Situational Calculus: Example


• A solution to the shopping problem is a plan P, applied to
  so, that yields a situation satisfying the goal query :
  at(Home,    Result’(p,s0))          have(Milk,Result’(p,    s0))   
  have(Bananas, result’(p, s0)  have(Drill,Result’ (p, s0))
  P = [Go(Supermarket),Buy(Bananas),Go(HardwareStore),Buy(Drill),
   Go(Home)]
• To make planning practical:
  1. Restrict the language
  2. use a special-purpose algorithm


                                                                      12

More Related Content

What's hot

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
Dr. C.V. Suresh Babu
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Learning by analogy
Learning by analogyLearning by analogy
Learning by analogy
Nitesh Singh
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.ppt
SadagopanS
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production system
Hema Kashyap
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
Harini Balamurugan
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
ahmad bassiouny
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
Archana432045
 
Production system in ai
Production system in aiProduction system in ai
Production system in ai
sabin kafle
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
Megha Sharma
 
Expert system
Expert systemExpert system
Expert system
Sayeed Far Ooqui
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
DataminingTools Inc
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
Dr. C.V. Suresh Babu
 
NP completeness
NP completenessNP completeness
NP completeness
Amrinder Arora
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
Harini Balamurugan
 
5 csp
5 csp5 csp
5 csp
Mhd Sb
 
Ch 2 State Space Search - slides part 1.pdf
Ch 2 State Space Search - slides part 1.pdfCh 2 State Space Search - slides part 1.pdf
Ch 2 State Space Search - slides part 1.pdf
KrishnaMadala1
 

What's hot (20)

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
Learning by analogy
Learning by analogyLearning by analogy
Learning by analogy
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.ppt
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production system
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Production system in ai
Production system in aiProduction system in ai
Production system in ai
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
Expert system
Expert systemExpert system
Expert system
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
NP completeness
NP completenessNP completeness
NP completeness
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
5 csp
5 csp5 csp
5 csp
 
Ch 2 State Space Search - slides part 1.pdf
Ch 2 State Space Search - slides part 1.pdfCh 2 State Space Search - slides part 1.pdf
Ch 2 State Space Search - slides part 1.pdf
 

Viewers also liked

415212 415212
415212 415212415212 415212
415212 415212
Ankush Kumar
 
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Java Security Manager Reloaded - jOpenSpace Lightning TalkJava Security Manager Reloaded - jOpenSpace Lightning Talk
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Josef Cacek
 
Java security
Java securityJava security
Java security
Ankush Kumar
 
Java Security Manager Reloaded - Devoxx 2014
Java Security Manager Reloaded - Devoxx 2014Java Security Manager Reloaded - Devoxx 2014
Java Security Manager Reloaded - Devoxx 2014
Josef Cacek
 
Security via Java
Security via JavaSecurity via Java
Security via Java
Bahaa Zaid
 
Deep dive into Java security architecture
Deep dive into Java security architectureDeep dive into Java security architecture
Deep dive into Java security architecture
Prabath Siriwardena
 
Election algorithms
Election algorithmsElection algorithms
Election algorithmsAnkush Kumar
 
Introduction to soft computing
Introduction to soft computingIntroduction to soft computing
Introduction to soft computing
Ankush Kumar
 

Viewers also liked (8)

415212 415212
415212 415212415212 415212
415212 415212
 
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Java Security Manager Reloaded - jOpenSpace Lightning TalkJava Security Manager Reloaded - jOpenSpace Lightning Talk
Java Security Manager Reloaded - jOpenSpace Lightning Talk
 
Java security
Java securityJava security
Java security
 
Java Security Manager Reloaded - Devoxx 2014
Java Security Manager Reloaded - Devoxx 2014Java Security Manager Reloaded - Devoxx 2014
Java Security Manager Reloaded - Devoxx 2014
 
Security via Java
Security via JavaSecurity via Java
Security via Java
 
Deep dive into Java security architecture
Deep dive into Java security architectureDeep dive into Java security architecture
Deep dive into Java security architecture
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
 
Introduction to soft computing
Introduction to soft computingIntroduction to soft computing
Introduction to soft computing
 

Recently uploaded

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

3. planning in situational calculas

  • 2. Situation Calculus • The idea behind situation calculus is that (reachable) states are definable in terms of the actions required to reach them. • These reachable states are called situations. What is true in a situation can be defined in terms of relations with the situation as an argument. 2
  • 3. Situation Calculus contd.. • Situation calculus is defined in terms of situations. A situation is either • init, the initial situation, or • do(A,S), the situation resulting from doing action A in situation S, if it is possible to do action A in situation S. 3
  • 4. Contd.. • Situations are connected by the Result function • e.g. s1= Result(a,s0) is the function giving the situation that results from doing action a while in situation s0 • Here, we represent an action sequence (plan) by a list [first | rest ] where 4
  • 5. Contd.. • first is the initial action and rest is a list of remaining actions. • PlanResult(p,s) generalizes Result to give the situation resulting from executing p starting from state s: • ∀s PlanResult([],s) = s • ∀s,a,p PlanResult([a | p], s) = PlanResult(p, Result(a,s)) 5
  • 6. Contd.. • Provides a framework for representing change, actions and reasoning about them. • Situational calculus: • - is based on FOPL; • - a situation variable models new stars of the world; • - action objects model activities; • - uses inference methods developed for FOPL to do the reasoning. 6
  • 7. Planning in Situational Calculus • Situational calculus is a dialect of first order predicate calculus formalization of states, actions and the effects of actions on states. • Actions:- every change requires actions. The constant and function symbols for actions are completely dependent on the application. Actions typically have preconditions. • Situations:- denote possible world histories. – Constant s0 and function symbol do are used, s0 denotes the initial situation before any action has been performed. – do(a, s) denotes the new situation that results from the performing action a in situation s. 7
  • 8. SITUATIONAL CALCULUS Situational calculus is based on FOPL plus:  Special variables: s,a – objects of type situation and action  Action functions: return actions.  E.g., move(A, TABLE, B) represents a move action  move(x, y, z) represents an action schema Two special function symbols of type situation s0 – initial situation do(a,s) – denotes the situation obtained after performing an action a in situation s. Situation-dependent functions and relations also called fluents Relation: on(x, y, s) – object x is on object y in situation s; Function: above(x, s) – object that is above x in situation s. 8
  • 9. Situational Calculus Example • Shopping Problem – “Get a liter of milk, a bunch of bananas and a variable- speed cordless drill.” • Need to define – Initial state – Operations • A planning problem represented in situational calculus by logical sentences – initial state : For shopping problem at(Home,s0)  ¬have(Milk, s0)  ¬have(Banana, s0)  ¬have(Drill,s) – goal state: a logical query s: at(Home,s)  have(Milk,s)  have(Bananas,s)  have(Drill,s) 9
  • 10. Operators in Situational Calculus • Operators : description of actions a,s: have(Milk,Result(a,s))  [(a=buy(Milk)  at(Supermarket,s)  (have(Milk,s)  a  drop(Milk))] • Result’(l,s) means result from sequence of actions l starting in s. s: Result’([],s)=s a,p,s: Result’([a|p],s)=Result’(p,Result(a,s)) 10
  • 11. Solutions in Situational Calculus • Solutions – solution : a plan that an agent guarantees achievement of the goal – a solution is a complete and consistent plan – a complete plan : every precondition of every step is achieved by some other step – a consistent plan : no contradictions in the ordering or binding constraints. When we meet a inconsistent plan we backtrack and try another branch 11
  • 12. Solutions in Situational Calculus: Example • A solution to the shopping problem is a plan P, applied to so, that yields a situation satisfying the goal query : at(Home, Result’(p,s0))  have(Milk,Result’(p, s0))  have(Bananas, result’(p, s0)  have(Drill,Result’ (p, s0)) P = [Go(Supermarket),Buy(Bananas),Go(HardwareStore),Buy(Drill), Go(Home)] • To make planning practical: 1. Restrict the language 2. use a special-purpose algorithm 12