Title: CLAIM : A Computational Language for Autonomous, Intelligent and Mobile agents
1CLAIM A Computational Language for Autonomous,
Intelligent and Mobile agents
- Amal EL FALLAH-SEGHROUCHNI Alexandru SUNA
University of Paris 6
University of Paris 9
2Motivations
- Think and implement in the same paradigm agent
- Meet the requirements of
- distribution
- migration
3Talk Outline
- Programming distributed MAS
- Agent Oriented Languages
- Ambient Calculus
- CLAIM specifications
- Agents
- Agents Reasoning
- Example
- Implementation aspects
- SyMPA
- Mobility Protocol
- Mobility Completeness
- CLAIM Expressiveness
- Conclusion and perspectives
4Agent Oriented Languages (1)
1993, Y.Shoham agent oriented programming
languages Agent-0, Agent-K, PLACA, AgentSpeak,
VIVA, 3APL, dMars
Agents characteristics
- mental state
- beliefs
- goals (AgentSpeak, VIVA, 3APL, dMars)
- obligations (Agent-0, Agent-K, PLACA)
reasoning mechanisms
capabilities/services
Agent-0, Agent-K, PLACA, AgentSpeak
5Agent Oriented Languages (2)
Agents characteristics
communication
- agent reasoning, without communication
- 3APL, dMars
- message passing
- Agent-0, Agent-K, PLACA, AgentSpeak,VIVA
6Ambient Calculus Cardelli and Gordon, 98
- Interest improve the modeling of agents'
mobility
M capabilities x variable
n name in n enter into n
out n exit out of n open n open n
acid open from inside mv in n
move in n mv out n move out of n
P,Q processes MP ambient
(?n)P restriction 0 inactivity P
Q composition !P replication
M.P capability action (x).P input action
?M? output action
Reduction rules
7Ambient Calculus Cardelli and Gordon, 98
enter action nin m.P Q mR ? mnP
Q R
exit action mnout m.P Q R ? nP
Q mR
replication !P ? !P P
open action open n.P nQ ? P Q
other rules mv in n.P nQ ? n P Q
nmv out n.P Q ? P nQ nacid.P Q
? P Q
Communication (x).P ?M? ? P x?M
8Our CLAIM
An agent oriented programming language that
homogeneously combines
Intelligence, Autonomy and
Mobility Cognition, Interaction and
Concurrence
Agent Languages
Concurrent Languages
- goals
- knowledge
- capabilities
- reasoning
9Agent Description
defineAgent agentName parent null
agentName knowledge null knowledge
goals null goal messages null
message capabilities null
capability processes null process
agents null agentName
defineAgentClass className ... newAgent
agentName ( className )
10Agents Components
hierarchical structure Ambient-Calculus like
knowledge agentName (capabilityS,message,effect
) proposition
goal proposition
11Variables
- agentName
- capabilitySignature
- message
- goal
- effect
variable ?x , where x could be
Examples
forAllKnowledge(?Ag(cap1,?mess,?effect))
process(?Ag) ?Ag - all the agents in the
knowledge base that have the capacity
cap1 forAllAgents(?Ag className) process(?Ag)
?Ag - all the sub-agents of the current
agent that belong to the class
className
12Agents Communication
send ( receiver, message , c, t )
- agentName
- ?Ag
- all (broadcast )
- this
- ?AgclassName (multicast)
- proposition
- messages concerning the knowledge
- tell ( knowledge )
- askAllCapabilities ( agentName, agentName )
- askIfCapabiliy ( agentName,agentName,capabilityS
) - achieveCapability ( agentName,agentName,capability
S ) - removeCapability (agentName, capabilityS )
- mobility messages
13Messages concerning knowledge
A.send(B,tell(knowledge))
? the knowledge is added in the knowledge base
A.send(B,askAllCapabilities(A,B))
? B.send(A,tell(B(capabilityS,message,effect )))
A.send(B,askIfCapabiliy(A,B,capabilityS))
? B.send(A,tell(B(capabilityS,message,effect )))
A.send(B,achieveCapabiliy(A,B,capabilityS))
? the capability is performed
A.send(B,removeCapability(A,capabilityS))
? the knowledge about this capability is removed
14Mobility messages
openBy(Ag) - ask open permission openOK(Ag)
openNotOK(Ag) - the agent Ag accepts / doesnt
accept to be open wantOut(Ag) - ask exit
permission outOK(Ag) outNotOK(Ag) - the
agent Ag gives / doesnt give the
permission wantIn(Ag) - ask enter
permission inOK(Ag) inNotOK(Ag) - the agent
Ag gives / doesnt give the permission
15Capabilities
capability capabilitySignature message
null message conditions null
condition do process effects
null proposition
condition function(args)
agentName.effect ( condition )
not condition condition and
condition condition or condition
16Processes
P P.P proposition instruction funct
ionName(arguments) newAgent agentName(
agentClass ) in ( arg,agentName ) out (
arg,agentName ) moveTo( arg,agentName ) open (
agentName ) acid send ( receiver, message ,c
,t )
arg this clone process
17Agents Reasoning
Forward reasoning
- choose a messages from the queue of messages
- find the capabilities that have this activation
message - verify the conditions of the chosen capabilities
- execute the corresponding processes
Backward reasoning
- choose a goal form the goal list
- find the capabilities that allow to achieve the
goal - verify the conditions of the chosen capabilities
- ? update the goals, ask for capabilities
- execute the corresponding processes
18Example
e-commerce
Company agent
- knows the names of some Buyer agents
- can create Seller agents
Seller agent class
- can migrate
- can negotiate with Buyer agents
Buyer agent class
- can negotiate with Seller agents
forward reasoning
two solutions
backward reasoning
19Agent definitions (forward - 1)
defineAgent Company parentnull
knowledge B1(Buy,buy(),null)
B2(Buy,buy(),null)
goalsnull messagesnull
capabilities sendSeller
messagesendSeller() conditionnull do
newAgent S1(Seller).forAllKnowledge(?Ag(Buy,?mess?
eff)) send(S1,tell(?Ag(Buy,?mess,?eff))) .
send(S1,go()) effectsnull useData
messagearriveSeller(?Ag) conditionnull
do computeData() effectsnull
processes send(this,sendSeller())
agentsnull
20Agent definitions (forward - 2)
defineAgentClass Seller parentnull knowledge
null goalsnull messagesnull capabilities
goToBuyer messagego() conditionnull do
forAllKnowledge(?B(Buy,mess,?eff))
moveTo(this,?B).negotiate(?B)
.send(this,goToCompany()) effectsnull goToC
ompany message goToCompany()
conditionnull do moveTo(this,Company).send(Co
mpany,arriveSeller(this)) effectsnull
processes null agentsnull
21Run steps (forward)
Company
S1 Seller
send(this,sendSeller)
22Agent definitions (backward - 1)
defineAgent Company parentnull
knowledge null goalshaveData()
messagesnull capabilities useData
messagearriveSeller(?Ag) condition
?AgSeller.arriveToCompany() do
computeData() effectshaveData()
processes null agents S1
23Agent definitions (backward - 2)
defineAgentClass Seller parentCompany knowled
ge B1(Buy,buy(),null) B2(Buy,buy(),null)
goalsnull messagesnull capabilities goToB
uyer messagego() conditionnull do
forAllKnowledge(?B(Buy,mess,?eff))
moveTo(this,?B).negotiate(?B)
.send(this,goToCompany()) effectsendNegotiatio
n() goToCompany message goToCompany()
conditionthis.endNegotiation() do
moveTo(this,Company).send(Company,arriveSeller(thi
s)) effectsarriveToCompany() processes
null agentsnull
24Run steps (backward)
S1 Seller
Company
goalhaveData()
25SyMPA Architecture(MASIF compliant)
Agent System
Agent System
Agent
Agent
Agent
Agent
I/O
I/O
I/O
I/O
I/O
I/O
I/O
Central System
26Agent System Level
PSystem
27Agent Level
28Mobility Protocol
Central System
PSystem A
PSystem B
Agent A
Agent B
in(this,B)
29Mobility Completeness
algorithm MobilityOperation Input agent,
SMA while (not SMA.structureCondition()) do
wait(t1) if (SMA.structureCondition())
then agent.saveState() agent.suspendAllProcesses()
agent.askPermission() while (not
agent.receivePermission() ) do wait(t2) if
(agent.receivePermission()) then SMA.update() wh
ile (not SMA.endUpdating()) do wait(t3) agent.res
toreState() agent.resumeAllProcesses() end
if else agent.removeProcess(this) agent.restoreS
tate() agent.resumeAllProcesses() end else end
if
30Language Expressiveness
FIPA Contract Net Protocol
31Agents Definitions (FIPA - 1)
defineAgent Initiator parentnull knowledge
null goalsnull messagesnull capabilities
calForProposals messagecallForProposa
ls() conditionnull do send(?AgParticipant,
cfp(this) ) effectsnull
rejectProposal message propsose(?PAg) condit
ion reject() do send(?PAg,rejectProposal(thi
s)) effectsnull
32Agents Definitions (FIPA - 2)
acceptProposal message propsose(?PAg)
condition accept() do send(?PAg,acceptPro
posal(this)) effectsnull
processes send(this,callForProposals())
agentsnull
33Agents Definitions (FIPA - 3)
defineAgentClass Participant parentnull kno
wledge null goalsnull messagesnull capab
ilities refuzeCFP messagecfp(?IAg)
conditionnotAccept() do
send(?IAg,refuse(this) ) effectsnull
notUnderstood message cfp(?IAg)
conditionnotUnderstood() do
send(?IAg,notUnderstood(this) ) effectsnull
acceptCFP messagecfp(?IAg)
conditionaccept() do send(?IAg,propose(this
) ) effectsnull
34Agents Definitions (FIPA - 4)
failure message acceptProposal(?IAg)
conditionfailure() do send(?IAg,failure(th
is) ) effectsnull done
message acceptProposal(?IAg) conditiondone()
do send(?IAg,informDone(this)
) effectsnull ref message
acceptProposal(?IAg) conditionref() do
send(?IAg,informRef(this) ) effectsnull
processes null agentsnull
35Conclusion Main Contribution
CLAIM language
- Goals, Knowledge, capacities
- Backward reasoning reactive behavior
- Forward reasoning goal driven behavior
- Communication primitives
- Mobility primitives
Expressiveness
Completeness
SyMPA system
- Easy design of distributed MAS
- editing agents, interpret, agent interface
- Suitable platform for implementation
- management, creation, execution, authentication,
migration of agents - protocols for communication and mobility
36Perspectives
- Define an operational semantics of CLAIM
- Enrich the language
- add security primitives and data types
- Extend de language possibilities
- develop libraries of agents
- endow agents with learning capacities
- Improve SYMPA
- call functions/subroutines defined in other
languages - offer several mechanisms for the management of
agents and agent systems
37References
- Luca Cardelli, "Abstractions for Mobile
Computation", in Secure Internet Programming
Security Issues for Mobile and Distributed
Objects. Lecture Notes in Computer Science, Vol.
1603, Springer, pp. 51-94, 1999. - Luca Cardelli, "Mobile Ambients
Synchronisation", SRC Technical Note, 1997. - Luca Cardelli, A.D. Gordon, "Mobile Ambients",
in Foundations of Software Science and
Computational Structures, Maurice Nivat (Ed.),
Lecture Notes in Computer Science, Vol. 1378,
Springer, pp. 140-155, 1998 - Winton H E Davies, Peter Edwards, "Agent-K An
Integration of AOP and KQLM", 1994. - K.V.Hindriks, F.S.deBoer, W.van der Hoek,
J.J.Ch.Meyer, "Agent Programming in 3APL", 1999 - M. d'Inverno, D. Kinny, M. Luck, M. Wooldridge,
"A Formal Specification of dMARS", 1998.
38References
- D. Milojicic, M. Breugst, I. Busse, J. Campbell,
S. Covaci, B. Friedman, K. Kosaka, D. Lange, K.
Ono, M. Oshima, C. Tham, S. Virdhagriswaran, J.
White, "MASIF, The OMG Mobile Agent System
Interoperability Facility", 1998. - David Parks, "Agent-Oriented Programming A
Practical Evaluation", 1997. - Yoav Shoham, "Agent Oriented Programming",
Artificial Intelligence (60), pp.51-92, 1993. - Christian F. Tschudin, "Mobile Agent Security",
in Intelligent Information Agents - Agent based
information discovery and management on the
Internet, Springer, pp. 431-445, 1999. - Gerd Wagner, "VIVA Knowledge-Based Agent
Programming", 1996. - D.Weerasooriya, Anand S. Rao, K. Ramamohanarao,
"Design of a Concurrent Agent-Oriented Language",
1994.