building a robocup team using jason bdi framework sean bassett, nancy ho woo, laurence smith, carlos...
TRANSCRIPT
Building a Robocup team using Jason BDI frameworkSean Bassett, Nancy Ho Woo, Laurence Smith, Carlos Valencia
Software AgentsNovember 30, 2006
Nov. 30, 2006 Slide 2
Architecture
jason
environment
Environment
asSemantics
DefaultInternalActionAgent
robojason
RoboAgent _bpDistRoboEnvironment 11
RoboCommunications1
1
11
1
1
java
uti l
Thread
Nov. 30, 2006 Slide 3
Sequence diagram
:RoboCommunications
parseServerMessage(message)
:RoboEnvironment:RoboAgent
executeAction(acTerm)
send(message)
see(message)
clearPercepts(agentName)
addPercept(agentName,literal)
:CentralizedAgArch
getPercepts(agentName)
executeAction(agentName, acTerm)
:TransitionSystem
reasoningCycle()
perceive()
act(action, feedbackActions)
Nov. 30, 2006 Slide 4
Jason’s features used for implementation
• Environment coded in java– Communication with BDI occurs only at perception/action points
• Open/closed world assumption – Closed world in implicit by not using strong negation (~) on plans
• Late option specification– Parameters are specified right at the moment of calling the action
• Internal actions written in Java– Elegant way to extend plans from within the BDI
Nov. 30, 2006 Slide 5
Modeling a player
+noBall
!findBall
!goToBall
!findGoal
!haveBall
!decide!goToPosition
+ball+flag
noBall
ball
Teammate & ball
flag
Distance<1
noGoal
bpDist < ballDist
bpDist < ballDist
Distance<1
ball
Teammate & ball
ball
ExecuteAction
Percepts
Nov. 30, 2006 Slide 6
Example of a plan
// -kickoff -8 -3// -team Canada// Forward, in front of the ball
noball./* Plans */
+noball: ball(X,Y,P,Q) & team(Tn) & player(Tn,Un,Xp,Yp,Pp,Qp) <-.print("1"); robojason._bpDist(X,Y,Xp,Yp,Re); !disDec(X,Y,Xp,Re); -ball(_,_,_,_); -
player(_,_,_,_,_,_).
+noball: ball(X,Y,P,Q) <-.print("2"); -ball(X,Y,P,Q); -noball; !gotoball(X,Y).+noball: otherside(OS) & flag(p,OS,t,Xf,Yf,Pf,Qf) & Xf>10 & (Yf>=15| Yf<=-15)<-.print("4"); turn(Yf); -flag(_,_,_,_,_,_,_).+noball: otherside(OS) & flag(p,OS,t,Xf,Yf,Pf,Qf) & Xf>10 <-.print("5"); dash(90); -flag(_,_,_,_,_,_,_).+noball: noball <-.print("3"); !findball.
+!findball: ball(X,Y,P,Q) & team(Tn) & player(Tn,Un,Xp,Yp,Pp,Qp) <-.print("6"); robojason._bpDist(X,Y,Xp,Yp,Re); !disDec(X,Y,Xp,Re); -ball(_,_,_,_); -player(_,_,_,_,_,_).
+!findball: ball(X,Y,P,Q) <-.print("7"); -ball(X,Y,P,Q); -noball; !gotoball(X,Y).+!findball: noball <-.print("8"); turn(70); -noball.+!findball: otherside(OS) & flag(p,OS,t,Xf,Yf,Pf,Qf) & Xf>10 & (Yf>=15| Yf<=-15)<-.print("a"); turn(Yf); -flag(_,_,_,_,_,_,_).+!findball: otherside(OS) & flag(p,OS,t,Xf,Yf,Pf,Qf) & Xf>10 <-.print("b"); dash(90); -flag(_,_,_,_,_,_,_).
+ball(X,Y,P,Q): X<1 <-.print("24"); -ball(_,_,_,_);!haveball.
Nov. 30, 2006 Slide 7
Defensive Strategy
Nov. 30, 2006 Slide 8
Offensive Strategy
Nov. 30, 2006 Slide 9
Jason compared to another BDI
Comparison criteria Jason Jack
Inter-agent communication approach
Speech-act based communication based on KQML querying and informational performatives
High-level primitives for communication are offered
Preciseness: Does the platform provide clear and precise semantics?
Yes. Based on AgentSpeak(L)’s formal semantics
Provides clear and precise, although not formal, semantics
Verification: Path for the formal verification of programs written in the language?
Model checking techniques have been developed by the authors
No verification techniques are provided
Nov. 30, 2006 Slide 10
Jason compared to another BDI
Comparison criteria Jason Jack
Deployment and portability: Manuals support.
Limited, as it’s an open source project with just a single manual and no formal support
Highly documented and formally supported
Extensible through open source collaboration
Open source from the beginning and offers clear cut interfaces to integrate environments
Not open source. Although it provides several “hooks” for extension.
Tools for debugging and programming?
Provides an IDE but debugging capabilities are limited
IDE and capabilities such as textual trace, graphical plan tracing and agent interaction diagrams
Nov. 30, 2006 Slide 11
References
• Bordini, R.H. & Hubner, J.F. 2006. “Jason. A java-based interpreter for an extended version of AgentSpeak”. Available online, http://jason.sourceforge.net/Jason.pdf
• Bordini, R., Hubner, J. & Vieira, R. “Jason and the golden fleece of agent-oriented programming”. 2005. In R. Bordini, M. Dastani, J. Dix & A. Seghrouchni (Eds.), Multi-agent programming. Languages, platforms and application. pages 4-39. Liverpool: Springer