Date post: | 21-Dec-2015 |
Category: |
Documents |
View: | 218 times |
Download: | 2 times |
1
DALT2004
The Semantics of MALLET--An Agent Teamwork Encoding Language
Xiaocong FanSchool of Information Sciences and Technology
The Pennsylvania State University
July 19, 2004
2
DALT2004
Outline
Background on TOP Objectives of MALLET Syntax Semantics An implemented interpreter What’s the distinguishing features?
3
DALT2004
Team-Oriented Programming
Language levelTidhar: Constructs for describing team behaviors
based on mutual beliefs, joint plans and social structures
Methodology levelPynadath, et al: Mechanism (reusable team
wrapper) for supporting rapid development of agent teams
4
DALT2004
The state of art: Encoding teamwork knowledge
Atomic team operatorsTidhar’s TOP supports atomic team operators
Joint team activities: long-term process involving multiple agentsThe notion of team operator in STEAM
Shared team plans: common recipes that govern the collaboration behaviorsGRATE* has a higher-level language supportRETSINA uses the concept of shared plans, but no
encoding language JACK Teams uses Java
5
DALT2004
The state of art: Dynamic task assignment
Role-capability matchingSTEAM, JACK Teams
Constraints reasoningRETSINA
NO language-level support for specifying task-allocations within team plans
6
DALT2004
The state of art: Complex teamwork process
GRATE*, JACK Teams, and TOP provided control constructs for coding complex team behaviorsPar, while, if, etc.
However, none of the existing approaches support the coding of decision points in a team plan
7
DALT2004
Types of information needs
Action-performing information-needDecision-making information-needGoal-protection information-needGoal-escape information-need
8
DALT2004
Objectives of MALLET
A language suitable for encoding agent teamwork knowledge, especially for composing complex teamwork behaviors Expressivity: three-level support, choice points Understandability: high-level Reusability: representation be independent of the context in which
the knowledge is used Encourage inferred team intelligence
support the specification of collaboration constraints, such as action preconditions and plan termination conditions
Allow the specification of adaptive team structure and team process
9
DALT2004
SyntaxCompilationUnit
::= ( AgentDef | TeamDef | MemberOf | GoalDef | Start | CapabilityDef | RoleDef | PlaysRole | FulfilledBy | IOperDef | TOperDef | PlanDef | RuleDecl)*
AgentDef ::= "(" <AGENT> AgentName ")"
TeamDef ::= "(" <TEAM> TeamName ( "(" ( AgentName )+ ")" )? ")"
MemberOf ::= "(" <MEMBEROF> AgentName ( TeamName | "(" ( TeamName )+ ")" ) ")"
GoalDef ::= "(" <GOAL> AgentOrTeamName ( Cond )+ ")"
Start ::= "(" <START> AgentOrTeamName Invocation ")"
CapabilityDef ::= "(" <CAPABILITY> ( AgentName | "(" ( AgentName )+ ")" ) ( Invocation | "(" ( Invocation )+ ")" ) ")"
RoleDef ::= "(" <ROLE> RoleName ( Invocation | "(" ( Invocation )+ ")" ) ")"
PlaysRole ::= "(" <PLAYSROLE> AgentName ( RoleName | "(" ( RoleName )+ ")" ) ")"
FulfilledBy ::= "(" <FULFILLEDBY> RoleName ( AgentName | "(" ( AgentName )+ ")" ) ")"
IOperDef ::= "(" <IOPER> OperName “(” (<Variable>)* “)” ( PreConditionList )* (EffectsList )? ")"
TOperDef ::= "(" <TOPER> OperName “(” (<Variable>)* “)” ( PreConditionList )* ( EffectsList )? ( NumSpec )? ")"
PlanDef ::= "(" <PLAN> PlanName “(” (<Variable>)* “)” ( PreConditionList | EffectsList | TermConditionList )* "(" <PROCESS> MalletProcess ")" ")"
RuleDecl ::= "(" ( Pred )+ ")"
Cond ::= Pred | "(" <NOT> Cond ")"
Pred ::= "(" <IDENTIFIER> ( <IDENTIFIER> | <VARIABLE>)* ")"
Invocation ::= "(" PlanOrOperName ( <IDENTIFIER> | <VARIABLE> )* ")"
10
DALT2004
SyntaxPreConditionList ::= "(" <PRECOND> ( Cond )+ ( ":IF-FALSE" ( <FAIL> | <WAIT> ( ( <DIGIT> )+ )? | <ACHIEVE> ) )? ")"
EffectsList ::= "(" <EFFECTS> ( Cond )+ ")"
TermConditionList ::= "(" <TERMCOND> ( <SUCCESS> | <FAILURE> )? ( Cond )+ ")"
NumSpec ::= "(" <NUM> ( <EQ> | <LT> | <GT> | <LE> | <GE> ) ( <DIGIT > )+ ")"
PrefCondList ::= "(" <PREFCOND> ( Cond )+ ( ":IF-FALSE" ( <FAIL> | <WAIT> ( ( <DIGIT> )+ )? | <ACHIEVE> ) )? ")"
Priority ::= "("<PRIORITY> ( <DIGIT> )+ ") "
ByWhom ::= AgentOrTeamName | <VARIABLE> | MixedList
MixedList ::= "(" ( <IDENTIFIER> | <VARIABLE> )+ ")"
Branch ::= "(" (PrefConditionsList )? (Priority)? "(" <DO> ByWhomSpec Invocation ")" ")"
MalletProcess ::= Invocation
| "(" <DO> ByWhomSpec MalletProcess ")"
| "(" <AGENTBIND> VariableList "(" <CONSTRAINTS> ( Cond )+ ")" ")"
| "(" <JOINTDO> ( <AND> | <OR> | <XOR> )? ( "(" ByWhomSpec MalletProcess ")" )+ ")"
| "(" <SEQ> ( MalletProcess )+ ")"
| "(" <PAR> ( MalletProcess )+ ")"
| "(" <IF> "(" <COND> ( Cond )+ ")" MalletProcess ( MalletProcess )? ")"
| "(" <WHILE> "(" <COND> ( Cond )+ ")" MalletProcess ")"
| "(" <FOREACH> "(" <COND> ( Cond )+ ")" MalletProcess ")"
| "(" <FORALL> "(" <COND> ( Cond )+ ")" MalletProcess ")"
| "(" <CHOICE> ( Branch)+ ")"
11
DALT2004
Preparations—Control messages A control message is a tuple < type, aid, gid, pid,olist >,
type {sync, ctell, cask, unachievable}, aid is the sending agent, gid is a well-formed first-order formula, denoting a goal. pid is a plan id, olist is a list of extra parameters varying from message type to message type.
A message of type sync is used to synchronize with a recipient with respect to the committed goal gid and current activity pid;
A message of type ctell is used to tell a recipient about the status of pid; A message of type cask is used to request a recipient to perform pid; A message of type unachievable is used to inform a recipient of the unachievability of pid.
MALLET has a built-in domain-independent operator send (receivers, msg) Assume pre(send)=true, and the execution of send always succeeds. If <typ,a, …> is a control message, the effect of send (b,<typ,a,…>) will assert
(typ\ a …>) as a fact into agent a's belief base. The recipient of a control message will also assert an appropriate fact into its belief
base. For instance, when agent b receives message <sync, a, g, p>, predicate (sync a g p)
will be asserted into b's belief base.
12
DALT2004
Preparations—Goals and Intentions
A goal g is a pair <,A>.
An intention slice is of form (,A) s.
An intention is : [0\...\ k],
where i (0 i k) is of form (i,Ai) si.
The empty intention is denoted by T.If h =[0\...\ k], [h\ '] = [0\...\ k\'].
13
DALT2004
Preparations—Configuration
Def. 1 (MALLET configuration): A MALLET configuration of an agent is a tuple < B, G, H, >, where (1) B is consistent,(2) for any goal gG, g is not derivable from B and g is consistent
by itself.
Def. 2 (achievement goal):Function agls is defined recursively as:
agls(T) = {}, for any intention h=[0\...\ k-1\ (k, Ak) sk],
agls(h) = {k} agls([0\...\ k-1]).
14
DALT2004
Preparations—Assumptions
A belief update function BU(B,p), which revises the belief base B with a new fact p.
Two domain-independent operators working on B: unsync(,), and untell(,s). Their effects are to remove all the predicates that can be unified with
sync(?a, ,) and ctell(?a, ,s,?id),
respectively, from B. B allows explicit negation. For any b(t), its explicit negation is
denoted by The execution of atomic operators always succeeds
( )b t
15
DALT2004
Semantics—beliefs, goals, intentions
Def. 3 :
Given a Mallet configuration M= <B, G, H, >, for any wff , any belief or goal formula ,’, any agent a,
16
DALT2004
Semantics—termination of plans
The execution of a plan invocation is terminated (i.e., isTermed() is derivable from the current configuration), iff: On plan entering, the plan precondition does not hold, In plan execution, the termination conditions become true, On plan completion, the expected postcondition is not true.
Note: When isTermed ) is evaluated as true, a predicate of form (termed t) will be asserted into B, so that in later transitions the termination can be propagated upwards to a higher plan level.