Ant.NET

Ant.NET is a general implementation of agent platform, that makes possible developing of distributed agent systems, a set of C# components supporting implementation of agent-based evolutionary computation systems according to EMAS model, based on .NET.

System organisation

Logical organisation of entities was achieved using aggregating classes that are supplied with the framework. Aggregate contained (or was derived from) ArrayList class that provides the possibility of adding and removing certain objects, and is dynamically extendable. Construction of the platform looks as follows (top down approach):

  • Environment - topmost component of the system, aggregates and manages Islands. Dispatches messages among the Islands. Can be run on different machines connected by the network.
  • Island - aggregates and manages the individuals. Dispatches messages among the Individuals Is able to encode and send in a message - a migrating Individual.
  • Individual - agent entity performing some tasks. It can move inside the Island and among them (agents are able to migrate).
  • Cell - individuals are contained in islands, but they can be positioned in a Cell. Cells are used to put individuals in order, they can be e.g. perceived as beings placed in Cartesian space, and Cells are used then to assign certain coordinates. Thus Cells can be used to aggregate individuals inside the Island.
  • Bridge - between Islands can be established communication links used to dispatch the messages and to transport migrating agents.
  • Customizer - universal genotype managing entity. Is used to perform operations assigned to variation operators during the process of reproduction.



Structure of the platform

It is the advantage of .NET platform, that the already written components can be base to the problem specific implementation of the components. Similar classes can be derived from proposed and their methods can be modified or completely rewritten by the programmer, who can even use even another language for implementation (e.g. Visual Basic, C++, Java, Cobol, e.a.).

Agent was implemented using simple object entity as an Individual. Individuals are autonomuous (they act when the Island give them control), they are placed in local environment, can perceive their neighbourhood and communicate with agents nearby. They can also move, reproduce (using preassigned genotype), migrate to another Island.

Agents are especially specific parts of the agent-system, and the capability of unrestricted implementation of this entity is crucial to every environment. Reusability features of .NET seem to be excellent to be used to implement any type of agent, while other features of the implemented platform (relative to the parallelisation) can be slightly tuned or used unchanged.

Parallelisation issues

Ant.NET is a distributed parallel system. Its parallelisation can be perceived from two points of view.
  • Parallelisation of Islands - Islands and Environment act parallelly, additionally they can be placed on different machines. The main problem is to afford locking of the critical resources such as message queues. Critical resources are protected using simple language-built-in mechanism - lock keyword. In the scope of this keyword, only one thread has access to the resource.
  • Parallelisation of Individuals. - in evolutionary systems usualy many individuals should exist, if reasonable results are to be obtained. In Ant.NET can usually manage a few or a dozen Islands, but it should be able to manage hundreds, or even thousands of Individuals. The individuals very frequently communicate with each other and modify their local environment - parallel controlling of such complicated system could be a nightmare. Solution came with use of event-driven algorithm for the managing of individuals. Island subsequently activates only one of its Individuals to let it perform its tasks, then the control is moved to another one.
Parallelisation was implemented from scratch with use of basic language features, such as critical resource locking. That is for sure the shortcomming of the used framework, though the implementation was not very difficult.

Information exchange

Similar to parallelisation issues, aspect of communication can be also perceived from two points of view.
  • Communication among Islands - was implemented using .NET Remoting. After obtaining URL of remote object, invoking of its methods is very simple with use of locally created ,,stub'' with use of Activator object. Using XML Serialisation agents are encoded to XML tree and can be sent from one Island to another, via the Bridge. In this way can agents migrate among the Islands.
  • Communication among Individuals - as the individuals are located inside the Island they can communicate with each other simply by invoking their methods. In more sophisticated approach, every Individual is assigned a limited reach range, so it can communicate only with its neighbours. Its current neigbourhood is available on demand from its Island.
Stubs to remote objects have to be created manually by the user, that is another shortcomming of the platform. Two remote objects have to have information, that they are not placed on the same machine.
     SourceForge.net Logo