1 Planning as Logic: Why logic? zFlexible language yRange of expressive power/tractability yClear semantics and syntax zGood solution processes yMature.

Slides:



Advertisements
Similar presentations
CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
Advertisements

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Planning with Constraints Graphplan & SATplan Yongmei Shi.
Action Cook Prec: CleanHands Effects: Dinner Action Wrap Prec: Quiet Effects: Present Action Carry Prec: Effects: ~Garbage AND ~CleanHands Action Dolly.
Graph-based Planning Brian C. Williams Sept. 25 th & 30 th, J/6.834J.
For Monday Finish chapter 12 Homework: –Chapter 13, exercises 8 and 15.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
AI – Week AI Planning – Plan Generation Algorithms: GraphPlan Lee McCluskey, room 2/09
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
1 Approaches to Agent Control zAgent senses world, acts to affect world zReactive Control ySet of situation-action rules yE.g. x1) if dog-is-behind-me.
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 Logistics z1 Handout yCopies of my slides zReading yRecent Advances in AI Planning, sections 1-2.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
1 Chapter 7 Propositional Satisfiability Techniques.
1 Planning as Satisfiability Alan Fern * * Based in part on slides by Stuart Russell and Dana Nau  Review of propositional logic (see chapter 7)  Planning.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams /6.834 October 7 th, 2002.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld.
HW #1. Due Mar 22 Midnight Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
First-Order Logic and Inductive Logic Programming.
CS 5411 Compilation Approaches to AI Planning 1 José Luis Ambite* Some slides are taken from presentations by Kautz and Selman. Please visit their.
Review of Propositional Logic Syntax
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
© Daniel S. Weld 1 Logistics Problem Set 2 Due Wed A few KR problems Robocode 1.Form teams of 2 people 2.Write design document.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Graphplan.
© Daniel S. Weld 1 Logistics Travel Wed class led by Mausam Week’s reading R&N ch17 Project meetings.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Graphplan Based on slides by: Ambite, Blyth and.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Local Search Methods for SAT Geoffrey Levine March 11, 2004.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Chapter 6 Planning-Graph Techniques. 2 Motivation A big source of inefficiency in search algorithms is the branching factor  the number of children.
Inference in Propositional Logic (and Intro to SAT)
Fast Propositional Algorithms for Planning
Planning as Satisfiability
Planning as Search State Space Plan Space Algorihtm Progression
First-Order Logic and Inductive Logic Programming
Planning as Satisfiability with Blackbox
Graph-based Planning Slides based on material from: Prof. Maria Fox
Planning as Satisfiability
Logics for Data and Knowledge Representation
Chapter 6 Planning-Graph Techniques
PROPOSITIONAL LOGIC - SYNTAX-
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
Graph-based Planning Slides based on material from: Prof. Maria Fox
[* based in part on slides by Jim Blythe and Dan Weld]
Presentation transcript:

1 Planning as Logic: Why logic? zFlexible language yRange of expressive power/tractability yClear semantics and syntax zGood solution processes yMature (older than computer science!) yGeneral purpose yFast!

2 Translate/Solve/Decode Architecture Compiler Solver Decoder Planning problem Logic problem Logical model Solution plan

3 Filling in the Blanks zWhat kind of logic? zHow do we encode/decode as logical formulae? zWhat kind of solver?

4 Planning as Boolean Satisfiability zWhat kind of logic? yPropositional logic yBoolean satisfiability zHow do we encode/decode as logical formulae? yInstantiate actions yCompile fixed length plan zWhat kind of solver? ySystematic: depth-first search/complete yStochastic: randomized/incomplete

5 Translating to Propositional Logic zPredicate ySingle positive literal for each instantiation of parameters at each time step zInitial state yConjunction of all true literals + CWA at step 0 zGoal state yConjunction of all goal literals at step n*2 zActions yInstantiation of each action at each step with all possible combinations of parameters yEnforce preconditions/effects

