You are on page 1of 5

Self-organized Complexity in Computer Program Ecosystem

Shinichiro Yoshii, Satoshi Ohashi, and Yukinori Kakazu


Complex Systems Engineering, Hokkaido University
N-13, W-8, Kita-ku, Sapporo 060, Japan
{yoshii, ohhashi, kakazu}@complex.eng.hokudai.ac.jp
Abstract
This paper describes self-organized complexity of an
ecosystem consisting of computer programs that ex-
hibit life-like behavior. As an artificial life approach
to simulating the life-like behavior on a computer, at-
tention should be given to the emergent dynamics by
which a new action is brought forth. In considering
how to implement such a notion onto a computer, it
could be interpreted as the generation of a new algo-
rithm, or the generation of a new code establishing a
mapping between a symbol and an information. This
paper discusses complex behaviors in our artificial-life
system named PROTEAN, that is an ecological model
consisting of Turing machines as a platform on which
to simulate the emergent dynamics of computer pro-
grams. Although the system is not provided with any
particular mechanism for self-reproduction, the system
is self-organized so that the system constituents can
utilize their environments for survival. For the ap-
proaches emphasizing simulations on a computer, it is
important to understand an emergent process from the
viewpoint of computational complexity. Using this
ecosystem model, this paper demonstrates how com-
puter programs may be able to achieve life-like behav-
ior, and discusses the relation with their self-organized
complexity.
1 Introduction
Even if we don't have a strict definition of life, we can ob-
serve life-like properties in various phenomena, such as in-
crease of complexity, adaptiveness, and emergence. In fact,
the notion of emergence itself is also difficult to define in a
way that distinguishes simply quantitative changes from
those cases where something really new emerges. In this
paper, we should formalize it as the appearance of a new ac-
tion or agent as the realization of that action.
In this context, most simulation models for life-like be-
havior are unable to realize the emergence of new actions.
Rather than modeling a process whereby something really
new emerges, those models seem to focus on the implemen-
tation and simulation of particular aspects of life-like adap-
tive behavior. This arises from the process by which these
systems are modeled to meet a specific purpose. On the
other hand, to further our understanding of mechanisms that
exhibit truly life-like behavior, attention should be given to
the modeling of an emergent process whereby new actions
may be brought forth. Life-like behavior should be under-
stood as the result of complex relations brought about by
the emergence of new actions, rather than beginning with
the application of a specific scheme designed to simulate a
certain phenomenon.
In implementing this onto a computer, it could be inter-
preted as the generation of a new algorithm within a com-
puter program and the generation of a new code establishing
mapping between a symbol and an information. This paper
discusses life-like adaptive behaviors of an ecological model
consisting of computer programs described by Turing ma-
chines. A Turing machine is a mathematical model of com-
puting or algorithms, enabling any computational procedure
that we know today to be described. In particular, we use a
universal Turing machine (UTM), that, depending on its
program, can simulate any other Turing machine's opera-
tion. In PROTEAN, computer programs are decoded onto
the UTM, where they interact with each other by performing
their various functions. Through computer simulations,
this paper demonstrates how computer programs may be
able to achieve self-organization, resulting in life-like behav-
ior. Furthermore, in order to understand those behaviors of
computer programs, we have to take their computational
complexity into account. This paper discusses unpredictable
population dynamics from the viewpoint of the computa-
tional complexity, that would be correspondent to those be-
haviors bounded with energy in the physical systems.
2 PROTEAN: Turing Machine Ecosystem
PROTEAN (Platform on Recursive Ontogenetic Turing-
machine Ecosystem for Autopoietic Networks) is an emer-
gent system aimed at simulating autopoietic behaviors of
computer programs described in a form of Turing machine.
In PROTEAN, survival games take place on the UTM, with
ecological resources being competed for. The essential fea-
tures of PROTEAN are the representation of a UTM, the in-
teraction procedure between constituents, and the constitu-
tion of the system as a whole. For more details about
PROTEAN, refer to (Yoshii and Kakazu 1998) or our web
site at http://junji.complex.eng.hokudai.ac.
jp/export/yoshii/WWW/index.html.
Universal Encoding of Algorithms for UTM
Conceptually speaking, PROTEAN has the capability of de-
scribing and producing any kind of computer program in the
form of Turing machines due to the utilization of a UTM
that reads bit strings. A tape for the UTM is nothing more
than the coded version of a Turing machine that performs the
task desired of the UTM. We can regard a tape as a genotype
that encodes the Turing machine's functionality.
Ecological Resources
Figure 1 shows the ecosystem which consists of the descrip-
tion tapes of the Turing machines. Its total resource is a
static volume of memory, while a Turing machine itself can
make use of an almost infinite memory capacity in its func-
tioning. Each Turing machine occupies its own memory
block, dependent on its description length.
Interaction between Turing Machines
Figure 2 illustrates an overview of such an interaction.
First, a genotype g
n
is decoded into a phenotype, that is, a
specific Turing machine T
n
, through interpretation by the
UTM. Next, the decoded Turing machine, T
n
, reads and op-
erates on another genotypic machine description, g
m
. The
newly generated genotype will dictate a new Turing ma-
chine, or in other words, a new algorithm. This means that
such an interaction can realize a process whereby a program
can directly operate on the description of another program to
generate a new algorithm.
Figure 1: Ecological Resource.
Figure 2: Interaction between Turing machines.
interaction
g
m
other machine's genotype
calculation result
decode
genotype
g
n
classifier template
scan and modify
new genotype
template
matching
T
n
TM
classifier operation
00
01
10
11
insert
delete bit
insert
flip bit
0
1
operations for
template matching
Parallel Processing against Halting Problem
The way interaction takes place in PROTEAN is based on
the technical assumption that an algorithm is a definite step-
by-step procedure guaranteed to terminate after a finite num-
ber of steps. However, in fact, there is no way to tell in ad-
vance whether a Turing machine will accept its input tape or
not. In order to avoid this insoluble problem, known as the
halting problem, PROTEAN adopts parallel processing and
compulsory termination: Each Turing machine reads the
other machines' descriptions chosen at random. When a Tur-
ing machine accepts a tape and some partition is vacant, the
parent Turing machine allocates a memory block for its
child there. On the other hand, if another machine or ma-
chines have already occupied that memory block, the parent
can terminate their interaction process and rewrite the mem-
ory. As a result, those machines that face the halting prob-
lem are eliminated from the ecosystem.
Characteristics of the Model
Some of the properties of our model may be regarded as be-
ing similar to those of Tierra (Ray 1991) or other evolution-
ary models which use bitstrings (Banzhaf 1994) (Ikegami
and Hashimoto 1995). However, the following points make
PROTEAN stand out from former works:
First, there are no arbitrary rules for self-organization or
self-reproduction, as well as no special metaphor. Even how
an interaction is interpreted, and what kind of result will be
obtained, are not predictable beforehand, but deterministi-
cally dependent on the interaction between Turing machines.
Furthermore, the interaction takes place independent of the
location at the ecological resource, unlike avida (Adami and
Brown 1994) and COSMOS (Taylor and Hallam 1997) that
simulate life-like behaviors of computer programs on 2D
cellular environment. Second, there are no explicit parame-
ters to control the dynamics, such as, a parameter which
would reap constituent machines in the system if the mem-
ory filled up to some specified level. The sole condition for
a Turing machine to survive is its being able to accept its
local resource more effectively than the others, and self-
reproduce, where possible. Consequently, the fitness of each
machine is dependent dynamically on its relation to the oth-
ers within the system and the consequent global environ-
ment thereof. Thus, the problem of ill-defined machines be-
coming stuck is also left up to the system's dynamics, by
which they will be eliminated from the ecosystem.
3 Computer Simulations
Emergence of Self-assembling Network
This section simulates the self-reproductive dynamics that
resulted in the emergence of self-assembling network of the
Turing machines. The first computer simulation started
from a configuration with the five kinds of description tape
described in Figure 3, and adopted a 100-adic notation sys-
tem for their long descriptions, using 100 characters such as
Figure 3: Turing machines in 100-adic notation in
simulation.
104790334567012094918987
787669631606031840130424
961205923546330545879
09007440981422695146
6887979934138331677239795334302
176610
decimal notation
100-adic notaion
80076110740280976748880381
16703820489388652712812874
Figure 4: Emergence of self-assembling network.
a)
a)
b)
c)
b)
d)
machine
tape
Figure 5: Change in number of constituent Turing
machines in self-assembling network.
0
5
10
15
20
25
30
0 10 20 30 40 50
step
n
u
m
b
e
r

