on ability to autonomously execute agent programs with
play

On Ability to Autonomously Execute Agent Programs with Sensing - PowerPoint PPT Presentation

On Ability to Autonomously Execute Agent Programs with Sensing Sebastian Sardi na Giuseppe De Giacomo Dept. of Computer Science Dip. Informatica e Sistemistica University of Toronto Univer. di Roma La Sapienza


  1. On Ability to Autonomously Execute Agent Programs with Sensing Sebastian Sardi˜ na Giuseppe De Giacomo Dept. of Computer Science Dip. Informatica e Sistemistica University of Toronto Univer. di Roma “La Sapienza” ssardina@cs.toronto.edu degiacomo@dis.uniroma1.it Yves Lesp´ erance Hector J. Levesque Dept. of Computer Science Dept. of Computer Science York University University of Toronto lesperan@cs.yorku.ca hector@cs.toronto.edu http://www.cs.toronto.edu/ ∼ cogrobo

  2. Motivation Agent programming languages should support planning/deliberation under incomplete information with sensing actions . Need a spec. for this. Most existing formal models of deliberation are epistemic, while agent programming languages have transition system semantics. Hard to relate. Here, develop new non-epistemic formal model of deliberation. Set within situation calculus and IndiGolog. But important lessons for agent programming languages in general. 1

  3. Situation Calculus • A dialect of the predicate calculus with sorts for actions and situations • Actions: open, look, dial (14) , go ( Airport ) , check departures, ... • Situations: – S 0 the initial situation – do ( a, s ) where a is an action term and s is a situation • Fluents: predicates/functions whose value changes from situation to situation: Locked ( S 0 ) ∧ ¬ Locked ( do ( dial (2) , S 0 )) • Use a distinguished predicate Poss ( a, s ) to assert that it is possible to execute action a in situation s 2

  4. High-Level Deterministic Programs a , primitive action δ 1 ; δ 2 , sequence if φ then δ 1 else δ 2 endIf , conditional while φ do δ endWhile , while loop 3

  5. High-Level Deterministic Programs a , primitive action δ 1 ; δ 2 , sequence if φ then δ 1 else δ 2 endIf , conditional while φ do δ endWhile , while loop def = GetOnFlight Detailed go ( Airport ); check departures ; % sensing action if Parked ( Flight 123 , GateA ) then go ( GateA ); board plane ( Flight 123) else go ( GateB ); board plane ( Flight 123) endIf Without sensing, goal cannot be achieved! 3

  6. High-Level Programs and Histories A history σ = ( a 1 , µ 1 ) , ( a 2 , µ 2 ) , ..., ( a n , µ n ) describes a run with actions and their sensing results; e.g.: ( go ( Airport ) , 1) · ( check departures, 0) · ( go ( GateB ) , 1) . A configuration is a pair ( δ, σ ) with a program δ and a history σ specifying the actions performed so far and the sensing results obtained. 4

  7. High-Level Programs and Histories A history σ = ( a 1 , µ 1 ) , ( a 2 , µ 2 ) , ..., ( a n , µ n ) describes a run with actions and their sensing results; e.g.: ( go ( Airport ) , 1) · ( check departures, 0) · ( go ( GateB ) , 1) . A configuration is a pair ( δ, σ ) with a program δ and a history σ specifying the actions performed so far and the sensing results obtained. Sensed [ σ ] stands for formula specifying the sensing results of history σ , e.g.: SF ( go ( Airport ) , S 0 ) ∧ ¬ SF ( check departures, do ( go ( Airport ) , S 0 )) ∧ SF ( go ( GateB ) , do ( check departures, do ( go ( Airport ) , S 0 ))) end [ σ ] stands for the situation term of history, σ , e.g.: end [ ǫ ] = S 0 and end [( go ( Airport ) , 1)] = do ( go ( Airport ) , S 0 ) 4

  8. IndiGolog Semantics for Online Executions Two relations in the object language: Trans ( δ, s, δ ′ , s ′ ) : means that it can make transition ( δ, s ) → ( δ ′ , s ′ ) by executing a single primitive action or test. Final ( δ, s ) : means that computation can be terminated in ( δ, s ) 5

  9. IndiGolog Semantics for Online Executions Two relations in the object language: Trans ( δ, s, δ ′ , s ′ ) : means that it can make transition ( δ, s ) → ( δ ′ , s ′ ) by executing a single primitive action or test. Final ( δ, s ) : means that computation can be terminated in ( δ, s ) Semantics based on two notions (relative to an underlying theory of action D ): • Configuration ( δ, σ ) may evolve to ( δ ′ , σ ′ ) w.r.t. a model M . • A configuration ( δ, σ ) is final , i.e. may legally terminate. 5

  10. IndiGolog Semantics for Online Executions Two relations in the object language: Trans ( δ, s, δ ′ , s ′ ) : means that it can make transition ( δ, s ) → ( δ ′ , s ′ ) by executing a single primitive action or test. Final ( δ, s ) : means that computation can be terminated in ( δ, s ) Semantics based on two notions (relative to an underlying theory of action D ): • Configuration ( δ, σ ) may evolve to ( δ ′ , σ ′ ) w.r.t. a model M . • A configuration ( δ, σ ) is final , i.e. may legally terminate. The theory D , augmented with the sensing results in σ , must entail that the transition is possible. Model M above represents a possible environment (generate sensing results.) 5

  11. IndiGolog Semantics for Online Executions — Formal Details Configuration ( δ, σ ) may evolve to ( δ ′ , σ ′ ) w.r.t. a model M (relative to an underlying theory of action D ) iff (i) M is a model of D ∪ { Sensed [ σ ] } , and (ii) D ∪ T ∪ { Sensed [ σ ] } | = Trans ( δ, s, δ ′ , s ′ ) , and (iii) s ′ = do ( a, s ) and M |  σ · ( a, 1) if = SF ( a, s ) ,     σ ′ =  s ′ = do ( a, s ) and M �| σ · ( a, 0) if = SF ( a, s ) ,    s ′ = s,  if σ  where s = end [ σ ] and s ′ = end [ σ ′ ] . Configuration ( δ, σ ) is final when: D ∪ T ∪ { Sensed [ σ ] } | = Final ( δ, end [ σ ]) 6

  12. Deliberation: An EC-based Account The idea: An agent can/knows how to execute program δ in history σ iff he can always choose a next action/transition and eventually reach a terminating configuration no matter what sensing results are obtained. Agent must know that the chosen action/transition is allowed by the program and is executable. In what follows, we we will define KHow EC ( δ, σ ) using both entailment and consistency. 7

  13. Deliberation: An EC-based Account (cont.) We define KHow EC ( δ, σ ) to be the smallest relation R ( δ, σ ) such that: 8

  14. Deliberation: An EC-based Account (cont.) We define KHow EC ( δ, σ ) to be the smallest relation R ( δ, σ ) such that: (E1) if ( δ, σ ) is final , then R ( δ, σ ) ; 8

  15. Deliberation: An EC-based Account (cont.) We define KHow EC ( δ, σ ) to be the smallest relation R ( δ, σ ) such that: (E1) if ( δ, σ ) is final , then R ( δ, σ ) ; (E2) if ( δ, σ ) may evolve to configurations ( δ ′ , σ · ( a, µ i )) w.r.t. some models M i with i = 1 ..k for some k ≥ 1 , and R ( δ ′ , σ · ( a, µ i )) holds for all i = 1 ..k , then R ( δ, σ ) . Obs.: always consider the underlying theory plus the observations in history σ . 8

  16. E.g. Tree Chopping Problem Agent wants to cut down a tree. Possible actions are: • chop , take one chop at the tree, and • look , which tells the agent whether the tree has fallen (i.e., senses fluent Down ). It is known that tree will eventually fall, but number of chop s needed is not bounded. 9

  17. E.g. Tree Chopping Problem Agent wants to cut down a tree. Possible actions are: • chop , take one chop at the tree, and • look , which tells the agent whether the tree has fallen (i.e., senses fluent Down ). It is known that tree will eventually fall, but number of chop s needed is not bounded. Intuitively, the following program δ tc : while ¬ Down do chop ; look endWhile solves the problem. But . . . 9

  18. Formalizing the Tree Chopping E.g.: D tc • D ss contains the following successor state axiom: RemainingChops ( do ( a, s )) = n ≡ a = chop ∧ RemainingChops ( s ) = n + 1 ∨ a � = chop ∧ RemainingChops ( s ) = n. • D ap contains the following 2 precondition axioms: Poss ( chop, s ) ≡ ( RemainingChops ( s ) > 0) , Poss ( look, s ) ≡ True. • D sf contains the following sensing axiom: SF ( look, s ) ≡ ( RemainingChops ( s ) = 0) . • D S 0 = { RemainingChops ( S 0 ) > 0 } (initial situation). def Down ( s ) = ( RemainingChops ( s ) = 0) . 10

  19. Tree Chopping E.g. (cont.) Intuitively, the following program δ tc : while ¬ Down do chop ; look endWhile solves the problem. But . . . 11

  20. Tree Chopping E.g. (cont.) Intuitively, the following program δ tc : while ¬ Down do chop ; look endWhile solves the problem. But . . . For all k ∈ N , KHow EC ( δ tc , [( chop, 1) · ( look, 0)] k ) does not hold. Theorem 1. In particular, when k = 0 , KHow EC ( δ tc , ǫ ) does not hold. In fact, ... 11

  21. Tree Chopping E.g. (cont.) Intuitively, the following program δ tc : while ¬ Down do chop ; look endWhile solves the problem. But . . . For all k ∈ N , KHow EC ( δ tc , [( chop, 1) · ( look, 0)] k ) does not hold. Theorem 1. In particular, when k = 0 , KHow EC ( δ tc , ǫ ) does not hold. In fact, ... Theorem 2. Whenever KHow EC ( δ, σ ) holds, there is simple kind of conditional plan, a TREE program, that can be followed to execute δ in σ . which means that ... 11

  22. Tree Chopping E.g. (cont.) Intuitively, the following program δ tc : while ¬ Down do chop ; look endWhile solves the problem. But . . . For all k ∈ N , KHow EC ( δ tc , [( chop, 1) · ( look, 0)] k ) does not hold. Theorem 1. In particular, when k = 0 , KHow EC ( δ tc , ǫ ) does not hold. In fact, ... Theorem 2. Whenever KHow EC ( δ, σ ) holds, there is simple kind of conditional plan, a TREE program, that can be followed to execute δ in σ . which means that ... Corollary 1. KHow EC is only correct when problem has a bounded solution 11

Recommend


More recommend