Intention Interleaving Via Classical Replanning Mengwei Xu , Kim - - PowerPoint PPT Presentation
Intention Interleaving Via Classical Replanning Mengwei Xu , Kim - - PowerPoint PPT Presentation
Intention Interleaving Via Classical Replanning Mengwei Xu , Kim Bauters, Kevin McAreavey, Weiru Liu Extending Belief-Desire-Intention (BDI) Agents to Managing Intention Interleaving Intention Resolution: to avoid negative interference Guarantee
Extending Belief-Desire-Intention (BDI) Agents to Managing Intention Interleaving
Intention Merging: to facilitate positive interference Intention Resolution: to avoid negative interference
Guarantee the achievability of intentions when interleaving the steps in different intentions Perform one task once for at least two goals, i.e. โkill two birds with one stoneโ
Intention Resolution
Careless interleaving could result in that neither of its intention can be completed.
Motivation to Manage Intention Interleaving
Motivation to Manage Intention Interleaving
Intention Merging
TransmitSoilResults TransmitImageResults EstablishConnection SendSoilResults SendImageResults BreakConnection
execute them once for both intentions
๐ป! ๐! ๐" ๐# ๐ป" ๐$
EstablishConnection
๐!
BreakConnection
๐$
Belief-Desire-Intention: Literature
AgentSpeak [Rao, 1996] CAN [Winikoff et al., 2002] CANPLAN [Sardina et al., 2011] Jason [Bordini et al., 2007] Jack [Winikoff, 2005] Jadex [Pokahr et al., 2013]
Programming Languages Software Platforms Logics
[Cohen & Levesque, 1990] [Rao & Georgeff, 1991] [Shoham, 2009]
BDI Agent โฌ, ฮ, ฮ
Initial belief base
Belief base specifying agentโs initial beliefs
Action library
Set of STRIPS-style action descriptions
Plan library
Set of plan rules
BDI Agent โฌ, ฮ, ฮ
Belief base โฌ โ โ
Set of formulas from logical language โ โฌ must support:
- โฌ โจ ๐
(Entailment)
- โฌ โช ๐
(Addition)
- โฌ โ ๐
(Deletion) Assume โฌ is a set of atoms
Initial belief base
Belief base specifying agentโs initial beliefs
CAN: Agent โฌ, ฮ, ฮ
Action description act โถ ๐ โ โฌ# ; โฌ$
Primitive action symbol Precondition ๐ โ โ Set of โdeleteโ atoms โฌ! โ โ Set of โaddโ atoms โฌ" โ โ
Action library
Set of STRIPS-style action descriptions
BDI Agent โฌ, ฮ, ฮ
Plan rule P = ๐ป: ๐ โ โ%; โฏ ; โ&
๐ฐ๐๐๐ ๐ธ : ๐ป
e.g. new goal
๐ซ๐๐๐๐๐๐ ๐ธ : ๐ โ โ
Formula from โ
Plan library
Set of plan rules
body ๐ธ : โ!; โฏ ; โ%
e.g. a sequence of actions or goals
BDI Operational Mechanism Sketch
where ๐ โจ ฯ๐๐, ๐ โ 1, โฏ , ๐ Relevant Plans Goal ๐ป ๐ป โถ ๐! โ ๐
!
๐ป โถ ๐" โ ๐
"
๐ป โถ ๐# โ ๐
#
โฎ ๐ป โถ ๐% โ ๐
%
Applicable Plans ๐ป โถ ๐!! โ ๐
!!
๐ป โถ ๐"! โ ๐
"!
๐ป โถ ๐#! โ ๐
#!
โฎ ๐ป โถ ๐%! โ ๐
%!
โ ฮ
select select
repeat for the subgoals A tree structure representing all possible ways of achieving a goal ๐ป
Our Intention Interleaving Framework in BDI
- 1. Intention Formalisation
- Model an intention as an AND/OR graph
- Define the execution trace for multiple intentions
- Define the conflict-free and maximal-merged execution trace for multiple intentions
- 2. Intention Interleaving Planning Preparation
- Indexing nodes
- Defined terminal, initial node sets, and progression links of intentions
- Computing overlapping programs between multiple intentions
- 3. Intention Interleaving Planning Formalism
- Formalise FPP problem of interleaving intentions
- Correctness Proof
- 4. Implementation
- 5. Evaluation
AND/OR Graphs for Intentions
๐
! = ๐ป!: ๐! โ ๐!; ๐"; ๐$
๐
" = ๐ป": ๐" โ ๐!; ๐#; ๐$
OR-nodes OR-edges AND-nodes AND-edges OR-nodes
Execution Trace for An Intention
๐! ๐" = ๐ป"; ๐"; ๐#; ๐$ ๐% ๐" = ๐ป"; ๐
#; ๐#; ๐$; ๐&
Execution trace for ๐#: Execution trace for ๐
!:
๐ ๐
! = ๐ป!; ๐ !; ๐! ; ๐" ; ๐$
To identifies every unique way in which a given intention can be achieved
Execution Trace for Multiple Intentions
Potential execution trace for ๐
% and ๐H: ๐ = ๐ฏ๐; ๐ธ๐; ๐ปH; ๐H; ๐๐; ๐J ; ๐๐ ; ๐๐ ; ๐M by interleaving ๐ ๐
! = ๐ฏ๐; ๐ธ๐; ๐๐ ; ๐๐ ; ๐๐ and ๐! ๐# = ๐ป#; ๐ #; ๐$; ๐*
The construction of an execution trace of a set of intentions is to interleave elements in the execution traces of different intentions
Execution Trace for Intentions (Cont.)
Conflict-free Execution Trace:
๐ 1 ๐ 2 โฏ ๐ ๐ โ 1 ๐ ๐ ๐ ๐ + 1 โฏ ๐ ๐ โฌ! โฌ" โฌ
+,!
โฌ
+
โฌ
+-!
โฌ% where โฌ
+ is the belief base before the execution of the ๐./ element of an execution trace (i.e. ๐ ๐ )
An execution trace ๐ is conflict-free if and only if the following hold:
- 1. if ๐ ๐ = ๐ โ ฮ , then โฌ' โจ ๐๐๐๐ข๐๐ฆ๐ข(๐), i.e. the context of plan ๐ must be met before selection
- 2. if ๐ ๐ = ๐ โ ฮ, then โฌ' โจ ๐(๐), i.e. the pre-condition of action `๐โฒ must be met before selection
To model the successful interleaving which achieves all intentions
Execution Trace for Intentions (Cont.)
Mergeable Execution Trace of ๐ผ๐, โฏ , ๐ผ๐
๐ 1 ๐ 2 โฏ ๐ ๐ โฏ ๐ ๐ โฏ ๐ ๐ + 1 ๐ ๐ + ๐ โ 1 ๐ ๐ + ๐
An execution trace ๐ is a mergeable execution trace if and only if the following hold: 1. โ๐ โ 1, โฏ , ๐ such that ๐ ๐ = ๐ ๐ + 1 = โฏ ๐ ๐ + ๐ where 2 โค ๐ โค ๐ โ ๐; 2. โ๐ โ 1, โฏ , ๐ , โ๐ก, ๐ข โ ๐, โฏ , ๐ + ๐ where ๐ก โ ๐ข such that ๐ ๐ก โ ๐ ๐* โ ๐ and ๐ ๐ข โ ๐ ๐* โ ๐; 3. ๐+ is a conflict-free execution trace where ๐+ is the merged execution trace of ๐ by reducing each subsequence consisting of consecutive identical elements characterized by 1 and 2 in ๐ to only one element left.
๐ consecutive same element from all difference intentions in ๐
๐: ๐๐: ๐ 1 ๐ 2 โฏ ๐ ๐ โฏ ๐ ๐ ๐ ๐ + ๐ + 1
To capture the overlapping programs of different intentions
Execution Trace for Intentions (Cont.)
Maximal-merged Trace of ๐ผ๐, โฏ , ๐ผ๐ The merged execution trace ๐+ of a mergeable execution trace ๐ of ๐
!, โฏ , ๐ + is maximal-merged
if there is no another mergeable execution trace ๐, of ๐
!, โฏ , ๐ + such that ๐,+ < ๐+ where
๐ stands for the length of ๐.
To capture the most merged execution trace of multiple intentions
๐1 = ๐ป!; ๐
!; ๐ป"; ๐ "; ๐! ; ๐" ; ๐# ; ๐$
the potential maximal-merged trace of ๐
!, ๐"
Perform action a! and a$ once for both two goals ๐
! and ๐"
Indexing Nodes
A node ๐ is a top-level goal of intention ๐: ๐ W ๐ The nodes of actions and subgoals of intention ๐: ๐2,+,4to denote the ๐./ member of ๐๐๐๐ง(๐) in ๐ A plan node in intention ๐: ๐4 Terminal node set for a goal node: a collection of the last element of each execution trace of a goal Initial node set for intentions ๐
!, โฏ , ๐ 1 :
๐จ5 = ๐
! W
๐ , โฏ , ๐
1 W
๐ Terminal node set for intentions I = ๐
!, โฏ , ๐ 1
๐จ6 = ๐ข๐!, โฏ , ๐ข๐1 where ๐ข๐7 is a terminal node of ๐7 W ๐ ๐จ6 โณ.% ๐ฝ if ๐จ6 is a terminal node set of ๐ฝ
To ensure that e.g. the same actions in distinct plans is seen as different
Progression Links
To visualise the progression order of execution elements in the context of indexes
The progression links of execution trace ๐(๐
!)
The progression links of execution trace ๐(๐") (๐
!(W
๐) โ ๐
! 4
!)
(๐
! 4
! โ ๐!2!,!,4 !)
(๐!2!,!,4
! โ ๐"2!,",4 !)
(๐"2!,",4
! โ ๐$2!,#,4 !)
(๐"(W ๐) โ ๐
" 4
")
(๐
" 4
" โ ๐!2",!,4 ")
(๐!2",!,4
" โ ๐#2",",4 ")
(๐#2",",4
" โ ๐$2",#,4 ")
They are also called primitive progression links
Overlap Set of Multiple Intentions
The progression links of execution trace ๐(๐
!)
The progression links of execution trace ๐(๐") (๐
!(W
๐) โ ๐
! 4
!)
(๐
! 4
! โ ๐๐๐ธ๐,๐,๐ผ๐)
(๐!2!,!,4
! โ ๐"2!,",4 !)
(๐"2!,",4
! โ ๐$2!,#,4 !)
(๐"(W ๐) โ ๐
" 4
")
(๐
" 4
" โ ๐๐๐ธ๐,๐,๐ผ๐)
(๐!2",!,4
" โ ๐#2",",4 ")
(๐#2",",4
" โ ๐$2",#,4 ")
The overlap set of ๐
!, โฏ , ๐ + is a set of tuples of the form
๐๐๐ฆ-
! โ ๐๐๐ฆ. ! , โฏ , ๐๐๐ฆ- / โ ๐๐๐ฆ. /
if: 1. J ๐๐๐ฆ.
! = โฏ = J ๐๐๐ฆ. / where J ๐๐๐ฆ.
represents the actual node of the ending index ๐๐๐ฆ.
0;
2. โ๐ โ 1, โฏ , ๐ , โ๐ก, ๐ข โ ๐, โฏ , ๐ + ๐ where ๐ก โ ๐ข s.t. ๐๐๐ฆ-
1 โ ๐๐๐ฆ. 1 โ ๐ ๐* and ๐๐๐ฆ- 2 โ ๐๐๐ฆ. 2 โ ๐ ๐* ;
The overlap set of intention ๐
!, ๐% has two elements as follows:
1. ๐
! 3
& โ ๐๐๐ธ๐,๐,๐ผ๐ , (๐%
3
( โ ๐๐๐ธ๐,๐,๐ผ๐)
where J ๐!7&,!,3
& = J ๐!7(,!,3 ( = ๐!;
2. ๐%7&,%,3
& โ ๐๐๐ธ๐,๐,๐ผ๐ , (๐"7(,%,3 ( โ ๐๐๐ธ๐,๐,๐ผ๐)
where J ๐#7&,",3
& = J ๐#7(,",3 ( = ๐#
To compute all potential overlapping programs among a set of intentions
Overlap Progression Links
Let an element of overlap set of ๐
!, โฏ , ๐ + be
๐๐๐ฆ-
! โ ๐๐๐ฆ. ! , โฏ , ๐๐๐ฆ- / โ ๐๐๐ฆ. /
. The overlap set of intention ๐
!, ๐% has two elements as follows:
1. ๐
! 3
& โ ๐!7&,!,3 & , (๐%
3
( โ ๐!7(,!,3 ()
2. ๐%7&,%,3
& โ ๐#7&,",3 & , (๐"7(,%,3 ( โ ๐#7(,",3 ()
๐ฝ: = ๐๐๐ฆ-
!, โฏ , ๐๐๐ฆ- / โ ๐๐๐ฆ. !, โฏ , ๐๐๐ฆ. /
Then we have a corresponding overlap progression link
๐
! 4
!, ๐
" 4
" โ ๐!2!,!,4 !, ๐!2",!,4 "
๐"2!,",4
!, ๐#2",",4 " โ ๐$2!,#,4 !, ๐$2",#,4 "
such that the side of ๐ฝ: is ๐ก๐๐จ๐ ๐ฝ: = k โ 1, i.e. merging ๐ โ 1 extra primitive progression links. by fault, the size of a primitive progression link ๐ฝ; is ๐ก๐๐จ๐ ๐ฝ: = 0, i.e. no merging at all.
Intention Interleaving Planning Formalism
A First-principles Planning (FPP) problem of interleaving intentions ๐ฝ = ๐
!, โฏ , ๐ 1 is a tuple
ฮฉ = ฮฃ, ๐, ๐, ๐ก!, ๐"
a finite set of (propositional) atoms ๐ = โ#$%
& ๐ #(๐โจ โช ๐โง) is the set of node indexes of ๐ฝ
๐ = ๐) โช ๐* is a set of progression links where ๐) (resp. ๐*) is the collection of primitive (resp. overlap) progression links ๐ก+ = โฌ+ โช ๐จ+ is the initial state where โฌ+ is the initial belief base and ๐จ+ is the initial node set of ๐ฝ ๐, = ๐จ-|๐จ- โณ./ ๐ฝ is the goal state where ๐จ- is the terminal node set of ๐ฝ
A FPP problem of interleaving intentions ๐ฝ = ๐
!, โฏ , ๐ 1 is a tuple
ฮฉ = ฮฃ, ๐, ๐, ๐ก!, ๐"
๐ = ๐X โช ๐Y
Intention Interleaving Planning Formalism (Cont.)
๐ฝ: = ๐๐๐ฆ;
!, โฏ , ๐๐๐ฆ; < โ ๐๐๐ฆ= !, โฏ , ๐๐๐ฆ= <
โ ๐: in which ๐ฝ7
> = ๐๐๐ฆ; 7 โ ๐๐๐ฆ= 7
โ ๐>
- ๐๐ ๐ ๐ฝ: = ๐๐ ๐(๐ฝ!
>) โช โฏ โช ๐๐ ๐(๐ฝ< >)
- ๐๐๐ ๐ฝ: = ๐๐๐(๐ฝ!
>) โช โฏ โช ๐๐๐(๐ฝ< >)
- ๐๐๐ ๐ฝ: = ๐๐๐(๐ฝ!
>) โช โฏ โช ๐๐๐(๐ฝ< >)
A FPP problem of interleaving intentions ๐ฝ = ๐
!, โฏ , ๐ 1 is a tuple ฮฉ = ฮฃ, ๐, ๐, ๐ก5, ๐?
Intention Interleaving Planning Formalism (Cont.)
Definition 1: The result of applying a progression link ๐ฝ โ ๐ to a state ๐ก = โฌ โช ๐จ is described by the transition function ๐: 2@ โช 2Aร๐ โ 2@ โช 2A defined as follows: ๐ ๐ก, ๐ฝ = t(๐ก\del ๐ฝ ) โช ๐๐๐(๐ฝ) ๐๐ ๐ก โจ ๐๐ ๐(๐ฝ) ๐ฃ๐๐๐๐๐๐๐๐ ๐๐ขโ๐๐ ๐ฅ๐๐ก๐ Definition 2: The result of applying a sequence of progression links to a state specification ๐ก is defined inductively: Res(s, = ๐ก Res(s, ๐ฝ5; โฏ ; ๐ฝ% = ๐๐๐ก(๐ ๐ก, ๐ฝ5 , ๐ฝ!; โฏ ; ๐ฝ% ) Definition 3: A sequence of progression links โ= ๐ฝ5; ๐ฝ!; โฏ ; ๐ฝ% is a solution to a FPP problem ฮฉ = ฮฃ, ๐, ๐, ๐ก5, ๐? , denoted as โ= ๐ก๐๐ ฮฉ , iff Res s, โ โจ ๐?. We also say that โ is optimal if the sum of the size of the progression link ๐ก๐๐จ๐(๐ฝ7) is maximum where ๐ = 0, โฏ , ๐. Theorem: we have a maximal-merged trace ๐1 of intention ๐ฝ = ๐
!, โฏ , ๐ 1 if and only if there
exists an optimal solution ฮ to ฮฉ.
A FPP problem of interleaving intentions ๐ฝ = ๐
!, โฏ , ๐ 1 is a tuple ฮฉ = ฮฃ, ๐, ๐, ๐ก5, ๐?
Intention Interleaving Planning Formalism (Cont.)
line 5-7 instruct the procedures for failure backtracking and initial node state modification
To adapt to the dynamic environment
Implementation
Operator Files
(containing progression links)
primitive progression links:
- verlap progression links:
Fact Files
(containing initial/goal state description) declare all objects in the plan problem instance initial belief base and the top-level goals of intentions reach any terminal node
- f each intention
Planning Domain Definition Language (PDDL)
Evaluation: A Manufacturing Scenario
block 1 block 2 block 3 block 4
twisting-drilling 10cm reaming boring
Operation 1 Operation 2 Operation 3
twisting-drilling 15cm reaming boring twisting-drilling 20cm reaming boring twisting-drilling 25cm reaming boring Details can be found in my github
https://github.com/Mengwei-Xu/manufacturing-evaluation
Summary:
- 1. Formalise an intention as AND/OR graph
- 2. Formalise the conflict-free execution trace of multiple intentions
- 3. Formalise the maximal-merged execution trace of multiple intentions
- 4. Define the concept of overlapping programs between different intentions
- 5. Both formally and practically compile the intention interleaving problem into a planning problem
- 6. Provide a preliminary evaluation of a planning-centric intention interleaving problem
Future Work:
- 1. A complete algorithm of computing overlap set of intentions
- 2. Further test the costs and benefits of our approach empirically in a wider range of applications
- 3. Investigate the collaboration between multi-BDI agents, e.g. how to discover and exploit collaboration opportunities