Welcome To Darwinbots > Newbie

zerobot sim

<< < (3/4) > >>

shvarz:
Maybe it's just me, but I tried using

300 inc

and that did not work for me.  You need the start command

start
300 inc

So, I think starting with just "0 0" is not going to work at all.

EricL:
It's not you.  You are exactly correct.

The finite state machine that handles DNA execution gets initialized to be in the 'clear' state before beginning the execution of each bot's DNA which basically means that everythig in the DNA will be ignored until some flow control statement is encounterred which toggles the FSM's state into one of the three other FSM states:  'cond', 'body' or 'bodyelse'.  Boolean operations only work in the cond state, store operations (including inc and dec) only work in the body or bodyelse states.

So, currently the minimal zero bot must have three 0's and the smallest possible replicator I can think of will be either

start 300 inc

or

else 300 inc ' the else statement also toggles the FSM into a state where stores can be performed.

I stand corrected.

We could decide to make the inital FSM state the 'body' state, which would allow

300 inc

to work.  But as it stands, only the DNA that follows a flow control statement will do anything.

Sprotiel:

--- Quote from: EricL ---else 300 inc ' the else statement also toggles the FSM into a state where stores can be performed.
--- End quote ---
This one doesn't work: cond flag is initialised to True.

EricL:
Ah, yes.  I stand corrected (again).

Light:
so should one start a zero bot sim with 'start 0 0 0 0 0 0 0 0' or just '0 0 0 0 0 0 0 0'?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version