o
f

T
u
r
i
n
g

m
a
c
h
i
n
e
s
"A,

K,Y,a,

K,y,A,

K,Y,a,

K,y", as their length
didn't allow representation in decimal notation.
Figure 4 illustrates the reaction pathways between the
Turing machines. These figures are abbreviations as their
total size doesn't allow full inclusion here. Each number in
this figure is the description tape of a Turing machine de-
scribed in the 100-adic notation. Figure 4 a) shows Turing
machine

T
KwpiuRBUtqomdbTNQGDSpNEY
reproduced itself by reading the
description tapes, such as BCWugcLPfWyQjFVNPtHlSVd, that
had been generated from other interactions. On the other
hand, these Turing machines generated new description tapes
dictating new Turing machines, one after another. It should
be noted here that almost all kinds of Turing machines
shown in Figure 4 are those that didn't originally exist in
the initial configuration, but were newly generated through
interactions.
Look at the reaction networks, such as Figure 4 a), b),
and c). These denote the growth of altruistic networks,
where the initial Turing machines generated new Turing ma-
chines, one after another, through their interactions. "Altru-
istic", here, means that the growth of these networks was of
no benefit to their generators. From the exoscopic view-
point, they seem to self-assemble into these subsequent
networks by their accepting the changing ecological re-
sources. Thus, Turing machine

