TomAbd
An autonomous agent combining Theory of Mind and abductive reasoning.

This library provides a Jason (BDI-based) autonomous agent that combines Theory of Mind and abductive reasoning to interpret and extract information from the actions of other agents.
This package provides a Jason agent that combines Theory of Mind and abductive reasoning to interpret and extract information from the actions of other agents. The main class of this package is tomabd.agent.TomAbdAgent, since it contains the methods that implement the actual computations. Other classes in the tomabd.agent package are Jason internal actions (IAs) that provide an interface to the public methods of the tomabd.agent.TomAbdAgent class that are most likely to be invoked from the AgentSpeak code. Other IAs in the tomabd.misc package provide manipulations of AgentSpeak constructs, such as literals, logical formulas and Prolog-like rules. These are particularly handy for writing the Theory of Mind clauses with head believes(Ag, Fact). All the details on the agent architecture and functionalities can be found in the attached document.
Usage
This package should be used in multiagent systems developed using Jason or JaCaMo. The recommended way to use this package is to download a copy of the jar file and add it to the project's classpath.
In Jason (.mas2j file):
MAS myMAS {
agents: ...
environment: ...
classpath: "path/to/tomabd.jar";
}
In JaCaMo (.jcm file):
mas myMAS {
// agents configuration
...
// environment configuration
...
// organization configuration
...
// execution configuration
class-path: path/to/tomabd.jar
}
To trigger the execution of Theory of Mind and abduction from the AgentSpeak code, invoke the internal action tomabd.agent.tom_abduction_task:
+!g : c
<- ...;
tomabd.agent.tom_abduction_task(
ObserverViewpoint, // a list
ActingAgent, // an atom
Action, // an atom
ActorViewpointExplanation, // bound by the IA
ObserverViewpointExplanations, // bound by the IA
ActorAbductiveTomRule, // bound by the IA
ObserverAbductiveTomRule, // bound by the IA
ElapsedTime // bound by the IA
); ...
The decision when to invoke this IA is domain-specific and is left to the MAS developer. For example, in the Hanabi game example a custom KQML performative publicAction is used to announce the selected action. A reception of a message with this performative triggers the execution of the Theory of Mind and abduction capabilities:
!kqml_received(Sender, publicAction, Action, KQML_MsgId) : c
<- ...;
// first-order Theory of Mind -- abduction task
tomabd.agent.tom_abduction_task( [], Sender, Action, ActExpls, ObsExpls, ActTomTule, ObsTomRule ); ...
If one wishes to use the tomabd.agent.TomAbdAgent.selectAction method to select the next agent action, the IA tomabd.agent.select_action acts as an interface to this method. It is used as follows:
+!g : c
<- ...;
tomabd.agent.select_action(
Action, // bound by the IA
Priority // bound by the IA
);
(!)Action; ...
Use the ! prefix on Action if it is modelled as an achievement goal.