QUOTE(Botsareus @ Nov 8 2007, 11:11 AM)
Lets say the robot does .dx .up and .shoot within a single condition...
start
*.nrg 1000 >
10 .dx store
10 .up store
-1 .shoot store
stop
Would be sufficient.
I have a better idea, just stay with me, it gets complex. I will start from a simpe example. Then intermediate. then advanced.
I use "A" thru "Z" as code fragments:
If "A" is a 'condition it means something like: *.nrg 1000 >
If "A" is a 'action it means something like: -1 .shoot store
If you don't understand, quote what part you don't understand and I will try to explain in detail.
Introducing a new command called "conditionless"
example1: simple
A 'action
B 'condition
C 'action
D 'action
conditionless
E 'action
F 'action
the top of the dna is automaticaly conditionless, therefor the above means in the old db:
cond
start
A
stop
cond
B
start
C
D
stop
cond
start
E
F
stop
example2: very long but intermediate
A 'condition
B 'condition
C 'action
D or 'condition
E 'action
F and 'condition
G 'action
conditionless
H 'action
I 'condition
J 'action
K 'action
L 'action
conditionless
M 'action
N 'action
O 'action
P 'condition
Q 'action
R or 'condition
S 'condition
T 'action
UU or 'condition
V or 'condition
W 'action
X 'condition
Y or 'condition
Z 'action
means in old db:
cond
A
B
and
start
C
stop
cond
A
B
and
D
or
start
E
stop
cond
A
B
and
D
or
F
and
start
G
stop
cond
start
H
stop
cond
I
start
J
K
L
stop
cond
start
M
N
O
stop
cond
P
start
Q
stop
cond
P
R
or
S
and
start
T
stop
cond
P
R
or
S
and
UU
or
V
or
start
W
stop
cond
X
Y
or
start
Z
stop
example3: advanced example
A 'condition
B 'condition
C and 'condition
D 'action
means:
cond
A
B
C
and
and
start
D
stop
example 3b:
A 'condition
B 'condition
C and 'condition
or
D 'action
means:
cond
A
B
C
and
or
start
D
stop
example4: more advanced example
A 'condition
B 'condition
C and 'condition
D 'action
or
E 'action
means:
cond
A
B
C
and
and
start
D
stop
cond
A
B
C
and
or
start
E
stop
example5: even more advanced example
A 'condition
B 'action
C 'condition
D and 'condition
E 'action
or
F 'action
means:
cond
A
start
B
stop
cond
C
D
and
start
E
stop
cond
A
C
D
and
or
start
F
stop
thank you for your time...