Based on the project Jason by Jomi F. Hübner and Rafael H. Bordini a Java 9 implementation has been build-up with parallel execution calls. The version defines an additional AgentSpeak(L) grammar based on AntLR for simulating a multi-agent system with a fuzzy-based logical calculus and grammar features like lambda expressions. Agent execution based on a mathematical structure to describe an optimizing process by a finite-state-machine
The intention is set of of goals, which must exist simultaneously
Intentions cannot be in conflict with other intentions, so there dies not exists any overlaping
Desire
A Desire is a vertex of the edge of all intentions
Desires are defined by a set of beliefs
Desires can be in conflict with other desires, represented that the desires have got a large distance (much as possible)
The desire is successfully reached, iif all beliefs are existing anytime
Variable
Variables are written with an upper-case letter at begin
Thread-safe variables for parallel runtime start with @ (at-sign) followed by an upper-case letter
Variables can store a literal or string to call a rule or plan e.g. !X(3,2) calls a plan or $X(2,1) calls a rule
Action / Term Annotation
In LightJason one can specify HOW actions and terms will be executed / unified.
Concept of action-term-annotations allows to annotate actions, and terms to perform
unification (>>)
parallel execution (@), see Variables and lambda expressions.
...
If more than one action-term-annotation is needs to be added, they have to be ordered according to the rule: First HOW, then WHAT, e.g. @>> (parallel unification)
To annotate multiple actions/terms brackets (,) can be used. See the following examples
Examples
@>>( foo(X), X > 1 ) && Value > 0.5 (unify foo(X) and X > 1 in parallel and if this results in a true statement check whether Value > 0.5)
>>foo(X) && X > 1 && Value > 0.5 (unify foo(X), then test the following terms sequentially)