170 likes | 295 Vues
State Transition Systems. linear planning bounded model checking conditional planning model checking state transition description languages: PDDL – named transitions, automatic creation of frame axioms, [arithmetic] x,x’ notation- unnamed transitions, requires explicit frame axioms
E N D
State Transition Systems • linear planning bounded model checking • conditional planning model checking • state transition description languages: • PDDL – named transitions, automatic creation of frame axioms, [arithmetic] • x,x’ notation- unnamed transitions, requires explicit frame axioms • SMV – unnamed transitions (by non-deterministic assignment operator), automatic creation of frame axioms, arithmetic
Computational Considerations • Features of a problem that influence the choice of algorithm: • Size of state space • Number of transitions to a relevant state (possibly ) • Type of result required: • Can a state be reached where some property holds? • Will states where some property holds be reached infinitely often? • What is a sequence of transition labels to reach such a state? (sequential plan) • Does some property hold in every reachable state? • What is a control function (mapping from states to transition labels) that guarantees that some property holds in every reachable state? (conditional plan; policy)
Towers of Hanoi • For towers of Hanoi, the length of the solution is about the same as the number of states • 2n-1 steps and 3n states • Each state can be reached in many ways. • It can be solved by explicitly computing the entire set of states, and using some caching scheme so states are only recorded once. • E.g.: (non-symbolic) model checking;state-space linear planner with caching • This could work up to about 12 disks (312 500,000) • Graphplan / SATPLAN / bounded model checking are not well suited to towers of Hanoi, because they do not use caching.
Towers of Hanoi: Domain (define (domain hanoi) (:predicates (on ?disk1 ?disk2) (smaller ?disk1 ?disk2) (clear ?disk)) (:action MOVE :parameters (?disk ?source ?dest) :precondition (and (clear ?disk) (on ?disk ?source) (clear ?dest) (smaller ?disk ?dest)) :effect (and (on ?disk ?dest) (not (on ?disk ?source)) (not (clear ?dest)) (clear ?source))))
Problem Instance: 4 Disks (define (problem hanoi4) (:domain hanoi) (:length (:parallel 15)) (:objects D1 D2 D3 D4 P1 P2 P3) (:init (on D1 D2) (on D2 D3) (on D3 D4) (on D4 P1) (clear D1) (clear P2) (clear P3) (smaller D1 D2) (smaller D1 D3) (smaller D1 D4) (smaller D1 P1) etc. (:goal (and (on D1 D2) (on D2 D3) (on D3 D4) (on D4 P3))))
Solution Time • SAT Solver: Chaff • Solution length given as input Disks Sol Vars Clauses Time 4 15 1,847 33,709 0.48 sec 5 31 6,174 183,343 1 min 14 sec 6 63 18,528 807,178 timeout
Blocks World • Standard benchmark domain for search algorithms • Robot arm(s) can pick up blocks and stack them on other blocks • Straight stack constraint: at most one block can be on a block; any number can be on the table • Multiple arms operate synchronously in parallel
Complexity • Large state space: #blocks ! • Plan existence is trivial • NP-complete to find a solution of minimum length • Single-arm: number of actions • Multiple-arm: number of parallel steps (makespan)
State of the Art • Optimalplanning: • pre-1996: Prodigy, UCPOP, TWEAK: 5 blocks • 1996: Graphplan, Satplan: 11 blocks • Blocks world has not been included in the ICAPS planning competition to date • “It is a toy problem, BW does not have the complexity of real world planning.” • “It is too hard, real world problems do not have such complex interactions between goals.”
Blocks World in PDDL (:predicates (on ?x ?y) (on-table ?x) (clear ?x) (arm-empty ?a) (holding ?a ?x)) (:action pick-up :parameters (?a ?obj) :precondition (and (clear ?obj) (on-table ?obj) (arm-empty ?a)) :effect (and (not (on-table ?obj)) (not (clear ?obj)) (not (arm-empty ?a)) (holding ?a ?obj)))
Blocks World in PDDL (:action put-down :parameters (?a ?obj) :precondition (holding ?a ?obj) :effect (and (not (holding ?a ?obj) (clear ?ob) (arm-empty ?a) (on-table ?obj)))
Blocks World in PDDL (:action stack :parameters (?a ?obj ?underobj) :precondition (and (holding ?a ?obj) (clear ?underobj)) :effect (and (not (holding ?a ?obj)) (not (clear ?underobj)) (clear ?obj) (arm-empty ?a) (on ?obj ?underobj)))
Blocks World in PDDL (:action unstack :parameters (?a ?sob ?underobj) :precondition (and (on ?obj ?underobj) (clear ?obj) (arm-empty ?a)) :effect (and (holding ?a ?obj) (clear ?underobj) (not (clear ?obj)) (not (arm-empty ?a)) (not (on ?obj ?underobj)))))
Problems in PDDL ;;; bw-large-a ;;; ;;; Initial: 3/2/1 5/4 9/8/7/6 ;;; Goal: 1/5 8/9/4 2/3/7/6 (define (problem bw-large-a) (:domain prodigy-bw) (:objects 1 2 3 4 5 6 7 8 9 a1 a2) (:init (arm-empty a1) (arm-empty a2) (on 3 2) (on 2 1) etc
Results • Solver was not given optimal time length • Results include time to create & search all shorter plans, thus proving solution is optimal • Problem A was solved by graph search alone, thus no SAT encoding created • Planner: blackbox version 4.1 • Solver: graphplan for 20 sec, then chaff • Hardware: 1.6 GHz Pentium laptop