A Basic Agent

Posted by Patrick R. Jordan 10 months ago

To minimally create a TAC/AA agent, you need to extend the Agent class and implement three basic methods:
  • messageReceived
  • simulationSetup
  • simulationFinished
In addition to those three methods, you should be aware of the
  • sendMessage

method. The send / receive methods enable communication between the external agent and the server. The setup / finished methods provide notification of the start and end of a simulation. A skeletal implementation of a basic agent is provided in the following code block.

import se.sics.tasim.aw.Agent;
import se.sics.tasim.aw.Message;

public class BasicAgent extends Agent {
    protected void messageReceived(Message message) {
        // Handle messages
    }

    protected void simulationSetup() {
        // Setup your agent
    }

    protected void simulationFinished() {
        // Release your agent's resources
    }
}