T
KwpiuRBUtqomdbTNQGDSpNEY
, for ex-
ample, disappeared because of its accepting the resource and
generating other machines that could utilize the resource
more effectively, as seen from Figure 5. Figure 5 shows a
change in the number of certain specific representative Tur-
ing machines, concentrating on the earlier dynamics of the
ecosystem where more interesting behavior was observed.
Up to about the 20th step, various Turing machines ap-
peared and disappeared. Finally, the reaction network shown
in Figure 4 d) emerged in the ecosystem. This reaction net-
work is very interesting in respect to the following points:
first, it consists of various kinds of self-reproductive net-
work; and, second, the constituent Turing machines also be-
haved as tapes that were made use of by other interactions.
Thus, in total, the self-assembling network forms a large
and complicated hypercycle (Eigen and Schuster 1977) con-
sisting of various Turing machines.
Self-organized Complexity in Ecosystem
It is important to see the behavior simulated, from the
viewpoint of the complexity in an algorithm. This section
examines how the complexity of the system may be able to
self-organize.
Figure 6: Self-organized complexity of Turing machines.
7
8
9
10
8 9 10 11 12
time complexity
s
p
a
c
e

c
o
m
p
l
e
x
i
t
y
step 0
step 40
step 200
step 180
7
8
9
10
8 9 10 11 12
time complexity
s
p
a
c
e

c
o
m
p
l
e
x
i
t
y
Figure 7: Decoded Programs of Turing machines.
225406852230
781770707460
011234601812
0_0 -> 0_0 R
0_1 -> 1_1 R
1_0 -> 0_0 R
1_1 -> 2_0 R
2_0 -> 3_1 R
2_1 -> 2_0 R
3_0 -> 0_1 STOP
3_1 -> 2_0 L
4_0 -> 4_1 L
4_1 -> 2_1 L
5_0 -> 3_1 R
5_1 -> 2_0 R
6_0 -> 0_0 R
6_1 -> 1_1 R
7_0 -> 0_1 R
7_1 -> 1_1 R
8_0 -> 0_0 R
8_1 -> 1_1 R
9_0 -> 0_0 R
0_0 -> 0_0 R
0_1 -> 1_1 R
1_0 -> 0_0 R
1_1 -> 2_1 R
2_0 -> 3_0 L
2_1 -> 2_1 R
3_0 -> 0_1 STOP
3_1 -> 4_0 R
4_0 -> 5_1 L
4_1 -> 4_1 L
5_0 -> 6_0 R
5_1 -> 2_1 R
6_0 -> 0_0 R
6_1 -> 7_1 R
7_0 -> 3_1 R
7_1 -> 7_0 R
decimal
notation
:
563487608903
814309058851
42051108524
Figure 8: Mutually self-reproductive hypercycle.
225406852230
781770707460
011234601812
563487608903
814309058851
42051108524
Figure 9: Population dynamics on change in number.
0
50
100
150
200
250
0 20 40 60 80 100
563487608903
814309058851
42051108524
225406852230
781770707460
011234601812
step
n
u
m
b
e
r

o
f

T
u
r
i
n
g

