Index: Indroduction  AEL   Simulations   Documentation   Downloads 

Agent Ecosystem Library

The AEL code can be downloaded from: downloads. Compiling and usage information is included in the README file with the code.

The AEL consists of a singleton Environment class which contains a list of user-defined Objects. The Object class is the base class for all dynamic and static objects in the environment. Its derived classes include: Fixture, a class for static obstacles (think furniture), Platform, a class that provides static platform for other objects to be placed and move on, and Agent, a class providing functions for dynamic objects which can make decisions based on their sensor input and move themselves.

To build an agent, the AEL is designed for the user to derive the agent class. The AEL gives agents the ability to move themselves via calls to one of the agent-move methods. Agents can also be equipped with a number of sensors for the Sensor class. Currently Probes are available. Probes provide tactile feedback to the agent depending if the probe tip is intersecting with another object or not. The agent class consists of a virtual make-decision function that is called every time-step. This function is used to program the decision-making process (neural networks, lookup-tables or decision trees). Agents in the AEL are basically objects that process information from their sensors and send signals to their actuators, providing a response.

The user defines all the objects including the geometry they want to include in the simulation. When the simulation is run, the AEL runs through the environment's object-list, calling all the objects' update and draw functions. AEL uses OpenGL for to visualize the simulation.

The simulation can be viewed in real-time, or frames can be exported for encoding into a movie. Movies can be downloaded from downloads.


The ecosystem the simulations uses

Ecosystem used for simulations

The environment for all the simulations consists of a total movement area of 144 (units of area). This area is broken up into 7 smaller platforms with a total area of 121 (units of area) and two large voids each with an area of 24 (units of area). Seven obstacles were placed according to: four near each corner, two near the edge on the x-axis and one in the center. Two base boxes were placed near the edge on the y-axis to provide starting locations for the agents. The environment used for simulations 2--4 is shown opposite.

The agents

A diagram of an agent

The agents used in each simulation consist of four probes, four wheels and a food actuator. The agents used in the following simulation use a decision tree for decision making. The agents' geometry is shown in the screen-shot. The two probes are used to sense other objects. The probes pass a pointer to the object it is currently intersecting with to the agent. The agent can then determine what type of object it is 'touching' from the touched object's pointer. The agent can then react accordingly. For example, if a hungry agent touches food, it can maneuver to pick up the food with its food actuator. Once the food is placed in the food actuator, the agent can 'eat' the food, gaining the food's energy. If the agent is touching an obstacle it can signal its motors accordingly and move away from the obstacle. The two other probes are invisible but are located directly under the two visible probes. They skim over the platform and are used to detect edges on the platforms, hence stopping the agent from falling off a platform.

For movement, the agents have 2 motors that it can signal. Motors' signals consist of FORWARD, LEFT and RIGHT. This simple locomotion scheme was influenced by Braitenberg's concept vehicles. The agents have a cruising velocity of 0.02 (unit lengths/time-step).

Agents have a current energy storage level and a metabolism that uses the stored energy. The energy consumption is as follows:

  • left motor - 1 energy unit/time step.
  • right motor - 1 energy unit/time step.
  • Food actuator - 1 energy unit/time step, when in use.
  • Probes - 1 energy unit/time step per probe.

The average energy consumption per agent was calculated by taking the total energy used per agent and dividing it by the total number of time-steps the simulation was run over. The reference simulation (see simulation 1) was used. It was determined to be approximately 6.3 (energy units/ time-step). Energy usage is variable, because for each time-step one or both motors might be in use, and the food actuator is sometimes in use. All four probes are always in use each time step.

Energy flags and limits placed on the agents are:

  • Maximum energy cap at 100000 (energy units).
  • Not hungry (full) flag triggered at 70% of maximum energy.
  • Starving flag triggered at 30% of maximum energy.

An agent's current energy level is displayed to the user as colour shades. If the agent is full of energy it is bright red or blue, if it is out of energy it will be black. When an agent's energy reaches zero it dies and provides no further part in the simulation other than becoming an obstacle for other living agents.

Energy sources (food)

Food is represented by green spheres with a radius of 0.05 (units of length). The food is placed randomly over the platforms. The number of food spheres placed was determined by the simulation's food density. Each food sphere is worth 30% of an agent's maximum energy. Each food sphere provides an agent with enough energy to be sustained for approximately 30000/6.3 = 4800 (time-steps), (food's energy content/(average energy use/time step)) . This high value was used because the simulations should represent foraging with low food abundance, rather than high food abundance which would correspond to a simulation of grazing. When a food sphere is consumed a replacement food sphere is spawned and placed randomly on a platform to keep the food density constant.


Index: Indroduction  AEL   Simulations   Documentation   Downloads 

Andrew R. Jones: jones@csse.monash.edu.au - last updated: Wed Nov 5 20:42:25 2003.