Programming agents in Jade
Set of source codes for the course/tutorial on multi-agent programming with the JADE platform.
To run these codes, it is necessary to import the library “JadeUPHF.jar”.
This library is an update, with JAVA 17, of the last official version of [Jade]
(https://jade.tilab.com) of Tilab and add functionalities to easier the implementation of agents.
The source of this new version, the library and notes, can be accessed from here : JadeUPHF”.
The following codes need, thus, this library and Java >= 17.
NB. if you get this error in your prefered IDE while launching an example :
SEVERE: Communication failure while joining agent platform: No ICP active
The reason is that you have not closed the previous jade instance. Completely stop/close a jade run before
launching another one
Basics: Agent, Behavior, and Sending Messages
Agents without behavior or communication
- To test the installation of Jade, the classic HelloWorld
- AgentHello : code for a
simple agent displaying a message on the console
- AgentHelloParametre :
also code for a simple agent displaying a message on the console, but the message is passed as a parameter
Agents with behaviors
- Add simple behaviors to an agent, examples
- Classic example of a communication test between 2 agents: ping-pong
- pingPong: Code that launches two agents that
communicate with each other. The ping agent sends a ball to the pong agent which returns it to ping which in
turn returns it, …
- AgentPingPlouf: code for an agent that sends a
random message and waits for a response..! This will come from the white pages agent (AMS) telling him that
there is no one at the address indicated…
- Example with message filtering:
- ticTac : an agent sends messages tagged with 2
different types; an agent receives them and treats them differently according to their types.
- Use of a small graphical interface to facilitate dialogue with the user
- window : codes for agents linked to windows
- radio : codes that illustrate broadcast
communication. An agent no longer targets recipients, but a channel that other agents are listening to
- helloWorldService : Codes for agents each
linked to a window. These agents discover each other by searching for services and send each other simple messages
- serviceDetection : Some agents register to the
yellow pages (DF) for a given service; little by little.
Another agent has subscribed to (DF) to be notified when an agent registers or unsubscribes from this service.
Agents with FSM behaviors
- Agents that have behaviors organized according to a finite state machine (FSM) : fsm.
Two examples are given :
- salutations : sequences of behavior for
European greetings within an agent,
- review : process of submitting and reviewing an
article between an author agent, a journal agent and three reviewer agents
- Requests : codes for communication of
requests using the AchieveRE protocol.
- English Auction: codes
using the communication protocol ContractNet to simulate a sealed english auction (1 round).
- Vote Borda : codes illustrating
communication between agents by the ContractNet protocol for vote by Borda count.
- *(the following codes will be translated soon)*
- Vote DoubleBorda : codes illustrant la
communication entre agents par le protocole ContractNet pour un vote de Borda augmenté pour être effectué en 1 tour.
- Vote Condorcet : codes illustrant la
communication entre agents par le protocole ContractNet pour un vote de Condorcet augmenté pour être effectué en 1
- Negociation : codes à compléter
pour coder la négociation 1-1.
ISSIA 23 - Scenario
A (very) little scenario based on a true project about circular economy : here