m
a
c
h
i
n
e
s
0
50
100
150
200
250
0 100 200 300 400
563487608903
814309058851
42051108524
225406852230
781770707460
011234601812
step
T
1812
: T
8524
= 2 : 1 T
1812
: T
8524
= 1.5 : 1 initial condition:
Table 1: Domination ratio by Turing machine T
8524
.
initial population ratio
225406852230
781770707460
011234601812
563487608903
814309058851
42051108524
:
domination ratio
1:1
2:1
5:1
4/4
3/4
2/6
100%
75%
33%
563487608903
814309058851
42051108524
It is possible to define the degree of complexity of a Tur-
ing machine by measuring the amount of resources required
to execute its function, even though this is based on the as-
sumption that a difficult computation will require more re-
sources than a less difficult one. According to one definition
(Brookshear 1989), complexity of a Turing machine is char-
acterized by the following properties: time complexity
means the amount of time required to perform a computa-
tion, which will correspond to the steps of a head moving in
the case of a Turing machine. On the other hand, space
complexity refers to the amount of storage space required by
a computation. The space complexity of a Turing machine
is defined as the number of tape cells required.
Thus, Figure 6 shows the transition of correlation be-
tween both complexities, with respect to the average number
of constituent Turing machines in the above simulation.
These figures indicate that the averaged complexity of con-
stituent Turing machines increases and self-organizes to a
certain attractor. Finally, as long as there emerges a stable
self-reproductive hypercycle, the complexity of the system
will not expand ad infinitum, or rather it will fluctuate
within a certain boundary. This helps us to predict to what
kind of point the system will reach. Moreover, such a mea-
surement of the complexity enables us to understand an un-
predictable behavior.
Population Dynamics Dependent on Calculation
Complexity
Interactions based on the complexity in calculation, some-
times, bring about phenomena contrary to our expectations.
This section examines how the calculation complexity in
Turing machine affects the population dynamics of self-
reproductive hypercycle network.
The computer simulation here utilized two Turing ma-
chines shown in Figure 7. In order to simplify their descrip-
tion, we call the left Turing machine, T
8524
, while the right
one is called T
1812
, after the numbers of lower four figures
in their decimal genotypic descriptions. These Turing ma-
chines are characterized by the following point: both Turing
machines can self-reproduce by reading its description tape as
well as the other's description, as shown in Figure 8. There-
fore, the interaction between these Turing machines forms
such a mutually self-reproductive network.
The left diagram in Figure 9 indicates a change in the
number of these Turing machines in the case where the
numbers of T
1812
and T
8524
are in the ratios 1.5:1; while the
right in Figure 9 in the ratios 2:1. As the simulation time
steps proceed, T
8524
superseded the other Turing machine
T
1812
in both cases. These results didn't necessarily occur
accidentally. Table 1 indicates the percentage of victories of
T
8524
, to the total number of matches. As can be seen from
Table 1, Turing machine T
8524
dominated the ecological re-
source with the considerably high possibilities, even if there
were more Turing machines T
1812
than T
8524
in the initial
condition. Such situations are related with the calculation
complexity of constituent Turing machines. Table 2 indi-
cates the costs required for each interaction. For example,
when Turing machine T
8524
operates on the description tape
for T
1812
, Turing machine T
8524
makes use of 4 states
within its 19 states, and it takes 15 steps to accept that tape.
It follows from these results that a Turing machine
whose time complexity is larger is disadvantageous for its
Table 2: All the costs concerning interaction.
14
10
23
10
machine
tape
563487608903
814309058851
42051108524
225406852230
781770707460
011234601812
563487608903
814309058851
42051108524
225406852230
781770707460
011234601812
n
u
m
b
e
r

o
f

s
t
a
t
e
n
u
m
b
e
r

u
s
e
d

i
n

i
n
t
e
r
a
c
t
i
o
n
t
i
m
e

c
o
m
p
l
e
x
i
t
y
s
p
a
c
e

c
o
m
p
l
e
x
i
t
y
16 8 34 16 21 8
19 15 4 19 15 4
n
u
m
b
e
r

o
f

s
t
a
t
e
n
u
m
b
e
r

u
s
e
d

i
n

i
n
t
e
r
a
c
t
i
o
n
t
i
m
e

c
o
m
p
l
e
x
i
t
y
s
p
a
c
e

