110 likes | 412 Views
Building a Robocup team using Jason BDI framework Sean Bassett, Nancy Ho Woo, Laurence Smith, Carlos Valencia Software Agents November 30, 2006. Architecture. Sequence diagram. Jason’s features used for implementation. Environment coded in java
E N D
Building a Robocup team using Jason BDI frameworkSean Bassett, Nancy Ho Woo, Laurence Smith, Carlos Valencia Software AgentsNovember 30, 2006
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
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.
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