An ANIMAT$ ^{0}$ Program

As discussed in the methodological remarks above (cf. [*]) it is helpful to have as one benchmark a system which is completely at random with regard to a parameter under investigation. Considering the ANIMAT as modeled by Wilson we propose such a completely random system ANIMAT$ ^{0}$ as an ANIMAT whose decisions are completely at random. There is no perception, no memory, there are no emotions, nothing but a virtual dice: the ANIMAT$ ^{0}$-system takes a random number from a uniform distribution to select one of the possible moves.

The sections of the technical Appendix 14.7 and [*] show two protocols of such a random ANIMAT$ ^{0}$ system.

The protocol in 14.7 shows for every cycle of the behavior of the $ ANIMAT^{0}$ system the actual position, the new proposed position by the random choice system, the evaluation of the new cell with regard to location (e.g. beyond the actual grid 'BB') and with regard to content (empty space '. := 00' or object 'O := 10' or food 'F := 11'). Depending from this a reward is announced according to a pre-wired fixed schema. No move is rewarded as '-1', move into an empty space with '-2' and move into a food cell with '+1000'. Only empty space and food cell enable an action. In all cases the final new position is updated and the actual reward is summed up to the overall reward counter.

-----CYCLE 1---------------------------------------------------

ACTUAL POSITION =(XO,YO) = (1, 1)

NEW POSITION PROPOSED=(XN,YN)= (2, 2)

contdecode: SIZE OF GRID (X,Y) = (3,3)
contdecode: YI= 2, X= 2
CONTENT OF NEW POSITION= 11

moveeval:REWARD = 1000, ACTION = 1

update ANIMAT: A-POS = (2,2), A-REW = 1000, A-REW-SUM = 1000

FOOD in CYCLE = 1

The command line which starts the simulation of the random $ ANIMAT^{0}$ system allows different settings.

-->ANIMAT(1)=1, ANIMAT(2)=1, CLASSIFIERS=[], MODE=0, YYMAX=0, XXMAX=0,S=-1, DISTANCE=1, RUNS=25, HISTORY=[], SHOW=1, GRID=[],[ANIMAT,HISTORY,GRID,FOOD]=liveR(ANIMAT,CLASSIFIERS,MODE,YYMAX, XXMAX, S, GRID,  DISTANCE, RUNS,HISTORY,SHOW)

With ANIMAT(1)=1, ANIMAT(2)=1 one tells the simulator in which position (X,Y) the $ ANIMAT^{0}$ system shall start. If not otherwise declared we will always start at the left-upper corner (1,1) of the grid. One possible graphical representation of a regular grid with distance $ \delta = 1$ and the $ ANIMAT^{0}$ system located at thew position (1,1) is given below:

!*  .  .  !
!         !
!.  F  .  !
!         !
!.  .  .  !

CLASSIFIERS=[] is a variable which is not valid for the random system.

MODE=0 says that the system will behave as a random agent $ ANIMAT^{0}$.

If one wants to use a a Wilson-type environment like the wood1-environment then one has to specify with these variable YYMAX=0, XXMAX=0 how many 'blocks' shall be generated: YYMAX=2, XXMAX=1 would say, that one wants two blocks with 5 rows each from 'up' to 'down' and 1 block with 5 rows from 'left' to right' (one can generate such an environment also separately with the command gridgen()):

-->YYMAX=2, XXMAX=1,[GRID]=gridgen(YYMAX,XXMAX)

!.  .  .  .  .  !
!               !
!.  O  O  F  .  !
!               !
!.  O  O  O  .  !
!               !
!.  O  O  O  .  !
!               !
!.  .  .  .  .  !
!               !
!.  .  .  .  .  !
!               !
!.  O  O  F  .  !
!               !
!.  O  O  O  .  !
!               !
!.  O  O  O  .  !
!               !
!.  .  .  .  .  !

The parameter 'S' is the 'overall' manager to tell, which kind of a grid shall be generated. S=-1 states that the function testgrid() shall generate a regular grid with a certain distance by [GRID]=testgrid(DISTANCE). In the above case the DISTANCE=1 calls for a regular grid with distance '1' from the border to the center. For the other options the the whole program in the techniocal appendix.

The parameter RUNS=25 says that the $ ANIMAT^{0}$ system shall try 25 actions and then stop.

The parameter HISTORY=[] is an internal variable which protocols all positions and rewards (see below). The 1st column gives the number of the cycle, the 2nd column notifies the different perceptions (-1 := beyond the grid, 0 := empty space, 1 := object, 2 := food), the 3rd and 4th columns give the new (XN, YN) coordinates of the agent position, and the 5th column sums up all rewards.

HISTORY  =
 
    1.     2.    2.    2.    1000.  
    2.     0.    1.    1.    998.   
    3.   - 1.    0.    0.    997.   
    4.     0.    1.    1.    995.   
    5.   - 1.    0.    0.    994.   
    6.     0.    1.    2.    992.   
    7.   - 1.    0.    1.    991.   
    8.     0.    1.    2.    989.   
    9.   - 1.    0.    1.    988.   
    10.  - 1.    0.    1.    987.   
    11.    0.    2.    3.    985.   
    12.    0.    3.    2.    983.   
    13.    0.    3.    2.    981.   
    14.    0.    3.    3.    979.   
    15.    0.    3.    3.    977.   
    16.    0.    3.    2.    975.   
    17.    0.    2.    1.    973.   
    18.  - 1.    3.    0.    972.   
    19.    0.    3.    2.    970.   
    20.  - 1.    4.    3.    969.   
    21.    0.    2.    3.    967.   
    22.    0.    1.    3.    965.   
    23.    0.    1.    3.    963.   
    24.  - 1.    2.    4.    962.   
    25.  - 1.    0.    3.    961.

The parameter SHOW=1 manages whether additional information shall be printed oput (=1) or not (=0).

The parameter GRID=[] is necessary if one wants to transmit a certain externally defined grid to the simulator (then the parameter S has to be set to S=2, otherwise the system will generate a grid by itself.

Gerd Doeben-Henisch 2012-03-31