Programming with Python. Part 3. Different Behavior Functions for Experiments 1-4

emerging-mind.org eJournal ISSN 2567-6466
(info@emerging-mind.org)
Gerd Doeben-Henisch
gerd@doeben-henisch.de
October 18, 2017

Contents
1 Problem to be Solved 1
2 How to Program 2
2.1 Empty Behavior Function . . . . . . . . . . . . . . . . . . . . 2
2.2 Fixed Behavior Function . . . . . . . . . . . . . . . . . . . . . 7
2.3 Random Behavior Function . . . . . . . . . . . . . . . . . . . 10
2.4 Food-Intake Function . . . . . . . . . . . . . . . . . . . . . . . 11

Abstract

According to the actual requirements we have to prepare 4 different
types of behavior functions

1 Problem to be Solved

In part 2 we have mentioned the following 4 types of behavior functions
which we need:
1. The behavior function phi of the actor is ’empty’  phi = 0. The actor
functions like an ’envelope’: you can see the body of the actor on the
screen, but his behavior depends completely from the inputs given by
a human person.
1
2. The behavior function  of the actor is driven by one, fixed rule  phi(i) = const. The actor will do always the same, independent from the environment.
3. The behavior function  of the actor is driven by a source of random
values; therefore the output is completely random phi(i) = random.
4. The behavior function  of the actor is driven by a source of random
value but simultaneously the actor has some simple memory  remembering the last n steps before finding food. Therefore the behavior
is partially random, partially directed depending from the distance
to the goal food:  phi : I  x IS —> IS  x O with internal states IS as
a simple memory which can collect data from the last n-many steps
before reaching the goal. If the memory  is not empty then it can
happen, that the actual input maps the actual memory-content and
then the memory gives the actor a ’direction’ for the next steps.

In this part 3 we will program the cases 1-3 and we will implement a
food-intake function which will increase the energy level again.

For more see the attached PDF-file.

For all the python sources see the attached ZIP-file.

Continue to part 4 (First Milestone)

Programming with Python. Part 2. Replacing console interactions by mouse-click events

emerging-mind.org
eJournal ISSN 2567-6466
info@emerging-mind.org

Gerd Doeben-Henisch
gerd@doeben-henisch.de

PDF

SW-ZIP
CONTENT

1 Problem to be Solved 1
2 How to Program 2
2.1 Continuation with Timer instead of Console Interaction; Quit . 2
2.2 Inserting an Actor by Mouse-Click . . . . . . . . . . . . . . . 3
2.3 Putting Things Together . . . . . . . . . . . . . . . . . . . . . 6

OVERVIEW

Taking the proposal from Part 1 for an environment-actor demo
and enhance it with replacing all console interactions with mouse-click
events
In this part 2 (see the attached PDF for Details) the last version ‚gdh-win10.py‘ will be improved by replacing all console interactions by mouse-clicks or by time-delay functions. There are also some minor improvements of the files environment.py and acctor.py.

How to Continue?

Continue with Part 3