A multi-agent system built with JADE in which autonomous agents negotiate and play two board games — Battleship and Connect 4 — against each other.
Built for the Multi-agent Systems course of my Computer Engineering degree, later cleaned up and documented.
Two independent Maven projects run as separate JADE containers:
| Project | Role |
|---|---|
agenteGrupoJuego |
Game manager. Publishes the available games, creates a board per match, tracks turns, applies the rules and declares a winner. |
jugadorBarquitos |
Player. Knows the rules of Battleship, discovers the game manager through the directory facilitator, requests a match and plays until the game is over. |
The agents do not share a hard-coded interface: they communicate through a shared ontology
(AgenteOntologiaJuegos), so new games and new player agents can be added without touching the rest
of the system. Coordination uses standard FIPA interaction protocols (request/response,
subscription, inform) over ACL messages.
Both agents expose a small Swing GUI (MainFrameBarquitos, MainFrameConecta4) that renders the
board as it is played, which makes the negotiation visible instead of hiding it in a log.
The full analysis and design documents are in the repository root:
Analisis y diseño grupo.pdf— game manager agentAnalisis y diseño jugador.pdf— player agent
Requirements: JDK 8+, Maven, and JADE (the jade.jar bundled in each project, or the
com.tilab.jade:jade Maven dependency).
# 1. Start the JADE main container
java -cp agenteGrupoJuego/jade.jar jade.Boot -gui -port 1099
# 2. Build and start the game manager
cd agenteGrupoJuego && mvn package
java -cp target/agenteGrupo-SegundaPractica.jar:jade.jar jade.Boot -container agenteGrupo:agentes.agenteGrupoJuegos
# 3. In another terminal, start the player
cd jugadorBarquitos && mvn package
java -cp target/jugadorBarquitos-SegundaPractica.jar:jade.jar jade.Boot -container jugador:agentes.agenteJugadorBarquitosOn Windows you can use the provided ejecucion.bat scripts instead.
Java · JADE · FIPA ACL · Maven · Swing
- Modelling a system as autonomous agents with goals instead of a request/response API
- Designing an ontology shared by agents that were written separately
- Making agent conversations observable through a GUI, which is what actually makes debugging possible
- Working with an agent platform (containers, DF, AMS) rather than a plain JVM process
MIT — see LICENSE. The bundled jade.jar is third-party software under its own (LGPL) license.