simulation of selforganization phenomena Rafał Sienkiewicz Gdansk University of Technology Gdańsk Poland 1 The DigiHive environment Main features physics programs ID: 783908
Download The PPT/PDF document "The particle method for" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
The particle method for simulation of self-organization phenomena
Rafał SienkiewiczGdansk University of Technology, Gdańsk, Poland
1
Slide2The DigiHive environmentMain features, physics, programs…
2
Slide3Basic features3An abstract environment designed
for artificial life simulations2 dimensional lattice with
periodic
boundary
conditions
Large
number
of
entities
called
particles
Particles
can
bond
together
forming a
complex
of
particles
At
a
higher
level
,
the
complexes
of
particles
may
be
interpreted
as a program
Slide4Physics4
Slide5Physics - particles5Particles are of 256
types, each particle is related to a set of attributes
(
e.g
. mass)
Particles
are
marked
with
velocity
and positionMoving and colliding according to simplified Newtonian mechanics (conservation of energy and momentum)Either elastic or inelastic collisions
Slide6Collissions 6
Slide7Physics - complexes7Two or
more particles form a complex of particles. Each
particle
can
bind
both
horizontally
(6
directions
) and
vertically
with other particles
Slide8Physics - complexes8Two or
more particles form a complex of particles. Each
particle
can
bind
both
horizontally
(6
directions
) and
vertically
with other particles
Slide9Physics - complexes9Two or
more particles form a complex of particles. Each
particle
can
bind
both
horizontally
(6
directions
) and
vertically
with other particles
Slide10Example – jet propulsion engine
10
Particles
Complex
of
particles
Slide11Example – jet propulsion engine11
Slide12Example – random structures12
Slide13Example – random structures13
Slide14Programs14
Slide15Programs15The structure of a complex
is interpreted as a program written in a declarative language
(
simplified
Prolog)
Slide16Programs16A program is able to selectively
create and remove bonds between particles
in
its
neighbourhood
Stage1:
searching
-
asking
about
the type of particle and state of its walls (is it bound, is it adjacent)Possibility of checking an optional condition
of
nonexistence
of a
particular
complex
or
particles
(
reaction
inhibitor)
Stage 2: acting - creating and removing bonds between found particles
Slide17Programs17Declarative language provides ”
softness” – small changes in program code should
result
in
small
changes
in
program
activity
No high level search and action instructionsThere are no global rules governing the programs (e.g. no fitness function specified)
Slide18Program example18program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1] bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5),
not(structure(1)), not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0] bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0] bound to V3
i
n SW, mark V4),
not(structure(3)).
structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).
action():– bind(V2 to V5 in SW)
Slide19Program commands 19Structure maintaing: program, action,
search, structure, notSearching: exists [type/not type
] [
bound
/
not-bound
/
adjacent
]
[i
n
dir
] [to
vx
], mark vAsk about: type, state of walls, relation to previously found particleNo information about position and velocityBacktracing
Action: bind,
unbind
,
move
Imperative
Slide20Program example20
Slide21Encoding stack21
…
P
ointer
1 and 2 (1 byte)
Specification
Action (1,1,0,0,×,×,×,×)
…
Direction
Pointers
(2) – 1
byte
Type
mask
Type
Specification
Exists
(0,0,1,1,×,×,×,×)
…
Program (1,1,1,1,×,×,×,×)
…
Slide22Encoding - specification22Exists
Action
0
– not
t
ype
1
-
type
00 - not
bound
01 –
adjacent
10 -
bound
10 – to
11 -
in
1 –
mark
1 bit
2
bits
2
bits
2
bits
1 bit
Unused
00 -
bind10 - move01 – unbind1 – to
1 - in4 bits2 bits1 bit
1 bit
Slide23Program example23program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
Slide24Program example24
program():– search(), action().
search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5),
not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3 in SW, mark V4), not(structure(3)).structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
Slide25Program example25program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5),
not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
i
n SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
Slide26Program example26program():–
search(), action().
search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
o
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
on SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
Slide27Program example27program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
Slide28Program example28program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
Slide29Program example29program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5),
not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3 in SW, mark V4), not(structure(3)).structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
Slide30Program example30program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
Slide31Program example31program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5),
not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3 in SW, mark V4), not(structure(3)).structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
Slide32Program example32program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
Slide33Program example33program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
V3
Slide34Program example34program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):–
exists([0,0,0,0,1,1,1,1] bound to V4 in S).structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
V3
V4
Slide35Program example35program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
V3
V4
Slide36Program example36program():–
search(), action().search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
Slide37Program example37program():–
search(), action().
search():–
structure(0).
structure(0):–
exists([0,0,0,0,0,0,×,×], mark V1),
exists([1,1,1,1,1,1,1,1]
bound to V1
i
n N, mark V2),
exists([0,0,0,0,0,0,0,0], mark V5), not(structure(1)),
not(structure(2)).
structure(1):–
exists([1,1,1,1,0,0,0,0]
bound to V2
i
n NW, mark V3),
exists([1,1,1,1,0,0,0,0]
bound to V3
in SW, mark V4), not(structure(3)).structure(3):– exists([0,0,0,0,1,1,1,1] bound to V4 in S).
structure(2):– exists([1,0,1,0,1,0,1,0]).action():– bind(V2 to V5 in SW)
V1
V2
V5
Slide38Levels of simulation38According to environment settings:
Particles behave like an ideal gasParticles form random
structures
(
complexes
)
Some
complexes
are
interpreted
as
the declarative programs, which are able to selectively create or remove bonds in their nearest space
Slide39Example of simulation39
Slide40Example of simulation40
Slide41Sample simulation: Snowflake41
Slide42Snowflake42
Slide43Snowflake43Set of 6 programs:P1: Builds a
seedP2: Builds a ringP3: Closes the ringP4:
Starts
building
a
stretching
arm
P5:
Builds
the
arm (started by P4 or P6)P6: Starts building a lateral arm
Slide44Snowflake – P1 (seed)44
Slide45Snowflake – P1(seed)45
Slide46Snowflake – P2 (ring)46
Slide47Snowflake – P3 (closed ring)47
Slide48Snowflake – P4 (streching arm)48
Slide49Snowflake – P4 (streching arm)49
Slide50Snowflake – P5 (building arm)50
Slide51Snowflake – P5 (building arm)51
Slide52Snowflake – P6 (lateral arm) 52
Slide53Snowflake – P6 (lateral arm)53
Slide54The universal constructor54
Slide55Von Neumann’s model 55A universal constructor
A A + φ(X) ⇒ A + φ(X) + X
Slide56Von Neumann’s model 56A universal constructor
A A + φ(X) ⇒ A + φ(X) + X A + φ(A) ⇒ A + φ(A) + A
Slide57Von Neumann’s model 57A universal constructor
A A + φ(X) ⇒ A + φ(X) + X A + φ(A) ⇒ A + φ(A) + AA general
copying
machine
B
B
+ φ(X) ⇒
B
+ φ(X) + φ(X)
Slide58Von Neumann’s model 58A universal constructor
A A + φ(X) ⇒ A + φ(X) + X A + φ(A) ⇒ A + φ(A) + AA general copying
machine
B
B
+ φ(X) ⇒
B
+ φ(X) + φ(X)
A
control
machine
C A + B + C + φ(A + B + C) ⇒ A + B + C + φ(A + B + C) + A + B + C
Slide59Von Neumann’s model 59A universal constructor
A A + φ(X) ⇒ A + φ(X) + X A + φ(A) ⇒ A + φ(A) + AA general copying
machine
B
B
+ φ(X) ⇒
B
+ φ(X) + φ(X)
A
control
machine
C A + B + C + φ(A + B + C) ⇒ A + B + C + φ(A + B + C) + A + B + CAdditional automaton D A + B + C + D + φ(A + B + C + D)
⇒
A + B + C
+ D
+ φ(A + B + C
+ D
)
+
A + B + C
+ D
Slide60The universal constructor 60Constructs
various (but not any possible) structures based on
its
description
from
an
information
string
(
stack
of
particles)Consistent set of programs being able to:Find a valid information string in the nearest spaceConnect itself
into
the
string
and start
the
translation
Sequentially
process
the string, building the desired structure (described in the information string)
Slide61The universal constructor61Works as an interpreter of simple
language, with the following instructions (
contained
in
the
information
string
):
PUT:
add
s specified particle to the stack,SPLIT: splits the currently built stack into two horizontally connected stacks of particles
NEW:
begins
construction of a
new
complex,
without
disconnecting
the
constructor
from the currently processed information string,END: disconnects the universal constructor from the information string, and stops the translation
Slide62Constructor program example62PUT(01010101)
PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide63Constructor program example63PUT(01010101)
PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide64Constructor program example64
PUT(01010101)PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide65Constructor program example65
PUT(01010101)PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide66Constructor program example66
PUT(01010101)PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide67Constructor program example67PUT(01010101)PUT(01010101)
SPLIT(NE)PUT(01010101)END
Slide68Structure of the information string68
END
XXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
Slide69String example69
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001
Slide70String example70
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001PUT(01010101)
Slide71String example71
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001PUT(01010101)PUT(01010101)
Slide72String example72
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001PUT(01010101)PUT(01010101)SPLIT(NE)
Slide73String example73
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001PUT(01010101)PUT(01010101)SPLIT(NE)PUT(01010101)
Slide74String example74
ENDXXXXXXXX
…
Direction
XXXXXXXX
SPLIT
header
XXXXXX11
…
Particle
type
XXXXXXXX
NEW
header
11111101
…
Particle
type
XXXXXXXX
PUT
header
XXXXXX01
11111111
01010101
00000001
00000010
000000110101010100000001
0101010100000001PUT(01010101)PUT(01010101)SPLIT(NE)PUT(01010101)END
Slide75Simulation example75
Universal constructor
Information
string
Particles
Slide76Simulation example76
Slide77Limitations77
Slide78Achieving the full universality78
Strategy 2Strategy 1
Slide79Snowflake – strategy 179The
shape of the ”snowflake” cannot be built
by
the
constructor
The
shape
can
be
obtained
as a
result of activity of a set of 6 building programsThe set of building programs can be build by the constructor
Slide80Snowflake – strategy 180
Information
string
Universal
constructor
Slide81Snowflake – strategy 181
Slide82Constructor duplication – strategy 2 82I
t is impossible to encode the constructor’s structure of bondsThe structure being built should not manifest any activity before it is completely
fi
nished
T
he universal constructor should not recognize the structure being built as a
part of
itself
The
best
approach
is to use the second strategy
Slide83Constructor duplication – strategy 2
83Information
string
Universal
constructor
Slide84Constructor duplication – strategy 2 84
Slide85Further research…85
Slide86Further research86Acceleration of executionFull
self-reproductionComparing various strategies of self-reproduction
Allowing
random
changes
(
physics
,
programs
, …)
…