Knowledge-based programs as plans
Jérôme Lang (LAMSADE, Paris) & Bruno Zanuttini (GREYC, Caen)
ECAI-2012 + TARK 2013
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 1/35
Knowledge-based programs as plans Jrme Lang (LAMSADE, Paris) & - - PowerPoint PPT Presentation
Knowledge-based programs as plans Jrme Lang (LAMSADE, Paris) & Bruno Zanuttini (GREYC, Caen) ECAI-2012 + TARK 2013 Jrme Lang, Bruno Zanuttini Knowledge-based plans 1/35 A card game program Goal : pick some cards, maximum 5
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 1/35
◮ pick some cards, maximum 5 ◮ try to obtain three cards of the same rank
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 2/35
◮ three components 1,2,3 ; ◮ propositional symbol oki : component i is in working order ; ◮ action repair(i) : makes oki true ; ◮ action test(i) : returns the truth value of oki ; ◮ initial knowledge state : K((ok1 ↔ (ok2 ∧ ok3)) ∧ (¬ok1 ∨ ¬ok3)) ; ◮ Goal : to have the three components working without replacing more
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 3/35
◮ introduced by Fagin, Halpern, Moses and Vardi [1995] ◮ studied for behaviour specification in distributed environments
◮ using knowledge-based programs as (single-agent) plans reaching
◮ LOFT-12 / ECAI-12 : expressivity and complexity of plan verification ◮ TARK-13 : comparing the succinctness of KBPs to that of standard
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 4/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 5/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 6/35
◮ set of propositional variables X = {x1, . . . , xn}
◮ Queen(c1), ok1 . . . ◮ state = truth assignment (unobservable)
◮ set of actions
◮ action, or ◮ sequence π1; π2; . . . ; πn, or ◮ branching If Φ then π1 else π2, where Φ is a purely subjective S5
◮ loop While Φ do π1, where Φ is a purely subjective S5 formula.
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 7/35
◮ changes the state of the world ◮ possibly nondeterministic + no feedback ◮ propositional symbol x → {x, x′} ;
◮ x before the action is performed ◮ x′ after the action is performed
◮ switch(xi) : Σ = (x′ i ↔ ¬xi) ∧ j=i(x′ j ↔ xj) ◮ xi ← 0 : Σ = (¬x′ i ) ◮ reinit(xi) : Σ = j=i(x′ j ↔ xj)
◮ does not change the state of the world ◮ sends back one of several possible observations ◮ test(xi ∨ xj) : observe xi ∨ xj or observe ¬(xi ∨ xj) ◮ ask-how-much-time-left : observe (t = 15mn) or observe (t = 10mn)
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 8/35
◮ current state of variables st
◮ s0 = x1x2¯
x3
◮ current knowledge state Mt
◮ Mt = {x1x2x3, x1¯
x2x3, x1x2¯ x3}
◮ succinct representation O(x1 ∧ (x2 ∨ x3)) : all I know is x1 ∧ (x2 ∨ x3).
◮ branching condition / loop : evaluated in Mt ◮ ontic action : nondeterministic modification of st ◮ epistemic action :
◮ no modification of st ◮ reception of an observation ω Jérôme Lang, Bruno Zanuttini Knowledge-based plans 9/35
◮ Mt = {x1x2x3, ¯
◮ progression of Mt by switch(x1) :
◮ progression of Mt+1 by reinit(x1) :
◮ action test(x1 ∧ x2), observation ¬(x1 ∧ x2) : ◮ progression of Mt+2 by observation ¬(x1 ∧ x2) :
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 10/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 11/35
◮ Set of initial states and goal states (described succinctly) ◮ Set of actions whose effects are described succinctly ◮ Output : standard plan (policy) :
◮ tree or DAG containing observations/actions ◮ branching on current state and observations Jérôme Lang, Bruno Zanuttini Knowledge-based plans 12/35
◮ initial knowledge state initial M0 :
◮ possibly O⊤ ◮ must contain the true initial state
◮ goal G (purely subjective epistemic formula) ◮ π valid plan if
◮ terminates ◮ for every possible sequence of states s0 ∈ M0 . . . sfinal ∈ Mfinal
we have Mfinal | = G
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 13/35
◮ initial knowledge state : O((ok1 ↔ (ok2 ∧ ok3)) ∧ (¬ok1 ∨ ¬ok3)) ◮ goal knowledge state : K(ok1 ∧ ok2 ∧ ok3) ◮ actions : test(i), repair(i) for i = 1, 2, 3
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 14/35
◮ A standard policy is a KBP in which the last action executed before
◮ For every KBP π there exists a standard policy π′ “equivalent” to π
◮ there exists a valid knowledge-based for a planning problem P iff
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 15/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 16/35
◮ standard policy :
◮ move to the subtree corresponding to the observation and execute the
next action
◮ constant time
◮ knowledge-based plan :
◮ branching / loop condition : decide Mt |
= Φ
◮ NP-hard and coNP-hard, in ∆2P Jérôme Lang, Bruno Zanuttini Knowledge-based plans 17/35
◮ for each n ∈ N we build a polysize KBP πn that “reads” a CNF
◮ if there is a family of standard policies π′ n for every n, of size
n, then there is a (possibly
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 18/35
◮ there is a polynomial pol and a collection of KBPs (πn)n such that
◮ we build a family of planning problems (Pn)n such that the only valid
◮ assume that for all n there is a standard policy π′ n for Pn and
n| ≤ pol(n)| ; then π′ n can manipulate only pol(n) variables, and can
n| configurations (states + control points) ; then it
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 19/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 20/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 21/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 22/35
◮ Π2P-complete (Π2P = coNPNP) ◮ remains Π2P-complete with each of the following
◮ ontic actions only ◮ epistemic actions only
◮ standard plan verification : coNP-complete
◮ EXPSPACE-complete ◮ remains EXPSPACE-complete even if we know that π
◮ standard plan verification : PSPACE-complete
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 23/35
◮ Π2P-complete (Π2P = coNPNP) ◮ hardness proof easy ◮ membership proof based on the following nondeterministic algorithm
◮ guess a sequence of observations ◮ at each step with a branching condition Φ, evaluate Φ [Needs a
polynomial number of NP oracles]
◮ check that the goal is not satisfied at the end of the execution Jérôme Lang, Bruno Zanuttini Knowledge-based plans 24/35
◮ EXPSPACE-complete ◮ key point : a loop can be executed up to 22n − 2 times (visit all
◮ membership easy ◮ hardness by reduction from nondeterministic unobservable
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 25/35
◮ verifying a KBP with loops is EXPSPACE-complete ; ◮ verifying a while-free KBP is Πp 2-complete ; ◮ Πp 2 ⊆ PSPACE ⊂ EXPSPACE (strict inclusion, Savitch’s theorem)
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 26/35
3-complete
2-complete
2-complete
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 27/35
3-complete
2-complete
2-complete
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 28/35
3-complete
2-complete
2-complete ◮ membership : guess π of size ≤ k and verify it ; plan verification
◮ hardness : reduction from plan verification. Build a planning
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 29/35
3-complete
2-complete
2-complete ◮ membership : guess π and verify it ; plan verification is in Πp 2. ◮ hardness : reduction from qbf3, ∃.
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 30/35
3-complete
2-complete
2-complete ◮ branching is not necessary because we never get any feedback ; the
2-complete.
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 31/35
3-complete
2-complete
2-complete ◮ membership : because an epistemic action needs to be executed at
◮ hardness : reduction from qbf.
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 32/35
3-complete
2-complete
2-complete ◮ membership, unbounded : performing an epistemic action cannot
◮ membership, bounded : guess a set of k epistemic actions and
◮ hardness : reductions from unsat and qbf2, ∃.
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 33/35
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 34/35
◮ Generate knowledge-based programs using tools from planning and
◮ multiple agents :
◮ verify/generate a plan for one agent in interaction with other agents ◮ mutual and common knowledge, strategic interactions
◮ probabilistic belief-based programs :
Jérôme Lang, Bruno Zanuttini Knowledge-based plans 35/35