This is the basic class that implements a behaviour of JADE that allows to embed a Jess engine inside the agent code.
Jess supports the development of rule-based expert systems.
This JADE implementation has been tested with version 6.0 of JESS.
The programmer can override this class.
In particular, its methods ACL2JessString
and
JessFact2ACL
to convert between ACLMessage JADE structure and
Jess facts. Also the method ACLJessTemplate
might need to
be overide in order to change the deftemplate of the ACLMessage in Jess.
When this behaviour is added to the list of agent behaviours, it creates a Jess engine and initializes the engine by:
(MyAgent (name nameofthisagent))
,
ACL2JessString
method that returns the fact to be
asserted in Jess,
Notice for programmers of the Jess .clp file:
(deftemplate ACLMessage
(slot communicative-act) (slot sender) (multislot receiver)
(slot reply-with) (slot in-reply-to) (slot envelope)
(slot conversation-id) (slot protocol) (slot language)
(slot ontology) (slot content) (slot encoding)
(multislot reply-to) (slot reply-by) )
(MyAgent (name nameofthisagent))
to know the name of your agent;
send
to send ACLMessages.
The parameter of send
must be a fact-id of type ACLMessage or
an ACLMessage itself; There are two styles of usage:
?m <- (ACLMessage (communicative-act cfp) (sender ?s))
(send ?m)
or, in alternative,
(send (assert (ACLMessage (communicative-act cfp)
(sender ?s))))
Look at the sample file JadeAgent.clp that is shipped with this example.
WARNING: FIPA2000 standard has specified an AgentIdentifier to have a template composed of several slots, where the only mandatory one is the agent name, i.e. the globally unique identifier of the agent (GUID). In order to reduce the porting of the JESS user code, this basic behaviour automatically takes care of replacing the GUIDs with full-fledged AgentIdentifiers.