
\documentclass[12pt,fleqn,a4paper]{report}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{xspace}
\usepackage{epsfig}
\usepackage{graphicx}

\textheight     680pt
\textwidth      460pt
\topmargin      -40pt
\oddsidemargin    5pt
\evensidemargin   5pt
\parindent        0pt

\begin{titlepage}

\title{\textbf{ALGAE}\\Programmierpraktikum II SS 2000}

\author{\textbf{Clemens Bauer}\\\textit{cbauer@cosy.sbg.ac.at}
\\\textbf{Peter Eisenmann}\\\textit{peisen@cosy.sbg.ac.at}
\\\textbf{Thomas Frommwald}\\\textit{tfromm@cosy.sbg.ac.at}
\\\textbf{Daniel Kadir}\\\textit{dkadir@cosy.sbg.ac.at}
\\\textbf{Michael Liedlgruber}\\\textit{mliedl@cosy.sbg.ac.at}
\\
\\ 
\\Head of the course: Roland Schwaiger
}

\end{titlepage}

\clearpage
\begin{document}
\maketitle
\tableofcontents

\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{Introduction}
\section{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.

\begin{figure}[hbt]
\centerline{\epsfxsize=10cm   
\epsfbox{./aquarium.xfig.eps}}   
\caption{The world where the various agents live.}
\label{}
\end{figure}

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, substrate- and 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.

\section{An agent's sensors}

\begin{figure}[hbt]
\centerline{\epsfxsize=10cm   
\epsfbox{./sensors.xfig.eps}}   
\caption{The various sensors of agents $a_i$.}
\label{}
\end{figure}

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 \footnote{Field of view}. According to the density of the various sources (light, substrate, pheromone) the sensors will show different values\footnote{In order to model this situation a world object will set the sensor values}. Through differnt values in the sensors an agent may ``learn'' to steer towards a target.

\begin{figure}[hbt]
\centerline{\epsfxsize=7cm   
\epsfbox{./moving.xfig.eps}}   
\caption{The possible moving directions of agent $a_i$.}
\label{}
\end{figure}

\section{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).
\\
\begin{figure}[hbt]
\centerline{\epsfxsize=7cm   
\epsfbox{./ann.xfig.eps}}   
\caption{The ANN of agent $a_i$ (first proposal).}
\label{}
\end{figure}

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.  

\section{Reproduction}

\begin{figure}[hbt]
\centerline{\epsfxsize=7cm   
\epsfbox{./reproduction.xfig.eps}}   
\caption{Reproduction of the agents $a_i$ and $a_j$ .}
\label{}
\end{figure}

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

\chapter{Session logs}

\section{March 15, 1999}

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

\textbf{Treated points:}

\begin{itemize}
\item Formalities   
\item General introduction to the problem
\end{itemize}

\textbf{Tasks to perform until March 22,2000}
\begin{itemize}
\item Get photos for the project-homepage
\item Have a careful look at the document
\item Have a look on JAVA
\end{itemize}


\section{March 22, 2000}

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

\textbf{Treated points:}

\begin{itemize}

\item We have a concret matrix where the simulation should take place


\item Substrate
	\subitem Distribution of substrate is based on a mathematical function 
	\subitem There is a specific amount of the substrate at every point in our matrix
	\subitem The regeneration of the substrate depends on the distribution function and a basic time period (determined by some parameters) 

\item Sensors
	\subitem The sensors of our agents have a specific range and an angle of 'sight'. These things are variabel.
            \subitem We got a new sensor that can detect contact (with the wall or other agents)

\item Pheromons disintegrate after a while

\item Possible agent actions: Power consumption, movement, pheromon output, reproduction
 	\subitem All actions consume different amounts of energy

\item Energy consumption through photosynthesis or substrat accomondation

\item Movement
		\subitem Speed ?
		\subitem Agents may move one unit in one time unit

\item Reproduction
	\subitem Meiose / Mitose
	\subitem 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.

\item Pheromon output
 	\subitem During movement 
	\subitem The agent should not follow his own pheromon track

\item Simulation steps
	\subitem The current status of the sim is displayed after each simulation step  
	\subitem During one step the agents may perform an arbitrary amount of actions (exception: movement !)

\end{itemize}

\textbf{Tasks to fullfill until March 29, 2000}
\begin{itemize}
\item Prepare further questions
\end{itemize}

\newpage
\section{March 29, 2000}

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

\textbf{Treated points:}

\begin{itemize}

\item Agent input
	\subitem We need another input for our neural network: the current energy level of the agent
 	\subitem It is probably necessary that agents know whether the detected pheromon is their own or not


\item The neural network
	\subitem There are units in the ANN which are connected through weighted lines
	\subitem The more important the connection of two unit becomes, the thicker the connecting line.
	\subitem Output consists of the movement direction and everything concerning reproduction


\item The light
	\subitem Probably there will be some sort of 'fight' for the positions that are near the light
	\subitem Agents that are not on top level will get less light (shadows) 
	\subitem For this reason they may try to consume more of the substrate - the according connecting line of the ANN gets thicker

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

\end{itemize}

\textbf{Tasks to fullfill until April 12, 2000:}

\begin{itemize}

\item Revise the paper:
	\subitem Exact problem definition
	\subitem Session logs
	\subitem Discussions

\end{itemize}


\section{April 12, 2000}
 
\textbf{Time:} 17:00 - 17:30\\
\textbf{Location:} Room 202.2, Institute for Computer Sciences,
University of Salzburg\\  \textbf{Present persons:} R. Schwaiger, P.
Eisenmann, T. Frommwald, M. Liedlgruber and D. Kadir\\
   
\textbf{Treated points: \\
        (document revised:)} 
 
\begin{itemize} 
 
\item Light/Substrate: 
	\subitem Diffusion: Substrate regenerates faster at the bottom than above.
	\subitem Agent has transparency factor.
\item Pheromon, Mitose, Meiose:
	\subitem Pheromon is placed only at the point, were agent is situated;
	\subitem time-delayed pheromon reduction.
	\subitem 4 various ways to
consider meiosis \ - we choose the 3rd one: forced reproduction.

\item World(object):
	\subitem Output over all partial aspects.
\\

\item ANN: 
	\subitem Processing of signals with 'Cubic Splines-Methode'(set points
to calculate a function)
 	\subitem In the ANN 'the winner takes all' \ - the maximum evaluated
response is selected
	 
\end{itemize} 
 
\textbf{Tasks until Mai 2, 2000} 
\begin{itemize}
\item first GUI (/World)-prototype
\item create UML-model
\item ev. other questions 
\end{itemize}

\section{May 2, 2000}
\textbf{Time:} 17:00 - 17:30\\
\textbf{Location:} Room 202.2, Institute for Computer Science, University of Salzburg\\ 
\textbf{Present persons:} R. Schwaiger, C. Bauer, P. Einsenmann, T. Frommwald and D. Kadir\\ 

\textbf{Treated points:}\\

\textbf{GUI Interface}
\begin{itemize}
	\item Saving
		\subitem Possibility of saving from intermediate stages
		\subitem To draft on a particular step of the simulation
	\item Buttons, menu bar and tabstrip
		\subitem "Settings" in the menu bar is problematic
		\subitem Button for gradual running
		\subitem Rename "Main" by "Aquarium"
		\subitem New tabstrip which shows a list of all algae and the possibility to select one of them
		\subitem Move the "ANN Sensors" tabstrip into the algae tab writer
		\subitem A new menu point "Windows" which shows the details of the agents.
	\item{others}
		\subitem Show light and substrate in the aquarium.
		\subitem Possibility to hold back indication for a certain amount of steps
\end{itemize}
\textbf{Tasks until May 24, 2000}  
\begin{itemize}
	\item Description of the GUI Interface
	\item Some agents should move in the aquarium
	\item Think about in which information we would be interested
	\item Make treated changes of the GUI
\end{itemize}


\end{document}

