Behaviours

The following examples introduce the user to the concept of agent behaviour showing the agent computational model supported by Jade. In detail, they show the use of the behaviour class hierarchy provided by the framework ( for further information, see the Jade programmer's guide ).

 

SimpleAgent
Description:
This example shows the basic usage of JADE behaviours.
More in details this agent executes a CyclicBehaviour that shows a printout at each round and a generic behaviour that performs four successive "dummy" operations. The second operation in particular involves adding a OneShotBehaviour. When the generic behaviour completes the agent terminates. .
Jade classes used:
Behaviour, CyclicBehaviour, OneShotBehaviour
Source
\src\examples\behaviours\SimpleAgent.java

 

TimeAgent
Description:
This example shows the usage of the WakerBehaviour and TickerBehaviour that allow scheduling actions at given points in time.
More in details this agent executes a TickerBehaviour that prints the agent name every second and a WakerBehaviour that kills the agent after 10 seconds. .
Jade classes used:
TickerBehaviour, WakerBehaviour
Source
\src\examples\behaviours\TimeAgent.java

 

ComplexBehaviourAgent
Description:
An agent with a behaviour made of many  steps with some steps that have sub-steps themselves. This example shows how jade.core.behaviours.SequentialBehaviour class allows the construction of aggregate behaviours starting from simple ones, even with recursive aggregations. The figure shows the nested structure of the behaviours of this example agent. Besides, it shows the cooperative multitasking presently used for intra-agent behaviour scheduling.            
Jade classes used:
SequentialBehaviour, OneShotBehaviour
Source
\src\examples\behaviours\ComplexBehaviourAgent.java

 

FSMAgent
Description:
This example shows the usage of the FSMBehavior that allows composing behaviours according to a Finite State Machine.
In this case we present an agent executing one FSMBehaviour acting as the finite state machine represented here, where each state corresponds to the execution of a simple behaviour.
Jade classes used:
FSMBehaviour, OneShotBehaviour
Source
\src\examples\behaviours\FSMAgent.java

 

 


JADE is a trademark of TILAB (formerly CSELT). 
JADE
has been developed jointly by TILAB (formerly CSELT) and the Computer Engineering Group of the University of Parma