Demo: connecting Jason agent to chat using XMPP #118
mindcrime
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sharing in the off chance somebody else might find this useful. What I did here was connect my Environment to an XMPP server so my agent (there's only one at the moment) can receive messages from a (presumably) human interlocutor over the XMPP chat protocol.
This is all in service of my interest in exploring more about natural language understanding and learning via dialogue, in the context of a BDI system.
Full source code can be found here but the salient bits are as follows:
Env.java
WorldModel.java
ChatMessageListener.java
XmppMessage.java
agent1.asl
xmpp-bdi-bot1.mas2j
Some observations:
This obviously doesn't do much at the moment. The point of this part of the example is really just about the mechanics of establishing the connection.
I'm not 100% sold that this is the correct way to go about this. Since we're in the context of a multi-agent-system environment already, and given that one could argue that humans are also agents (albeit of a very peculiar nature) it might actually make more sense to incorporate the JADE support and the messaging that's built into Jason, as opposed to using the Environment. And if this was always intended to only ever be chat based, I might well explore that. But in actuality I'm also developing hardware to run this on that includes microphones, speaker output, webcams and other sensors for getting environmental percepts. So I chose to conceptualize all human interactions as involving the environment. For now anyway. I'm open to changing my thinking on this.
Next steps will focus on parsing the received messages and trying to model them in terms of Speech Acts Theory performatives, and pursuing other ideas drawn from language semantics, etc. to convert the incoming message to beliefs that might either just sit in the belief base until needed, or might trigger events (like replying to the message at hand, or taking some other action) in response.
I'm also interested in possibly customizing the belief-base a bit. For one thing, since I want this agent to learn more or less continuously, I want a persistent belief base in case the agent system goes down for some reason. And given that my background is heavy on semantic web tech, I have at least some "mental doodles" in mind in terms of trying to store beliefs in an RDF triple-store like Jena TDB. That also gives me some reasoning/inference capabilities using OWL inference and the possibility of doing some probabilistic stuff using PR-OWL. Not yet sure how that will work out, but time will tell.
I have a notion of trying to model some additional mental states - things like "boredom", "confusion", ,"cognitive dissonance", "frustration", etc and have those factor into the behavior of the system. And maybe also "goals" in the sense of "high level life goals", as well as "principles", "values", "attitudes", etc. But that's getting way into "version 100+" stuff there. :-)
Anyway, enjoy and if anybody has any feedback or thoughts on any of this, I'd love to hear it (good or bad!)
Beta Was this translation helpful? Give feedback.
All reactions