From: Rafael H B. <r.b...@ac...> - 2009-06-16 18:36:44
|
Hi Vin, Jomi and I discussed this, and without knowing the details of the interaction of Jason and AgentScape we can only try to guess some possible alternatives: 1. Creating a new performative as you probably know is done completely on the AgentSpeak side, but if we understand correctly you'll then need to intercept this new performative and do something different with it in the Java side. For this, what you need to do is to use a customised AgArch class for your agents, and override the sendMsg method to use the super-class method for normal messages and you handle the askAgentScape in the way you want within your sendMsg method (with Java code that gets the information from AgentScape and force the replies into the agent mailbox, for example). There are some detail about architecture customisation in the Jason book, and jason.sf.net/api will probably help too. 2. If you have created a new Infrastructure which uses AgentScape to create (and possibly distribute) agents (actually, I think someone in the Netherlands did that, but I'm not sure), then you already have methods for this and you'd need to change them to handle the new performative. 3. Another possibility might be to use internal actions (which are implemented in Java) to retrieve the info from the AgentScape side and, e.g., add them in the agent's belief base or mailbox or however you want the agent to have access to the results. Sorry if this isn't helpful, but we don't know much about AgentScape and the details of how you interfaced it with Jason. Feel free to ask further questions and send more details if you think we can help. Cheers, Rafael and Jomi Vin Baines wrote: > Hi All, > > I'm using Jason agents in combination with the AgentScape platform, > where I've got a number of agents running in agentscape acting as > 'sensors'. Jason agents are being succesfully told information by the > agentscape agents and executing plans based upon this info, but I want > to have the ability for Jason agents to query back to agentscape to > verify/assert. I've been thinking about the easiest way to do this, as > a bit of java code is going to be needed to deal with info flow > (agentscape handles & the passing of info back to jason). > > The easiest (and hopefully sensible) way I can think of doing this is > to add a new KQML performative to extend ask - e.g. askAgentScape (for > the time being - this assumes the jason agent knows to ask agentscape > rather than just ask! - but it would prove the concept). > > The implementation of jason inside agentscape currently doesn't handle > any environments, so I can't just add new java code in there to add > this extra functionality (e.g. as per room demo). > > So, two questions really. Where should this be added in? I'm thinking > extend jason with the functionality using agentscape classes, and then > use the new jason.jar into agentscape so that the asl files can use > something like askAgentScape(agName, value). > > Second question - does this sound a sensible way of going about it? > I'm keen to not go down a wrong hole for the 100th time.. > > Thanks > > Vincent > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Jason-users mailing list > Jas...@li... > https://lists.sourceforge.net/lists/listinfo/jason-users |