ALGAE

Programmierpraktikum II SS 2000

Clemens Bauer cbauer@cosy.sbg.ac.at Peter Eisenmann peisen@cosy.sbg.ac.at Thomas Frommwald tfromm@cosy.sbg.ac.at

Daniel Kadir dkadir@cosy.sbg.ac.at Michael Liedlgruber mliedl@cosy.sbg.ac.at

Head of the course: Roland Schwaiger

May 15, 2000

Contents

1 Introduction 2 1.1 What is ALGAE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 An agent’s sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Actions performed by an agent . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Reproduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

A Session logs 6 A.1 March 15, 1999 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 A.2 March 22, 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 A.3 March 29, 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 A.4 April 12, 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 A.5 May 2, 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Abstract

The purpose of this project is the creation of a MAS (Multi Agent System) with multiple Algaes as agents. The program written for this project should be able to simulate the world where the agents live in.

Chapter 1

Introduction

1.1 What is ALGAE

Evolution, learning and communication (elc) is an implementation of a multi agent system (MAS) conceptualized and implemented by Roland Schwaiger and Konrad Lang. They investigate the evolution of wandering behavior of simple (reactive) agents in a highly dynamic environment. Those simple agents wander based on the outcomes of feed forward ANNs (multi layer perceptrons). The inputs to the network are calculated from positions of other agents within a sensor range of each single agent. As an outcome the ANN determines the steering direction (Forward, Back, Left, Right). The ANNs of the agents are evolved according to some given criteria, e.g. maximize the number of places visited or maximize the number of distinct partners within sensor range. Surprising results evolve over time s.a. simple steering rules and complex group behaviors.

Figure 1.1: The world where the various agents live.

Based on the first findings in elc a followup system will be implemented based on the algae LOGOPODIUM. Imagine an aquarium where on top a uniform light source resides. At the bottom you may find some substrate. Algae (agents) live in the world between – for now we may view the aquarium as a two dimensional object, with a discrete coordinate space (matrix). This aquarium with all its contents (agents and their sensors, substrateand pheromone distribution) are updated and redrawn each time step. From time to time the light is switched on and off. As you might imagine, light has a higher intensity at the top of the aquarium than at the bottom. We might model the intensity by the function 1/x but any other function with similar shape will do, for now. Additionally there will be some sort of shadows. This results in a lower light level for agents below other ones. The same holds for the substrate which diffuses into the water. The distribution of substrate is based on a mathematical function. There is a specific amount of substrate at every point in our matrix. The agents may consume the substrate, which after some time will be renewed.

1.2 An agent’s sensors

Figure 1.2: The various sensors of agents a_{i}.

All actions of one agent result from influences of its neighborhood. The agents (a_{i}) have sensors (receptors) for light (L_{i}^{j}, j = 1, 2, 3, 4), substrate (S_{i}^{j}, j = 1, 2, 3, 4), pheromone (P_{i}^{j}, j = 1, 2, 3, 4) which is released by other agents and bumping (B_{i}^{j}, j = 1, 2, 3, 4). Three of these sensors (light, pheromone and substrate) have a specific range and FOV ^{1}. According to the density of the various sources (light, substrate, pheromone) the sensors will show different values^{2}. Through differnt values in the sensors an agent may “learn” to steer towards a target.

Figure 1.3: The possible moving directions of agent a_{i}.

1Field of view

2In order to model this situation a world object will set the sensor values

1.3 Actions performed by an agent

The agents perform some actions acording to their internal model. They may move in the world (aquarium). According to their local coordinate system they may move FORWARD, LEFT, RIGHT and BACK only one step per timestep. The agents may stand still and do nothing. Obviously other agents or the borders of the aquarium hinter the agent to move according to the ANN output. Each action as described before requires a certain amount of energy. Agents consume substrate and light to increase their energy level E. Agents may reproduce by mitosis (asexual) or meiosis (sexual).

Figure 1.4: The ANN of agent a_{i} (first proposal).

The various actions of an agent are partially determined by its mapping from input of the environment to output, i.e. reactions. This type of agent may be called reactive agent or stimulus/response agent. In our multi agent system we model this stimulus/response relationship by means of an artificial neural network – multi layer perceptron – (ANN). The input to the ANN consists of the sensor inputs and the energy level of the agent. Various hidden layers are used to perform transformations of the signals. Finally at the output level the calculated moving directions are shown. At the moment of writing the shown ANN is our first proposal, it will change during course of discussion.

1.4 Reproduction

Figure 1.5: Reproduction of the agents a_{i} and a_{j} .

As has been pointed out, the algae live their lifes in a steady state population. That means that agents may life and prosper as long as their energy level does not reach 0. Once it has reached 0 the algae is damned to die. On the other hand if the energy level reaches a certain amount E_{r}, the algae may reproduce either sexually (meiosis) or asexually (mitosis). In order to find a partner the algae may produce pheromones, which is released each time step and dissolves during a specific amount of time steps. These pheromones may be detected by other agents throught their pheromone sensors. Possibly some algae learn to navigate to reproduction partners.