6 Dinner Date Initial Conditions: (:and (cleanHands) (quiet)) Goal: (:and (noGarbage) (dinner) (present)) Actions: (:operator carry :precondition :effect (:and (noGarbage) (:not (cleanHands))) (:operator dolly :precondition :effect (:and (noGarbage) (:not (quiet))) (:operator cook :precondition (cleanHands) :effect (dinner)) (:operator wrap :precondition (quiet) :effect (present))

7 Dinner Date: Logical Form zInitial conditions: (:and(cleanHands 0 ) (quiet 0 ) (:not (noGarbage 0 )) (:not (dinner 0 )) (:not (present 0 ))) zGoal state: (:and(noGarbage n*2 ) (dinner n*2 ) (present n*2 )) zActions (for every odd i): (:implies(cook i ) (:and ;; preconditions (cleanHands i-1 ) ;; effects (dinner i+1 )))

8 Frame Axioms and Exclusions zWhat about GraphPlan’s no-ops? yFrame axioms xAn action only changes a predicate if it explicitly includes that predicate in its effect list or xIf a variable’s truth value changes, some action must have caused that change zWhat about mutual exclusivity? ySerial exclusions: at most one action per time-step yParallel exclusions: if actions are exclusive, insert a clause which keeps them from occurring in parallel

9 Dinner Date: Logical Form Continued zFor every odd time step i: (:implies (:and (:not noGarbage i-1 ) (noGarbage i+1 )) (:or (carry i ) (dolly i ))) zFor every odd time step i: (:or (:not carry i ) (:not cook i ))

10 Dinner Date in CNF !STEP1~NOGARBAGE STEP0~ACTION-CARRY STEP0~ACTION-DOLLY STEP1~NOGARBAGE STEP1~ACTION-CARRY STEP1~ACTION-DOLLY !STEP1~DINNER STEP0~ACTION-COOK STEP1~DINNER STEP1~ACTION-COOK STEP0~ACTION-CARRY STEP1~CLEAN-HANDS STEP1~CLEAN-HANDS !STEP2~CLEAN-HANDS STEP1~ACTION-CARRY !STEP1~CLEAN-HANDS STEP2~CLEAN-HANDS !STEP1~PRESENT STEP0~ACTION-WRAP STEP1~PRESENT STEP1~ACTION-WRAP STEP0~ACTION-DOLLY STEP1~QUIET STEP1~QUIET !STEP2~QUIET STEP1~ACTION-DOLLY !STEP1~QUIET STEP2~QUIET STEP1~NOGARBAGE !STEP0~ACTION-CARRY !STEP0~ACTION-CARRY !STEP1~CLEAN-HANDS STEP1~NOGARBAGE !STEP0~ACTION-DOLLY !STEP0~ACTION-DOLLY !STEP1~QUIET STEP1~DINNER !STEP0~ACTION-COOK STEP1~PRESENT !STEP0~ACTION-WRAP !STEP1~ACTION-CARRY !STEP2~CLEAN-HANDS !STEP1~ACTION-DOLLY !STEP2~QUIET !STEP1~ACTION-COOK STEP1~CLEAN-HANDS !STEP1~ACTION-WRAP STEP1~QUIET !STEP0~ACTION-CARRY !STEP0~ACTION-COOK !STEP1~ACTION-CARRY !STEP1~ACTION-COOK !STEP0~ACTION-DOLLY !STEP0~ACTION-WRAP !STEP1~ACTION-DOLLY !STEP1~ACTION-WRAP After initial unit propagation 26 Clauses 23 Variables

11 Satisfiability Solvers zSystematic yComplete yDepth first search: never repeat states yGlobal ySystems: RelSAT, Tableau, LPSAT, … zStochastic yIncomplete ySimulated annealing to choose next state yLocal ySystems: WalkSat, GSat,...

12 DPLL Algorithm: Definitions satisfied = CNF statement is empty inconsistent = any clause in the CNF statement is empty unit clause = any clause with exactly one literal pure literal = any literal whose negation never appears in the CNF statement

13 Systematic Solver: DPPL Algorithm Procedure DPLL(φ: CNF problem) If φ is satisfied, return YES Else if φ is inconsistent, return NO Else if there is a unit clause {  } or pure literal  in φ, return DPLL(φ|  ) Else choose a variable in φ. If DPLL(φ| ), return YES Else, return DPLL(φ|  )

14 DPLL Example r p pure literal T {r,  s,  t} {p,  q} {q,  p} {s, t} {  s,  p} {  t,  p} {p,  q} {q,  p} {s, t} {  s,  p} {  t,  p} s T q F {q} {s, t} {  s} {  t} unit var F t T {q} {t} {  t}  {q} {} {  q} {s, t} unit var F s pure literal T T {s, t}