STARTING WITH PYTHON3 – The very beginning – part 9

Journal: uffmm.org,
ISSN 2567-6458, July 24-25, 2019
Email: info@uffmm.org
Author: Gerd Doeben-Henisch
Email:gerd@doeben-henisch.de

CONTEXT

This is the next step in the python3 programming project. The overall context is still the python Co-Learning project.

SUBJECT

In this file you will see a first encounter between the AAI paradigm (described in the theory part of this uffmm blog) and some applications of the python programming language. A simple virtual world with objects and actors can become activated with a free selectable size, amount of objects and amount of actors. In later post lots of experiments with this virtual world will be described as well as many extensions.

SOURCE CODE
Main file: vw4.py

The main file ‘vw4.py’ describes the start of a virtual world and then allows a loop to run this world n-many times.

Import file: vwmanager.py

The main file ‘vw4.py’ is using many functions to enable the process. All these functions are collected in the file ‘vwmanager.py’. This file will automatically be loaded during run time of the program vw4.py.

COMMENTS

comment-vw4

DEMO

TEST RUN AUG 19, 2919, 12:56h

gerd@Doeben-Henisch:~/code$ python3 vw4.py
Amount of information: 1 is maximum, 0 is minimum0
Number of columns (= equal to rows!) of 2D-grid ?4
[‘_’, ‘_’, ‘_’, ‘_’]

[‘_’, ‘_’, ‘_’, ‘_’]

[‘_’, ‘_’, ‘_’, ‘_’]

[‘_’, ‘_’, ‘_’, ‘_’]

Percentage (as integer) of obstacles in the 2D-grid?77
Percentage (as integer) of Food Objects in the 2D-grid ?44
Percentage (as integer) of Actor Objects in the 2D-grid ?15

Objects as obstacles

[0, 2, ‘O’]

[0, 3, ‘O’]

[1, 2, ‘O’]

[2, 3, ‘O’]

Objects as food

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Objects as actor

[1, 3, ‘A’, [0, 1000, 100, 500, 0]]

[3, 2, ‘A’, [1, 1000, 100, 500, 0]]

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘A’, ‘F’]

END OF PREPARATION

WORLD CYCLE STARTS

—————————————————-
Real percentage of obstacles = 25.0
Real percentage of food = 37.5
Real percentage of actors = 12.5
—————————————————-
How many CYCLES do you want?25
Singe Step = 1 or Continous = 0?1
Length of olA 2

—————————————————–

WORLD AT CYCLE = 0

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘A’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 1000, 100, 500, -1]]

[2, 1, ‘A’, [1, 1000, 100, 500, 8]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 1

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘A’]

[‘F’, ‘A’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 900, 100, 500, -1]]

[2, 1, ‘A’, [1, 900, 100, 500, 0]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 2

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘A’]

[‘F’, ‘A’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 800, 100, 500, -1]]

[1, 1, ‘A’, [1, 1300, 100, 500, 1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 500, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 3

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 700, 100, 500, -1]]

[2, 0, ‘A’, [1, 1700, 100, 500, 6]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 600, 100]]

[2, 0, ‘F’, [2, 500, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 4

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘A’]

[‘A’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 600, 100, 500, -1]]

[1, 0, ‘A’, [1, 1600, 100, 500, 1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 700, 100]]

[2, 0, ‘F’, [2, 600, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 5

[‘F’, ‘_’, ‘O’, ‘O’]

[‘A’, ‘F’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 500, 100, 500, -1]]

[1, 1, ‘A’, [1, 2000, 100, 500, 3]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 300, 100]]

[2, 0, ‘F’, [2, 700, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 6

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 400, 100, 500, -1]]

[1, 1, ‘A’, [1, 1900, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 400, 100]]

[2, 0, ‘F’, [2, 800, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 7

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 300, 100, 500, -1]]

[1, 1, ‘A’, [1, 1800, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 500, 100]]

[2, 0, ‘F’, [2, 900, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 8

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 200, 100, 500, -1]]

