PROGRAMMING WITH PYTHON. First Test Results with Fixed-Rule and Random-Rule Actors

emerging-mind.org eJournal ISSN 2567-6466
Email: info@emerging-mind.org
3.Dec 2017
Author: Gerd Doeben-Henisch
Email: gerd@doeben-henisch.de

Contents

1 Discussion… 2
1.1 Expectations . . . . . . . . . . . . . . . . . . . . . . . . . . .2
1.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Consequences . . . . . . . . . . . . . . . . . . . . . . . . . .4
2 Data Fixed-Rule Actor… 4
2.1 EXPERIMENT 1 …4
2.2 EXPERIMENT 2 …5
2.3 EXPERIMENT 3 …5
2.4 EXPERIMENT 4 . ..5
3 Data Random-Rule Actor..10
3.1 EXPERIMENT 1 . . .10
3.2 EXPERIMENT 2 . . .10
3.3 EXPERIMENT 3 . . .10
3.4 EXPERIMENT 4 . . . .10

Abstract

A first series of tests have been realized with fixed-rule actors and
random-rule actors. The results show, that there is no clear correlation
between the mean amount of energy and the death-rate of an actor
(-0.78 fixed rule Actor), (-0.71 random rule actor). Between the death-rates of both actors we have a correlation of -0.18, and between the
mean energy of both actors a little bit positive correlation of 0.05.

1 Discussion

A first experiment has been realized with the version of the program named ae6-2-6-main.py.

This program offers the following options for the user:
1. Which kind of behavior (fixed-rule, random-rule)
2. Size of grid (n x n)
3. Percentage of obstacles in the grid (default is 20)
4. Percentage of food in the grid (default is 5)
5. Amount of cycles for one run
6. Amount of repetitions of runs
7. Debug mode (clicking with the mouse after every step) or not
8. Duration of sleeping between steps (if no debug mode)(0 – 5 sec)
9. Manual or random determination of start position

The output is a graph showing the mean energy consumed, the death
rate per run, the percentage of energy level per run, the percentage of
obstacles and food to the grid area.

All these options of the program have been tested. Everything worked
fine. Only in the complete automatic mode (with automatic start positions)
the program crashed with spyder in the case of the random rule actor.
Repeating these tests directly from the Linux-Shell with the directory
path ’ /Dokumente/EMP/SW/PY-PROGRAMS/A-E-6-2$’ and the command ’python3 ae6-2-6-main.py’ everything worked fine. No problems. Thus it seems that the error is an artifact caused by the spyder-software.

1.1 Expectations

In this experiment the following options have been activated:

1. Either behavior type 1 or 2
2. Using the grid sizes 7 – 9 – 11 – 15
3. In parallel using the amount of cycles with 50 – 70 – 90 – 130
4. In all cases 10 repetitions
5. No-Debug, Sleep-time 0 sec, automatic determination of start position.
6. For every type of behaviour with a certain amount of cycles the experiment has been done 3 times.

With these assumptions does the abbreviation ’T1-7-50-10-R1’ mean
that this experiment used type 1 of behaviour, grid-size was 7×7, amount of cycles was 50 with 10 repetitions, and this was experiment 1 of three.

In case of the fixed-rule actor the amount of the death-rate depends directly from the fact, that the right-hand rule allows a path, where there is no single food object. The size of the grid and the percentage of objects and food does not matter. The only influence can be that the positive paths can have until 4 food interactions; this can increase the amount of mean energy.

In the case of the random-rule actor the death-rate depends from the
fact, that a random path is completely open. Even if a random actor hits
lots of food-objects this does not guarantee a death-free path. The only
influence can be that the length of the path increases the probability to hit
a food object.

1.2 Results

The results show, that there is no clear correlation between the mean
amount of energy and the death rate of an actor (-0.78 fixed rule Actor),
(-0.71 random rule actor). This confirms the expectation above.
Between the death rates of both actors we have a correlation of -0.18,
and between the mean energy of both actors a little bit positive correlation
of 0.05. That there are slight correlations between the death-rates of both
actors and even more between the mean energies is also confirming the
expectations. Because both actors depend from the same configuration
and where the proportion between objects and food is stable with regard
to the whole grid it is only the length of the path which varies, and this can
increase the amount of energy while the death-rate keeps its uncertainty.

 

1.3 Consequences

This simple setting demonstrates that an input output system whose only
interactions with the environment are fixed or random movements which occur independent of the actual context as well as interaction with food when the actor hits the food directly is highly uncertain in its overall outcome.

To improve the success of an actor one has to provide some kind of an
internal representation of the environment inside the actor in a way which
allows an exploitation of those properties of the environment which support more success in terms of energy and low death-rates.

Another dimension could be the generation of offspring under certain
successful runs. Offspring would generate some kind of a population which
implies new kinds of constraints.

DATA

For the data sets read the attached PDF.

Leave a Reply

Your email address will not be published. Required fields are marked *