Table of Contents
To make developing an application with Mica easier a number of tools have been put together and included in the standard Mica distribution. These tools serve a variety of purposes from making agents easier to implement to enabling state of the blackboard to be examined and manipulated.
To make constructing agents a little easier two abstract
implementations of the Agent interface are available.
The first, DefaultAgent is practically empty adding
empty method bodies to many of the required methods. Any agent extending
this class will have to implement its own init and
handleNewMob methods.
The second abstract Agent implementation is
DefaultAgent2. This class provides generic implementations
of the interface functions.
DefaultAgent2's major differences to
DefaultAgent are that it includes a constructor that can be
used to ensure the agent has an AgentTransport that
can be used for synchronous communications over the blackboard (see
the section called “synchronizedWriteMob(Mob, long)”) and it maintains
a TypeManager that is kept up to date with the blackboard.
The init method of DefaultAgent2 will
connect the agent to the blackboard using a name supplied as an argument
or else using the agent's class name.