Modelling planning problems using PDDL

Slides:



Advertisements
Similar presentations
Some Prolog Prolog is a logic programming language
Advertisements

Rule-based representation
Differentiation – Product, Quotient and Chain Rules
Russell and Norvig Chapter 7
Inference Rules Universal Instantiation Existential Generalization
Introduction to Theorem Proving
Expert Systems Reasonable Reasoning An Ad Hoc approach.
1 Rule Based Systems Introduction to Production System Architecture.
Automated Reasoning Systems For first order Predicate Logic.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Reasoning Forward and Backward Chaining Andrew Diniz da Costa
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Forward Chaining and Backward Chaining. Inference Engine cycles via a match-fire procedure Knowledge Base Database Fact:A isx MatchFire Fact:B isy Rule:
Inferences The Reasoning Power of Expert Systems.
Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution)
CS 330 Programming Languages 12 / 02 / 2008 Instructor: Michael Eckmann.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,
CS 330 Programming Languages 12 / 12 / 2006 Instructor: Michael Eckmann.
Artificial Intelligence Lecture No. 16
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
1 Pertemuan 6 RULE-BASED SYSTEMS Matakuliah: H0383/Sistem Berbasis Pengetahuan Tahun: 2005 Versi: 1/0.
1 Chapter 9 Rules and Expert Systems. 2 Chapter 9 Contents (1) l Rules for Knowledge Representation l Rule Based Production Systems l Forward Chaining.
Rules and Expert Systems
Methods of Proof Chapter 7, second half.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Knoweldge Representation & Reasoning
EXPERT SYSTEMS Part I.
Inferencing using forward- and backward-chaining.
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Methods of Proof & Proof Strategies
Artificial Intelligence
1 karel_part5_loops Iteration (Loops) Loops repeat a set of instructions Two types of loops: –Definite loops ( for ) perform instructions explicit (known)
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
INTELLIGENT SYSTEMS Rule based systems 1. Aims of session To understand  Basic principles  Forward chaining  Problems with rule-based systems  Backward.
Knowledge based Humans use heuristics a great deal in their problem solving. Of course, if the heuristic does fail, it is necessary for the problem solver.
Propositional Calculus Composed of symbols –P – some true statement P might represent something like “It is Monday” or “the car is red” And sentences –a.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
Logical Agents Logic Propositional Logic Summary
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
4.1 Proofs and Counterexamples. Even Odd Numbers Find a property that describes each of the following sets E={…, -4, -2, 0, 2, 4, 6, …} O={…, -3, -1,
Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.
Chapter 4: Inference Techniques
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Logic Programming Tarik Booker. What will we cover?  Introduction  Definitions  Predicate Calculus  Prolog  Applications.
COM362 Knowledge Engineering Exam Revision 1 John MacIntyre
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Forward and Backward Chaining
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
Aids to Formulating and Answering Key Questions NameWhen to use u Construction Methodproving “there exists” u Choose Method proving “for every” u Math.
Copyright 1999Paul F. Reynolds, Jr. Foundations of Logic Programming.
By Muhammad Safdar MCS [E-Section].  There are times in life when you are faced with challenging decisions to make. You have rules to follow and general.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
EA C461 – Artificial Intelligence Logical Agent
Forward Chaining (propositional) Recursive stack-based version of Back-chaining using Propositional Logic could be modified to handle... variables.
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Methods of Proof Chapter 7, second half.
Presentation transcript:

Modelling planning problems using PDDL EH 2750 Modelling planning problems using PDDL Arshad Saleem 06 Oct, 2014

Contents Forward and Backward chaining PDLL Modeling example in PDDL PDDL modeling exercise

Forwards and Backwards Chaining If <condition> Then <conclusion> If <condition> Then <conclusion> If <condition> Then <conclusion> If <condition> Then <conclusion> <Goal>

Forwards and Backwards Chaining If <condition> Then <conclusion> Forwards chaining Data driven Backwards chaining Goal driven

Backwards Chaining Match the goal to the conclusions of rules Set up the premises of the rules that matched as sub-goals Repeat until: all sub-goals match directly with known facts (goal is true), or Some sub-goal fail to match (goal is false) If <condition> Then <conclusion> Forwards chaining Data driven Backwards chaining Goal driven

Backwards Chaining There may be more than one rule which conclusion matches the goal (a conflict) Choose the first rule we find which matches and continue the search by trying to match its premises If this fails, we backtrack up one or more levels of rule and try again Backward chaining is usually implemented as depth-first search

Example: Backwards Chaining Production rules: 1. if a then b, 2. if (f and k) then i 3. if (b and c) then d, 4. if (d and h) then f, 5. if (k or g) then h, 6. if b then c Facts: a, k Goal: f

Example: Backwards Chaining Goal: we want to prove f rule 4 says that we can prove f if d and h can be proved Sub-goal: we want to prove d: rule 3 says that we could prove d if b and c can be proved (Sub-)sub-goal: we want to prove b: rule 1 says that we could prove b if a can be proved but a is a known fact, so we have proven b (Sub-)sub-goal: we want to prove c: rule 6 says that we could prove c if b can be proved but we just proved b so we have also proven c As we now have proved b and c, we know that d holds Sub-goal: we want to prove h: rule 5 says that we could prove h if k or g can be proved but k is a known fact, so we have proven h As we now have proved both d and h, we have proven f!

Forward-chaining Match the facts in the knowledge base to the premises of rules Apply the rules and add the conclusions as new (temporary) facts to the knowledge base Repeat until – the goal is achieved, or – no more rules fire

Example: Forwards Chaining With forward chaining, we usually make all possible derivations of new facts with each iterations, i. e. we fire all rules which apply Thus, forward chaining uses a breadth first search Example: same production rules as above 1. if a then b, 2. if (f and k) then i 3. if (b and c) then d, 4. if (d and h) then f, 5. if (k or g) then h, 6. if b then c and the same known facts: a, k

Example: Forwards Chaining Pass 0: facts a,k Pass 1: using rule 1. We conclude b facts a,b,k using rule 5. We conclude h facts a,b,h,k using rule 6. We conclude c facts a,b,c,h,k Pass 2: using rule 3. We conclude d facts a,b,c,d,h,k using rule 4. We conclude f facts a,b,c,d,f,h,k Pass 3: using rule 2. We conclude i facts a,b,c,d,f,h,I,k Production rules: 1. if a then b, 2. if (f and k) then i 3. if (b and c) then d, 4. if (d and h) then f, 5. if (k or g) then h, 6. if b then c Facts: a, k Goal: f

PDDL A modeling language for PDDL = Planning Domain Definition Language Problems modeled in this language can be executed by a software (JavaFF library in our case)

Components of PDDL Objects: Things in the world that interest us. Predicates: Properties of objects that we are interested in; can be true or false. Initial State: The state of the world that we start in. Goal specification: Things that we want to be true. Actions/Operators: Ways of changing the state of the world.

Two parts of PDDL modelling Planning tasks specified in PDDL are separated into two files A domain file for predicates and actions A problem file for objects, initial state and goal specification

Domain file

Problem file

Gripper example Gripper task with four balls: There is a robot that can move between two rooms and pick up or drop balls with either of his two arms. Initially, all balls and the robot are in the first room. We want the balls to be in the second room.

Gripper example Objects: The two rooms, four balls and two robot arms. Predicates: Is x a room? Is x a ball? Is ball x inside room y? Is robot arm x empty? [...] Initial state: All balls and the robot are in the first room. All robot arms are empty. [...] Goal specification: All balls must be in the second room. Actions/Operators: The robot can move between rooms, pick up a ball or drop a ball.

Gripper example: Objects

Gripper example: Predicates

Gripper example: Initial state

Gripper example: Goal state

Gripper example: movement action

Gripper example: pickup action

Gripper example: drop action

PDDL small exercise Let’s write PDDL for:

Questions