Appendix A

Session logs

A.1 March 15, 1999

Time: 17:00 - 17:30 Place: Room 202.2, Institute for Computer Sciences, University of Salzburg Present persons: R. Schwaiger, C. Bauer, P. Eisenmann, T. Frommwald, M. Liedlgruber and D. Kadir

Treated points:

• Formalities

• General introduction to the problem

Tasks to perform until March 22,2000

• Get photos for the project-homepage

• Have a careful look at the document

• Have a look on JAVA

A.2 March 22, 2000

Time: 17:00 - 17:30 Place: Room 202.2, Institute for Computer Science, University of Salzburg Present persons: R. Schwaiger, C. Bauer, P. Eisenmann, T. Frommwald, M. Liedlgruber and D. Kadir

Treated points:

• We have a concret matrix where the simulation should take place

• Substrate

Distribution of substrate is based on a mathematical function

There is a specific amount of the substrate at every point in our matrix

The regeneration of the substrate depends on the distribution function and a basic time period (determined by some parameters)

• Sensors

The sensors of our agents have a specific range and an angle of ’sight’. These things are variabel.

We got a new sensor that can detect contact (with the wall or other agents)

• Pheromons disintegrate after a while

• Possible agent actions: Power consumption, movement, pheromon output, reproduc-

tion

All actions consume different amounts of energy

• Energy consumption through photosynthesis or substrat accomondation

• Movement Speed ? Agents may move one unit in one time unit

• Reproduction Meiose / Mitose If the agent wants to reproduce through meiose he has to have a certain amount

of energy. The agent follows the pheromon tracks of other agents and puts out pheromons himself.

• Pheromon output During movement The agent should not follow his own pheromon track

• Simulation steps The current status of the sim is displayed after each simulation step During one step the agents may perform an arbitrary amount of actions (excep-

tion: movement !)

Tasks to fullfill until March 29, 2000 • Prepare further questions

A.3 March 29, 2000

Time: 17:00 - 17:30 Place: Room 202.2, Institute for Computer Science, University of Salzburg Present persons: R. Schwaiger, C. Bauer, P. Eisenmann, T. Frommwald and D. Kadir

Treated points:

• Agent input

We need another input for our neural network: the current energy level of the agent

It is probably necessary that agents know whether the detected pheromon is their own or not

• The neural network There are units in the ANN which are connected through weighted lines The more important the connection of two unit becomes, the thicker the con-

necting line.

Output consists of the movement direction and everything concerning reproduction

• The light Probably there will be some sort of ’fight’ for the positions that are near the light Agents that are not on top level will get less light (shadows) For this reason they may try to consume more of the substrate - the according

connecting line of the ANN gets thicker

• How could the agent learn that sexual reproduction is better than the mitose ?

Tasks to fullfill until April 12, 2000:

• Revise the paper:

Exact problem definition Session logs Discussions

A.4 April 12, 2000

Time: 17:00 - 17:30 Location: Room 202.2, Institute for Computer Sciences, University of Salzburg Present persons: R. Schwaiger, P. Eisenmann, T. Frommwald, M. Liedlgruber and D. Kadir Treated points: (document revised:)

• Light/Substrate:

Diffusion: Substrate regenerates faster at the bottom than above. Agent has transparency factor.

• Pheromon, Mitose, Meiose: Pheromon is placed only at the point, were agent is situated; time-delayed pheromon reduction. 4 various ways to consider meiosis - we choose the 3rd one: forced reproduction.

• World(object):

Output over all partial aspects.

• ANN:

Processing of signals with ’Cubic Splines-Methode’(set points to calculate a function)

In the ANN ’the winner takes all’ - the maximum evaluated response is selected

Tasks until Mai 2, 2000 • first GUI (/World)-prototype

• create UML-model

• ev. other questions

A.5 May 2, 2000

Time: 17:00 - 17:30 Location: Room 202.2, Institute for Computer Science, University of Salzburg Present persons: R. Schwaiger, C. Bauer, P. Einsenmann, T. Frommwald and D. Kadir

Treated points:

GUI Interface

• Saving Possibility of saving from intermediate stages To draft on a particular step of the simulation • Buttons, menu bar and tabstrip

”Settings” in the menu bar is problematic Button for gradual running Rename ”Main” by ”Aquarium” New tabstrip which shows a list of all algae and the possibility to select one of

them Move the ”ANN Sensors” tabstrip into the algae tab writer A new menu point ”Windows” which shows the details of the agents.

• others Show light and substrate in the aquarium. Possibility to hold back indication for a certain amount of steps

Tasks until May 24, 2000 • Description of the GUI Interface

• Some agents should move in the aquarium

• Think about in which information we would be interested • Make treated changes of the GUI