Planning as Logic: Why logic? - PowerPoint PPT Presentation

About This Presentation
Title:

Planning as Logic: Why logic?

Description:

Planning as Logic: Why logic? Flexible language Range of expressive power/tractability Clear semantics and syntax Good solution processes Mature (older than computer ... – PowerPoint PPT presentation

Number of Views:190
Avg rating:3.0/5.0
Slides: 15
Provided by: danw3
Category:

less

Transcript and Presenter's Notes

Title: Planning as Logic: Why logic?


1
Planning as Logic Why logic?
  • Flexible language
  • Range of expressive power/tractability
  • Clear semantics and syntax
  • Good solution processes
  • Mature (older than computer science!)
  • General purpose
  • Fast!

2
Translate/Solve/Decode Architecture
Planning problem
Compiler
Logic problem
Solver
Logical model
Decoder
Solution plan
3
Filling in the Blanks
  • What kind of logic?
  • How do we encode/decode as logical formulae?
  • What kind of solver?

4
Planning as Boolean Satisfiability
  • What kind of logic?
  • Propositional logic
  • Boolean satisfiability
  • How do we encode/decode as logical formulae?
  • Instantiate actions
  • Compile fixed length plan
  • What kind of solver?
  • Systematic depth-first search/complete
  • Stochastic randomized/incomplete

5
Translating to Propositional Logic
  • Predicate
  • Single positive literal for each instantiation of
    parameters at each time step
  • Initial state
  • Conjunction of all true literals CWA at step 0
  • Goal state
  • Conjunction of all goal literals at step n2
  • Actions
  • Instantiation of each action at each step with
    all possible combinations of parameters
  • Enforce 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
  • Initial conditions
  • (and (cleanHands0) (quiet0) (not (noGarbage0))
  • (not (dinner0)) (not (present0)))
  • Goal state
  • (and (noGarbagen2) (dinnern2) (presentn2))
  • Actions (for every odd i)
  • (implies (cooki)
  • (and
  • preconditions
  • (cleanHandsi-1)
  • effects
  • (dinneri1)))

Is this enough?
8
Frame Axioms and Exclusions
  • What about GraphPlans no-ops?
  • Frame axioms
  • An action only changes a predicate if it
    explicitly includes that predicate in its effect
    list or
  • If a variables truth value changes, some action
    must have caused that change
  • What about mutual exclusivity?
  • Serial exclusions at most one action per
    time-step
  • Parallel exclusions if actions are exclusive,
    insert a clause which keeps them from occurring
    in parallel

9
Dinner Date Logical Form Continued
  • For every odd time step i
  • (implies
  • (and (not noGarbagei-1) (noGarbagei1))
  • (or (carryi) (dollyi)))
  • For every odd time step i
  • (or
  • (not carryi)
  • (not cooki))

10
Dinner Date in CNF
  • !STEP1NOGARBAGE STEP0ACTION-CARRY
    STEP0ACTION-DOLLY
  • STEP1NOGARBAGE STEP1ACTION-CARRY
    STEP1ACTION-DOLLY
  • !STEP1DINNER STEP0ACTION-COOK
  • STEP1DINNER STEP1ACTION-COOK
  • STEP0ACTION-CARRY STEP1CLEAN-HANDS
  • STEP1CLEAN-HANDS !STEP2CLEAN-HANDS
  • STEP1ACTION-CARRY !STEP1CLEAN-HANDS
    STEP2CLEAN-HANDS
  • !STEP1PRESENT STEP0ACTION-WRAP
  • STEP1PRESENT STEP1ACTION-WRAP
  • STEP0ACTION-DOLLY STEP1QUIET
  • STEP1QUIET !STEP2QUIET
  • STEP1ACTION-DOLLY !STEP1QUIET STEP2QUIET
  • STEP1NOGARBAGE !STEP0ACTION-CARRY
  • !STEP0ACTION-CARRY !STEP1CLEAN-HANDS
  • STEP1NOGARBAGE !STEP0ACTION-DOLLY
  • !STEP0ACTION-DOLLY !STEP1QUIET
  • STEP1DINNER !STEP0ACTION-COOK
  • STEP1PRESENT !STEP0ACTION-WRAP
  • !STEP1ACTION-CARRY !STEP2CLEAN-HANDS

After initial unit propagation 26 Clauses 23
Variables
11
Satisfiability Solvers
  • Systematic
  • Complete
  • Depth first search never repeat states
  • Global
  • Systems RelSAT, Tableau, LPSAT,
  • Stochastic
  • Incomplete
  • Simulated annealing to choose next state
  • Local
  • Systems 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 SolverDPPL Algorithm
Procedure DPLL(f CNF problem) If f is satisfied,
return YES Else if f is inconsistent, return
NO Else if there is a unit clause ? or pure
literal ? in f, return DPLL(f?) Else choose a
variable ? in f. If DPLL(f?), return YES Else,
return DPLL(f??)
14
DPLL Example
r
r, ?s, ?t p, ?q q, ?p s, t ?s, ?p ?t,
?p
p, ?q q, ?p s, t ?s, ?p ?t, ?p
T
pure literal
p
T
q s, t ?s ?t
?q s, t
s
q t ?t
s, t
T
unit var
q
?
Write a Comment
User Comments (0)
About PowerShow.com