c
o
m
p
l
e
x
i
t
y
survival in our ecological model. The reason for that is a
Turing machine with larger time complexity is more likely
to be terminated by other Turing machines during its opera-
tion. As a result, such a Turing machine loses a chance for
self-reproduction. This kind of situation is unpredictable be-
forehand, because no one can tell in advance whether a Tur-
ing machine will accept its input tape or not. In fact, the
time complexity defines a kind of adaptivity to each Turing
machine, from the viewpoint of speed of tape acceptance.
On the other hand, the space complexity becomes impor-
tant when the ecological resource contains many kinds of
constituent Turing machine. The space complexity is cor-
relative with the length of a tape of the calculation output.
It means a Turing machine, whose space complexity is
smaller, outputs a shorter output tape. Therefore, such a
machine tends to modify its reproduced description tape dur-
ing the pattern matching procedure after its interaction, re-
sulting in generating a genotype different from its own
genotypic description tape. Even if it can accept its input
tape, there is a less possibility where it can self-reproduce.
Although this simulation didn't explicitly show such a rela-
tion between self-reproduction and the space complexity, a
Turing machine has to accept many kinds of tape with a
smaller time complexity and a larger space complexity in
order to self-reproduce for its survival. Thus, from these
discussions, one general point regarding the adaptivity be-
comes clear: the small time complexity is necessary for the
short-term adaptation, and, on the other hand, the large space
complexity tends to benefit the long-term adaptation.
4 Discussion and Conclusion
This section discusses the obtained simulation results from
the viewpoint of the life-like behavior of computer pro-
grams. PROTEAN has nothing special added whatsoever for
achieving either self-reproduction or self-organization. Nev-
ertheless, we were able to observe some interesting behavior
in the computer simulations.
These Turing machines behaved as real computer pro-
grams, processing information, or, as data, providing infor-
mation. Although their description tapes as data showed al-
truistic behavior, they could survive when a parasitic rela-
tion, in which they were produced from other reactions, was
possible. However, in PROTEAN where there is no static
fitness function, such a relation is actually fragile, as their
fitness is dynamically dependent on their relations to others
and the consequent environment thereof. Thus, the system
continues to transit up to a certain point where stable self-
reproductive networks may be achieved. The constituent
Turing machines are highly adaptive from the viewpoint of
their capability to utilize and accept their surrounding re-
sources. The Turing machines read, stored, and interpreted
information in their environment, and then, exhibited au-
topoietic dynamics. Macroscopically, "autopoietic" means
those dynamics that result from the transformation of self-
reproductive networks. This self-assembling aspect is of
central importance in understanding of life-like behavior.
Since there is no mutative operation in our ecological
model in its present form, the final version of this self-
reproductive network shows no further change. However, it
might be possible to realize boundless evolution, if a muta-
tive process was being operated. In this paper, we didn't ex-
amine such a situation as we intended to discuss an emergent
system consisting of computer programs representing the
step-by-step deterministic procedure of an algorithm.
This paper also discussed these dynamics from the view-
point of the complexity in calculation. In fact, there is
room for further investigation. However, we think it is nec-
essary to simulate life-like behavior, taking the complexity
in calculation into account. Although a simulated phe-
nomenon on a computer is usually free from energy unlike
the real physical systems, we believe the nature of life lies
in the relations between information and the calculation
complexity. Our future work will aim at studying the rela-
tion between emergent behaviors and their complexity for
processing information in PROTEAN.
References
Adami, C. and Brown, T. 1994. Evolutionary Learning in
the 2D Artificial Life System 'Avida'. Artifical Life IV.
The MIT Press. 377-381.
Banzhaf, W. 1994. Self-organization in a System of Binary
Strings. Artificial Life IV. The MIT Press. 109-118.
Eigen, M. and Schuster, P. 1977. The Hypercycle: A Prin-
ciple of Natural Self-Organization. Naturwissenschaften
64.
Ikegami, T and Hashimoto, T. 1995. Coevolution of Ma-
chines and Tapes. Advances in Artificial Life. Springer.
234-245.
Ray, T. S. 1991. An Approach to the Synthesis of Life. Ar-
tificial Life II Proc. Vol. X. Addison-Wesley. 371-408.
Taylor, T. and Hallam, J. 1997. Studying Evolution with
Self-replicating Computer Programs. Fourth European
Conference on Artificial Life. The MIT Press. 550-559.
Yoshii, S. and Kakazu, Y. 1998. Self-Assembling Networks
of Computer Programs. Journal of Robotics and Au-
tonomous Systems. Elsevier (to be appeared)

You might also like