[1, 1, ‘A’, [1, 1700, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 600, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 2

—————————————————–

WORLD AT CYCLE = 9

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘A’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 3, ‘A’, [0, 100, 100, 500, 0]]

[1, 0, ‘A’, [1, 1600, 100, 500, 7]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 700, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 10

[‘F’, ‘_’, ‘O’, ‘O’]

[‘A’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 0, ‘A’, [1, 1500, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 800, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 11

[‘F’, ‘_’, ‘O’, ‘O’]

[‘A’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 0, ‘A’, [1, 1400, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 900, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 12

[‘F’, ‘_’, ‘O’, ‘O’]

[‘A’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 0, ‘A’, [1, 1300, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 13

[‘F’, ‘_’, ‘O’, ‘O’]

[‘A’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[2, 0, ‘A’, [1, 1700, 100, 500, 5]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 500, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 14

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘A’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 1, ‘A’, [1, 2100, 100, 500, 2]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 500, 100]]

[2, 0, ‘F’, [2, 600, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 15

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2500, 100, 500, 8]]

[0, 0, ‘F’, [0, 500, 100]]

[1, 1, ‘F’, [1, 600, 100]]

[2, 0, ‘F’, [2, 700, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 16

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2400, 100, 500, -1]]

[0, 0, ‘F’, [0, 600, 100]]

[1, 1, ‘F’, [1, 700, 100]]

[2, 0, ‘F’, [2, 800, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 17

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2300, 100, 500, -1]]

[0, 0, ‘F’, [0, 700, 100]]

[1, 1, ‘F’, [1, 800, 100]]

[2, 0, ‘F’, [2, 900, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 18

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2200, 100, 500, -1]]

[0, 0, ‘F’, [0, 800, 100]]

[1, 1, ‘F’, [1, 900, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 19

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2100, 100, 500, -1]]

[0, 0, ‘F’, [0, 900, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 20

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 2000, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 21

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 0, ‘A’, [1, 1900, 100, 500, 0]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 22

[‘A’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[0, 1, ‘A’, [1, 1800, 100, 500, 3]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 1000, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 23

[‘F’, ‘A’, ‘O’, ‘O’]

[‘_’, ‘F’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 1, ‘A’, [1, 2200, 100, 500, 5]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 500, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

Length of olA 1

—————————————————–

WORLD AT CYCLE = 24

[‘F’, ‘_’, ‘O’, ‘O’]

[‘_’, ‘A’, ‘O’, ‘_’]

[‘F’, ‘_’, ‘F’, ‘O’]

[‘F’, ‘_’, ‘_’, ‘F’]

Press key c for continuation!c
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Updated energy levels in olF and olA
[1, 1, ‘A’, [1, 2100, 100, 500, -1]]

[0, 0, ‘F’, [0, 1000, 100]]

[1, 1, ‘F’, [1, 600, 100]]

[2, 0, ‘F’, [2, 1000, 100]]

[2, 2, ‘F’, [3, 1000, 100]]

[3, 0, ‘F’, [4, 1000, 100]]

[3, 3, ‘F’, [5, 1000, 100]]

 

STARTING WITH PYTHON3 – The very beginning – part 4

Journal: uffmm.org,
ISSN 2567-6458, July 15, 2019
Email: info@uffmm.org
Author: Gerd Doeben-Henisch
Email:
gerd@doeben-henisch.de

Change: July 16, 2019 (Some re-arrangement of the content :-))

CONTEXT

This is the next step in the python3 programming project. The overall context is still the python Co-Learning project.

SUBJECT

After a first clearing of the environment for python programming we have started with the structure of the python programming language, and in this section will deal with the object type string(s).

Remark: the following information about strings you can get directly from the python manuals, which you can find associated with the entry for python 3.7.3 if you press the Windows-Button, look to the list of Apps (= programs), and identify the entry for python 3.7.3. If you open the python entry by clicking you see the sub-entry python 3.7.3 Manuals. If you click on this sub-entry the python documentation will open. In this documentation you can find nearly everything you will need. For Beginners you even find a nice tutorial.

TOPIC: VALUES (OBJECTS) AS STRINGS

PROBLEM(s)

(1) When I see a single word (a string of symbols) I do not know which type this is in python. (2) If I have a statement with many words I would like to get from this a partition into all the single worlds for further processing.

VISION OF A SOLUTION

There is a simple software actor which can receive as input either single words or multiple words and which can respond by giving either the type of the received word or the list of the received multiple words.

ACTOR STORY (AS)

We assume a human user as executing actor (eA) and a piece of running software as an assisting actor (aA). For these both we assume the following sequence of states:

  1. The user will start the program by calling python and the name of the program.
  2. The program offers the user two options: single word or multiple words.
  3. The user has to select one of these options.
  4. After the selection the user can enter accordingly either one  or multiple words.
  5. The program will respond either with the recognized type in python or with a list of words.
  6. Finally asks the program the user whether he/she will continue or stop.
  7. Depending from the answer of the user the program will continue or stop.

IMPLEMENTATION

Here you can download the sourcecode: stringDemo1

# File stringDemo1.py
# Author: G.Doeben-Henisch
# First date: July 15, 2019

##################
# Function definition sword()

def sword(w1):
w=str(w1)
if w.islower():
print(‘Is lower\n’)
elif w.isalpha() :
print(‘Is alpha\n’)
elif w.isdecimal():
print(‘Is decimal\n’)
elif w.isascii():
print(‘Is ascii\n’)
else : print(‘Is not lower, alpha, decimal, ascii\n’)

##########################
# Main Programm

###############
# Start main loop

loop=’Y’
while loop==’Y’:

###################
# Ask for Options

opt=input(‘Single word =1 or multiple words =2\n’)

if opt==’1′:
w1=input(‘Input a single word\n’)
sword(w1) # Call for new function defined above

elif opt==’2′:
w1=input(‘Input multiple words\n’)
w2=w1.split() # Call for built-in method of class str
print(w2)

loop=input(‘To stop enter N\n’) # Check whether loop shall be repeated

DEMO

Here it is assumed that the code of the python program is stored in the folder ‘code’ in my home director.

I am starting the windows power shell (PS) by clicking on the icon. Then I enter the command ‘cd code’ to enter the folder code. Then I call the python interpreter together with the demo programm ‘stringDemo1.py’:

PS C:\Users\gerd_2\code> python stringDemo1.py
Single word =1 or multiple words =2

Then I select first option ‘Single word’ with entering 1:

1
Input a single word
Abrakadabra
Is alpha

To stop enter N

After entering 1 the program asks me to enter a single word.

I am entering the fantasy word ‘Abrakadabra’.

Then the program responds with the classification ‘Is alpha’, what is correct. If I want to stop I have to enter ‘N’ otherwise it contiues.

I want o try another word, therefore I am entering ‘Y’:

Y
Single word =1 or multiple words =2

I select again ‘1’ and the new menue appears:

1
Input a single word
29282726
Is decimal

To stop enter N

I entered a sequence of digits which has been classified as ‘decimal’.

I want to contiue with ‘Y’ and entering ‘2’:

Y
Single word =1 or multiple words =2
2
Input multiple words
Hans kommt meistens zu spät
[‘Hans’, ‘kommt’, ‘meistens’, ‘zu’, ‘spät’]
To stop enter N

I have entered a German sentence with 5 words. The response of the system is to identify every single word and generate a list of the individual words.

Thus, so far, the test works fine.

COMMENTS TO THE SOURCE CODE

Before the main program a new function ‘sword()’ has been defined:

def sword(w1):

The python keyword ‘def‘ indicates that here the definition of a function  takes place, ‘sword‘ is the name of this new function, and ‘w1‘ is the input argument for this function. ‘w1’ as such is the name of a variable pointing to some memory place and the value of this variable at this place will depend from the context.

w=str(w1)

The input variable w1 is taken by the operator str and str translates the input value into a python object of type ‘string’. Thus the further operations with the object string can assume that it is a string and therefore one can apply alle the operations to the object which can be applied to strings.

if w.islower():

One of these string-specifi operations is islower(). Attached to the string object ‘w’ by a dot-operator ‘.’ the operation ‘islower() will check, whether the string object ‘w’ contains lower case symbols. If yes then the following ‘print()’ operation will send this message to the output, otherwise the program continues with the next ‘elif‘ statement.

The ‘if‘ (and following the if the ‘elif‘) keyword states a condition (whether ‘w’ is of type ‘lower case symbols’). The statement closes with the ‘:’ sign. This statement can be ‘true’ or not. If it is true then the part after the ‘:’ sign will be executed (the ‘print()’ action), if false then the next condition ‘elif … :’ will be checked.

If no condition would be true then the ‘else: …’ statement would be executed.

The main program is organized as a loop which can iterate as long as the user does not stop it. This entails that the user can enter as many words or multi-words as he/ she wants.

loop=’Y’
while loop==’Y’:

In the first line the variable ‘loop’ receives as a value the string ‘Y’ (short for ‘yes’). In the next line starts the loop with the python key-word ‘while’ forming a condition statement ‘while … :’. This is similar to the contion statements above with ‘if …. :’ and ‘elif … :’.

The condition depends on the expression ‘loop == ‘Y” which means that  as long as the variable loop is logically equal == to the value ‘Y’ the loop condition  is ‘true’ and the part after the ‘:’ sign will be executed. Thus if one wants to break this loop one has to change the value of the variable ‘loop’ before the while-statement ‘while … :’ will be checked again. This check is done in the last line of the while-execution part with the input command:

loop=input(‘To stop enter N\n’)

Before the while-condition will be checked again there is this input() operator asking the user to enter a ‘N’ if he/ she wantds to stop. If the user  enters a  ‘N’  in the input line the result of his input will be stored in the variable called ‘loop’ and therefore the variable will have the value ‘==’N” which is different from ‘==’Y”. But what would happen if the user enters something different from ‘N’ and ‘Y’, because ‘Y’ is expected for repetition?

Because the user does not know that he/she has to enter ‘Y’ to continue the program will highly probably stop even if the user does not want to stop. To avoid this unwanted case one should change the code for the while-conition as follows:

while loop!=’N’:

This states that the loop will be true as long as the value of the loop variable is different != from the value ‘N’ which will explicitly asked from the user at the end of the loop.

The main part of the while-loop distinguishes two cases: single word or multiple words. This is realized by a new input() operation:

opt=input(‘Single word =1 or multiple words =2\n’)

The user can enter a ‘1’ or a ‘2’, which will be stored in the variable ‘opt’. Then a construction with an if or an elif will test which one of these both happens. Depending from the option 1 or 2 ther program asks the user again with an input() operation for the specific input (one word or multiple words).

sword(w1)

In the case of the one word input in the variable ‘w1’ w1 contains as value a string input which will be delivered as input argument to the new function ‘sword()’ (explanation see above). In case of input 2 the

w2=w1.split()

‘split()’ operation will be applied to the object ‘w1’ by the dot operator ‘.’. This operation will take every word separated by a ‘blank’ and generates a list ‘[ … ]’ with the individual words as elements.

 

 

AAI THEORY V2 –A Philosophical Framework

eJournal: uffmm.org,
ISSN 2567-6458, 22.February 2019
Email: info@uffmm.org
Author: Gerd Doeben-Henisch
Email: gerd@doeben-henisch.de

Last change: 23.February 2019 (continued the text)

Last change: 24.February 2019 (extended the text)

CONTEXT

In the overview of the AAI paradigm version 2 you can find this section  dealing with the philosophical perspective of the AAI paradigm. Enjoy reading (or not, then send a comment :-)).

THE DAILY LIFE PERSPECTIVE

The perspective of Philosophy is rooted in the everyday life perspective. With our body we occur in a space with other bodies and objects; different features, properties  are associated with the objects, different kinds of relations an changes from one state to another.

From the empirical sciences we have learned to see more details of the everyday life with regard to detailed structures of matter and biological life, with regard to the long history of the actual world, with regard to many interesting dynamics within the objects, within biological systems, as part of earth, the solar system and much more.

A certain aspect of the empirical view of the world is the fact, that some biological systems called ‘homo sapiens’, which emerged only some 300.000 years ago in Africa, show a special property usually called ‘consciousness’ combined with the ability to ‘communicate by symbolic languages’.

General setting of the homo sapiens species (simplified)
Figure 1: General setting of the homo sapiens species (simplified)

As we know today the consciousness is associated with the brain, which in turn is embedded in the body, which  is further embedded in an environment.

Thus those ‘things’ about which we are ‘conscious’ are not ‘directly’ the objects and events of the surrounding real world but the ‘constructions of the brain’ based on actual external and internal sensor inputs as well as already collected ‘knowledge’. To qualify the ‘conscious things’ as ‘different’ from the assumed ‘real things’ ‘outside there’ it is common to speak of these brain-generated virtual things either as ‘qualia’ or — more often — as ‘phenomena’ which are  different to the assumed possible real things somewhere ‘out there’.

PHILOSOPHY AS FIRST PERSON VIEW

‘Philosophy’ has many facets.  One enters the scene if we are taking the insight into the general virtual character of our primary knowledge to be the primary and irreducible perspective of knowledge.  Every other more special kind of knowledge is necessarily a subspace of this primary phenomenological knowledge.

There is already from the beginning a fundamental distinction possible in the realm of conscious phenomena (PH): there are phenomena which can be ‘generated’ by the consciousness ‘itself’  — mostly called ‘by will’ — and those which are occurring and disappearing without a direct influence of the consciousness, which are in a certain basic sense ‘given’ and ‘independent’,  which are appearing  and disappearing according to ‘their own’. It is common to call these independent phenomena ’empirical phenomena’ which represent a true subset of all phenomena: PH_emp  PH. Attention: These empirical phenomena’ are still ‘phenomena’, virtual entities generated by the brain inside the brain, not directly controllable ‘by will’.

There is a further basic distinction which differentiates the empirical phenomena into those PH_emp_bdy which are controlled by some processes in the body (being tired, being hungry, having pain, …) and those PH_emp_ext which are controlled by objects and events in the environment beyond the body (light, sounds, temperature, surfaces of objects, …). Both subsets of empirical phenomena are different: PH_emp_bdy PH_emp_ext = 0. Because phenomena usually are occurring  associated with typical other phenomena there are ‘clusters’/ ‘pattern’ of phenomena which ‘represent’ possible events or states.

Modern empirical science has ‘refined’ the concept of an empirical phenomenon by introducing  ‘standard objects’ which can be used to ‘compare’ some empirical phenomenon with such an empirical standard object. Thus even when the perception of two different observers possibly differs somehow with regard to a certain empirical phenomenon, the additional comparison with an ’empirical standard object’ which is the ‘same’ for both observers, enhances the quality, improves the precision of the perception of the empirical phenomena.

From these considerations we can derive the following informal definitions:

  1. Something is ‘empirical‘ if it is the ‘real counterpart’ of a phenomenon which can be observed by other persons in my environment too.
  2. Something is ‘standardized empirical‘ if it is empirical and can additionally be associated with a before introduced empirical standard object.
  3. Something is ‘weak empirical‘ if it is the ‘real counterpart’ of a phenomenon which can potentially be observed by other persons in my body as causally correlated with the phenomenon.
  4. Something is ‘cognitive‘ if it is the counterpart of a phenomenon which is not empirical in one of the meanings (1) – (3).

It is a common task within philosophy to analyze the space of the phenomena with regard to its structure as well as to its dynamics.  Until today there exists not yet a complete accepted theory for this subject. This indicates that this seems to be some ‘hard’ task to do.

BRIDGING THE GAP BETWEEN BRAINS

As one can see in figure 1 a brain in a body is completely disconnected from the brain in another body. There is a real, deep ‘gap’ which has to be overcome if the two brains want to ‘coordinate’ their ‘planned actions’.

Luckily the emergence of homo sapiens with the new extended property of ‘consciousness’ was accompanied by another exciting property, the ability to ‘talk’. This ability enabled the creation of symbolic languages which can help two disconnected brains to have some exchange.

But ‘language’ does not consist of sounds or a ‘sequence of sounds’ only; the special power of a language is the further property that sequences of sounds can be associated with ‘something else’ which serves as the ‘meaning’ of these sounds. Thus we can use sounds to ‘talk about’ other things like objects, events, properties etc.

The single brain ‘knows’ about the relationship between some sounds and ‘something else’ because the brain is able to ‘generate relations’ between brain-structures for sounds and brain-structures for something else. These relations are some real connections in the brain. Therefore sounds can be related to ‘something  else’ or certain objects, and events, objects etc.  can become related to certain sounds. But these ‘meaning relations’ can only ‘bridge the gap’ to another brain if both brains are using the same ‘mapping’, the same ‘encoding’. This is only possible if the two brains with their bodies share a real world situation RW_S where the perceptions of the both brains are associated with the same parts of the real world between both bodies. If this is the case the perceptions P(RW_S) can become somehow ‘synchronized’ by the shared part of the real world which in turn is transformed in the brain structures P(RW_S) —> B_S which represent in the brain the stimulating aspects of the real world.  These brain structures B_S can then be associated with some sound structures B_A written as a relation  MEANING(B_S, B_A). Such a relation  realizes an encoding which can be used for communication. Communication is using sound sequences exchanged between brains via the body and the air of an environment as ‘expressions’ which can be recognized as part of a learned encoding which enables the receiving brain to identify a possible meaning candidate.

DIFFERENT MODES TO EXPRESS MEANING

Following the evolution of communication one can distinguish four important modes of expressing meaning, which will be used in this AAI paradigm.

VISUAL ENCODING

A direct way to express the internal meaning structures of a brain is to use a ‘visual code’ which represents by some kinds of drawing the visual shapes of objects in the space, some attributes of  shapes, which are common for all people who can ‘see’. Thus a picture and then a sequence of pictures like a comic or a story board can communicate simple ideas of situations, participating objects, persons and animals, showing changes in the arrangement of the shapes in the space.

Pictorial expressions representing aspects of the visual and the auditory sens modes
Figure 2: Pictorial expressions representing aspects of the visual and the auditory sens modes

Even with a simple visual code one can generate many sequences of situations which all together can ‘tell a story’. The basic elements are a presupposed ‘space’ with possible ‘objects’ in this space with different positions, sizes, relations and properties. One can even enhance these visual shapes with written expressions of  a spoken language. The sequence of the pictures represents additionally some ‘timely order’. ‘Changes’ can be encoded by ‘differences’ between consecutive pictures.

FROM SPOKEN TO WRITTEN LANGUAGE EXPRESSIONS

Later in the evolution of language, much later, the homo sapiens has learned to translate the spoken language L_s in a written format L_w using signs for parts of words or even whole words.  The possible meaning of these written expressions were no longer directly ‘visible’. The meaning was now only available for those people who had learned how these written expressions are associated with intended meanings encoded in the head of all language participants. Thus only hearing or reading a language expression would tell the reader either ‘nothing’ or some ‘possible meanings’ or a ‘definite meaning’.

A written textual version in parallel to a pictorial version
Figure 3: A written textual version in parallel to a pictorial version

If one has only the written expressions then one has to ‘know’ with which ‘meaning in the brain’ the expressions have to be associated. And what is very special with the written expressions compared to the pictorial expressions is the fact that the elements of the pictorial expressions are always very ‘concrete’ visual objects while the written expressions are ‘general’ expressions allowing many different concrete interpretations. Thus the expression ‘person’ can be used to be associated with many thousands different concrete objects; the same holds for the expression ‘road’, ‘moving’, ‘before’ and so on. Thus the written expressions are like ‘manufacturing instructions’ to search for possible meanings and configure these meanings to a ‘reasonable’ complex matter. And because written expressions are in general rather ‘abstract’/ ‘general’ which allow numerous possible concrete realizations they are very ‘economic’ because they use minimal expressions to built many complex meanings. Nevertheless the daily experience with spoken and written expressions shows that they are continuously candidates for false interpretations.

FORMAL MATHEMATICAL WRITTEN EXPRESSIONS

Besides the written expressions of everyday languages one can observe later in the history of written languages the steady development of a specialized version called ‘formal languages’ L_f with many different domains of application. Here I am  focusing   on the formal written languages which are used in mathematics as well as some pictorial elements to ‘visualize’  the intended ‘meaning’ of these formal mathematical expressions.

Properties of an acyclic directed graph with nodes (vertices) and edges (directed edges = arrows)
Fig. 4: Properties of an acyclic directed graph with nodes (vertices) and edges (directed edges = arrows)

One prominent concept in mathematics is the concept of a ‘graph’. In  the basic version there are only some ‘nodes’ (also called vertices) and some ‘edges’ connecting the nodes.  Formally one can represent these edges as ‘pairs of nodes’. If N represents the set of nodes then N x N represents the set of all pairs of these nodes.

In a more specialized version the edges are ‘directed’ (like a ‘one way road’) and also can be ‘looped back’ to a node   occurring ‘earlier’ in the graph. If such back-looping arrows occur a graph is called a ‘cyclic graph’.

Directed cyclic graph extended to represent 'states of affairs'
Fig.5: Directed cyclic graph extended to represent ‘states of affairs’

If one wants to use such a graph to describe some ‘states of affairs’ with their possible ‘changes’ one can ‘interpret’ a ‘node’ as  a state of affairs and an arrow as a change which turns one state of affairs S in a new one S’ which is minimally different to the old one.

As a state of affairs I  understand here a ‘situation’ embedded in some ‘context’ presupposing some common ‘space’. The possible ‘changes’ represented by arrows presuppose some dimension of ‘time’. Thus if a node n’  is following a node n indicated by an arrow then the state of affairs represented by the node n’ is to interpret as following the state of affairs represented in the node n with regard to the presupposed time T ‘later’, or n < n’ with ‘<‘ as a symbol for a timely ordering relation.

Example of a state of affairs with a 2-dimensional space configured as a grid with a black and a white token
Fig.6: Example of a state of affairs with a 2-dimensional space configured as a grid with a black and a white token

The space can be any kind of a space. If one assumes as an example a 2-dimensional space configured as a grid –as shown in figure 6 — with two tokens at certain positions one can introduce a language to describe the ‘facts’ which constitute the state of affairs. In this example one needs ‘names for objects’, ‘properties of objects’ as well as ‘relations between objects’. A possible finite set of facts for situation 1 could be the following:

  1. TOKEN(T1), BLACK(T1), POSITION(T1,1,1)
  2. TOKEN(T2), WHITE(T2), POSITION(T2,2,1)
  3. NEIGHBOR(T1,T2)
  4. CELL(C1), POSITION(1,2), FREE(C1)

‘T1’, ‘T2’, as well as ‘C1’ are names of objects, ‘TOKEN’, ‘BACK’ etc. are names of properties, and ‘NEIGHBOR’ is a relation between objects. This results in the equation:

S1 = {TOKEN(T1), BLACK(T1), POSITION(T1,1,1), TOKEN(T2), WHITE(T2), POSITION(T2,2,1), NEIGHBOR(T1,T2), CELL(C1), POSITION(1,2), FREE(C1)}

These facts describe the situation S1. If it is important to describe possible objects ‘external to the situation’ as important factors which can cause some changes then one can describe these objects as a set of facts  in a separated ‘context’. In this example this could be two players which can move the black and white tokens and thereby causing a change of the situation. What is the situation and what belongs to a context is somewhat arbitrary. If one describes the agriculture of some region one usually would not count the planets and the atmosphere as part of this region but one knows that e.g. the sun can severely influence the situation   in combination with the atmosphere.

Change of a state of affairs given as a state which will be enhanced by a new object
Fig.7: Change of a state of affairs given as a state which will be enhanced by a new object

Let us stay with a state of affairs with only a situation without a context. The state of affairs is     a ‘state’. In the example shown in figure 6 I assume a ‘change’ caused by the insertion of a new black token at position (2,2). Written in the language of facts L_fact we get:

  1. TOKEN(T3), BLACK(T3), POSITION(2,2), NEIGHBOR(T3,T2)

Thus the new state S2 is generated out of the old state S1 by unifying S1 with the set of new facts: S2 = S1 {TOKEN(T3), BLACK(T3), POSITION(2,2), NEIGHBOR(T3,T2)}. All the other facts of S1 are still ‘valid’. In a more general manner one can introduce a change-expression with the following format:

<S1, S2, add(S1,{TOKEN(T3), BLACK(T3), POSITION(2,2), NEIGHBOR(T3,T2)})>

This can be read as follows: The follow-up state S2 is generated out of the state S1 by adding to the state S1 the set of facts { … }.

This layout of a change expression can also be used if some facts have to be modified or removed from a state. If for instance  by some reason the white token should be removed from the situation one could write:

<S1, S2, subtract(S1,{TOKEN(T2), WHITE(T2), POSITION(2,1)})>

Another notation for this is S2 = S1 – {TOKEN(T2), WHITE(T2), POSITION(2,1)}.

The resulting state S2 would then look like:

S2 = {TOKEN(T1), BLACK(T1), POSITION(T1,1,1), CELL(C1), POSITION(1,2), FREE(C1)}

And a combination of subtraction of facts and addition of facts would read as follows:

<S1, S2, subtract(S1,{TOKEN(T2), WHITE(T2), POSITION(2,1)}, add(S1,{TOKEN(T3), BLACK(T3), POSITION(2,2)})>

This would result in the final state S2:

S2 = {TOKEN(T1), BLACK(T1), POSITION(T1,1,1), CELL(C1), POSITION(1,2), FREE(C1),TOKEN(T3), BLACK(T3), POSITION(2,2)}

These simple examples demonstrate another fact: while facts about objects and their properties are independent from each other do relational facts depend from the state of their object facts. The relation of neighborhood e.g. depends from the participating neighbors. If — as in the example above — the object token T2 disappears then the relation ‘NEIGHBOR(T1,T2)’ no longer holds. This points to a hierarchy of dependencies with the ‘basic facts’ at the ‘root’ of a situation and all the other facts ‘above’ basic facts or ‘higher’ depending from the basic facts. Thus ‘higher order’ facts should be added only for the actual state and have to be ‘re-computed’ for every follow-up state anew.

If one would specify a context for state S1 saying that there are two players and one allows for each player actions like ‘move’, ‘insert’ or ‘delete’ then one could make the change from state S1 to state S2 more precise. Assuming the following facts for the context:

  1. PLAYER(PB1), PLAYER(PW1), HAS-THE-TURN(PB1)

In that case one could enhance the change statement in the following way:

<S1, S2, PB1,insert(TOKEN(T3,2,2)),add(S1,{TOKEN(T3), BLACK(T3), POSITION(2,2)})>

This would read as follows: given state S1 the player PB1 inserts a  black token at position (2,2); this yields a new state S2.

With or without a specified context but with regard to a set of possible change statements it can be — which is the usual case — that there is more than one option what can be changed. Some of the main types of changes are the following ones:

  1. RANDOM
  2. NOT RANDOM, which can be specified as follows:
    1. With PROBABILITIES (classical, quantum probability, …)
    2. DETERMINISTIC

Furthermore, if the causing object is an actor which can adapt structurally or even learn locally then this actor can appear in some time period like a deterministic system, in different collected time periods as an ‘oscillating system’ with different behavior, or even as a random system with changing probabilities. This make the forecast of systems with adaptive and/ or learning systems rather difficult.

Another aspect results from the fact that there can be states either with one actor which can cause more than one action in parallel or a state with multiple actors which can act simultaneously. In both cases the resulting total change has eventually to be ‘filtered’ through some additional rules telling what  is ‘possible’ in a state and what not. Thus if in the example of figure 6 both player want to insert a token at position (2,2) simultaneously then either  the rules of the game would forbid such a simultaneous action or — like in a computer game — simultaneous actions are allowed but the ‘geometry of a 2-dimensional space’ would not allow that two different tokens are at the same position.

Another aspect of change is the dimension of time. If the time dimension is not explicitly specified then a change from some state S_i to a state S_j does only mark the follow up state S_j as later. There is no specific ‘metric’ of time. If instead a certain ‘clock’ is specified then all changes have to be aligned with this ‘overall clock’. Then one can specify at what ‘point of time t’ the change will begin and at what point of time t*’ the change will be ended. If there is more than one change specified then these different changes can have different timings.

THIRD PERSON VIEW

Up until now the point of view describing a state and the possible changes of states is done in the so-called 3rd-person view: what can a person perceive if it is part of a situation and is looking into the situation.  It is explicitly assumed that such a person can perceive only the ‘surface’ of objects, including all kinds of actors. Thus if a driver of a car stears his car in a certain direction than the ‘observing person’ can see what happens, but can not ‘look into’ the driver ‘why’ he is steering in this way or ‘what he is planning next’.

A 3rd-person view is assumed to be the ‘normal mode of observation’ and it is the normal mode of empirical science.

Nevertheless there are situations where one wants to ‘understand’ a bit more ‘what is going on in a system’. Thus a biologist can be  interested to understand what mechanisms ‘inside a plant’ are responsible for the growth of a plant or for some kinds of plant-disfunctions. There are similar cases for to understand the behavior of animals and men. For instance it is an interesting question what kinds of ‘processes’ are in an animal available to ‘navigate’ in the environment across distances. Even if the biologist can look ‘into the body’, even ‘into the brain’, the cells as such do not tell a sufficient story. One has to understand the ‘functions’ which are enabled by the billions of cells, these functions are complex relations associated with certain ‘structures’ and certain ‘signals’. For this it is necessary to construct an explicit formal (mathematical) model/ theory representing all the necessary signals and relations which can be used to ‘explain’ the obsrvable behavior and which ‘explains’ the behavior of the billions of cells enabling such a behavior.

In a simpler, ‘relaxed’ kind of modeling  one would not take into account the properties and behavior of the ‘real cells’ but one would limit the scope to build a formal model which suffices to explain the oservable behavior.

This kind of approach to set up models of possible ‘internal’ (as such hidden) processes of an actor can extend the 3rd-person view substantially. These models are called in this text ‘actor models (AM)’.

HIDDEN WORLD PROCESSES

In this text all reported 3rd-person observations are called ‘actor story’, independent whether they are done in a pictorial or a textual mode.

As has been pointed out such actor stories are somewhat ‘limited’ in what they can describe.

It is possible to extend such an actor story (AS)  by several actor models (AM).

An actor story defines the situations in which an actor can occur. This  includes all kinds of stimuli which can trigger the possible senses of the actor as well as all kinds of actions an actor can apply to a situation.

The actor model of such an actor has to enable the actor to handle all these assumed stimuli as well as all these actions in the expected way.

While the actor story can be checked whether it is describing a process in an empirical ‘sound’ way,  the actor models are either ‘purely theoretical’ but ‘behavioral sound’ or they are also empirically sound with regard to the body of a biological or a technological system.

A serious challenge is the occurrence of adaptiv or/ and locally learning systems. While the actor story is a finite  description of possible states and changes, adaptiv or/ and locally learning systeme can change their behavior while ‘living’ in the actor story. These changes in the behavior can not completely be ‘foreseen’!

COGNITIVE EXPERT PROCESSES

According to the preceding considerations a homo sapiens as a biological system has besides many properties at least a consciousness and the ability to talk and by this to communicate with symbolic languages.

Looking to basic modes of an actor story (AS) one can infer some basic concepts inherently present in the communication.

Without having an explicit model of the internal processes in a homo sapiens system one can infer some basic properties from the communicative acts:

  1. Speaker and hearer presuppose a space within which objects with properties can occur.
  2. Changes can happen which presuppose some timely ordering.
  3. There is a disctinction between concrete things and abstract concepts which correspond to many concrete things.
  4. There is an implicit hierarchy of concepts starting with concrete objects at the ‘root level’ given as occurence in a concrete situation. Other concepts of ‘higher levels’ refer to concepts of lower levels.
  5. There are different kinds of relations between objects on different conceptual levels.
  6. The usage of language expressions presupposes structures which can be associated with the expressions as their ‘meanings’. The mapping between expressions and their meaning has to be learned by each actor separately, but in cooperation with all the other actors, with which the actor wants to share his meanings.
  7. It is assume that all the processes which enable the generation of concepts, concept hierarchies, relations, meaning relations etc. are unconscious! In the consciousness one can  use parts of the unconscious structures and processes under strictly limited conditions.
  8. To ‘learn’ dedicated matters and to be ‘critical’ about the quality of what one is learnig requires some disciplin, some learning methods, and a ‘learning-friendly’ environment. There is no guaranteed method of success.
  9. There are lots of unconscious processes which can influence understanding, learning, planning, decisions etc. and which until today are not yet sufficiently cleared up.

 

 

 

 

 

 

 

 

AAI THEORY V2 – Actor Story (AS)

eJournal: uffmm.org,
ISSN 2567-6458, 28.Januar 2019
Email: info@uffmm.org
Author: Gerd Doeben-Henisch
Email: gerd@doeben-henisch.de

— Outdated —

CONTEXT

An overview to the enhanced AAI theory  version 2 you can find here.  In this post we talk about  the generation of the actor story (AS).

ACTOR STORY

To get from the problem P to an improved configuration S measured by some expectation  E needs a process characterized by a set of necessary states Q which are connected by necessary changes X. Such a process can be described with the aid of  an actor story AS.

  1. The target of an actor story (AS) is a full specification of all identified necessary tasks T which lead from a start state q* to a goal state q+, including all possible and necessary changes X between the different states M.
  2. A state is here considered as a finite set of facts (F) which are structured as an expression from some language L distinguishing names of objects (like  ‘D1’, ‘Un1’, …) as well as properties of objects (like ‘being open’, ‘being green’, …) or relations between objects (like ‘the user stands before the door’). There can also e a ‘negation’ like ‘the door is not open’. Thus a collection of facts like ‘There is a door D1’ and ‘The door D1 is open’ can represent a state.
  3. Changes from one state q to another successor state q’ are described by the object whose action deletes previous facts or creates new facts.
  4. In this approach at least three different modes of an actor story will be distinguished:
    1. A textual mode generating a Textual Actor Story (TAS): In a textual mode a text in some everyday language (e.g. in English) describes the states and changes in plain English. Because in the case of a written text the meaning of the symbols is hidden in the heads of the writers it can be of help to parallelize the written text with the pictorial mode.
    2. A pictorial mode generating a Pictorial Actor Story (PAS). In a pictorial mode the drawings represent the main objects with their properties and relations in an explicit visual way (like a Comic Strip). The drawings can be enhanced by fragments of texts.
    3. A mathematical mode generating a Mathematical Actor Story (MAS): this can be done either (i) by  a pictorial graph with nodes and edges as arrows associated with formal expressions or (ii)  by a complete formal structure without any pictorial elements.
    4. For every mode it has to be shown how an AAI expert can generate an actor story out of the virtual cognitive world of his brain and how it is possible to decide the empirical soundness of the actor story.