![]() |
![]() |
![]() |
![]() |
(..Table Part..) | Contents | Index | (..Table Part..) |
Before discussing a local rule table (short: table) as a whole, we are going to have a closer look at its components, the entries. A table is simply a listing with an arbitrary number of entries.
(This phrasing may lead to the impression that the order within the list is of no importance, but this is not right, as will soon be seen.)
The entries themselves conform to the following syntax:
|
Maybe it was already expected, but after having interpreted the names of
the two main parts, at the latest, it becomes rather clear that an entry is
nothing else than a conditional command, similar to an IF-THEN-ELSE structure.
Actually the structure of Entry is
not quite so strict, but we are
going to see that in detail later.
Nevertheless the condition part of
Entry has always got
- although sometimes only indirectly - a
boolean expression, which causes the
devices of the Consequence part to be
executed if it is TRUE,
and to be skipped otherwise.
In our model, a cell can assume three possible states:
SIGMA firing_neurons; DIMENSION 2; REGISTER INT state; NEIGHBOUR center : ( 0, 0); left : (-1, 0); left_lower : (-1,-1); right : ( 1, 0); right_lower : ( 1,-1); lower : ( 0,-1); left_upper : (-1, 1); upper : ( 0, 1); right_upper : ( 1, 1); VAR INT sum; BORDER {0}; TABLE /* 1. entry */ center.state > 0; /* Condition */ : state++; state %= 3; : /* Consequence */ /* 2. entry */ center.state==0; /* Condition */ sum=(left.state&1) + (right.state&1) + (lower.state&1) + (upper.state&1) + (left_lower.state&1) + (right_lower.state&1) + (left_upper.state&1) + (right_lower.state&1); sum>=3; : SELF = {1}; : /* Consequence */ |
Source Code: neurons.sdl
![]() |
![]() |
![]() |
![]() |
(..Table Part..) | Contents | Index | (..Table Part..) |