I am confused. Again, how come "break" commands will override each other? Store commands don't.
You can say
1 2 store
3 4 store
5 6 store
Same here:
you have molecules called 1, 2, and 3
1 break
2 break
3 break
"break" command simply means decrease value in molloc (molecular location) 1, increase value in molloc 2
Works like this:
Before: 9 0 0 (these are values in mollocs 1, 2,3 correspondingly)
Cycle 2: 8 1 0
Cycle 3: 7 1 1
Cycle 4: 6 1 2
Should work, or am I dumb?
Hmm hadn't thought of it that way. Would that work I wonder?
Let's work through this logically.
The store command is an "operator" rather than a command
That is to say that it manipulates the stack and nothing else. That is how come we can use it multiple times in the genome, just like you can with inc, dec, add etc.
You can't do this with .refup or .mkshell or any of the sysvars.
Operators are scanned during DNA parsing and are used
only to manipulate values on the stack and in memory locations. Each robot's entire DNA file is parsed this way on each cycle.
At the end of the parsing cycle, the program passes the robot memory files over to the main loop which then acts on whatever value is now in each memory location.
At this stage the actual DNA is irrelevent since we only care about memory locations.
All actions are performed during this step of the program based
only on memory locations and the values in them therefore only one instance of a sysvar command can be executed per cycle.
Now could we put digestion into the DNA parser?
I think it would be
possible but it would be extremely difficult as the entire parsing engine would have to be changed quite dramatically so that it is able to recognise your new functions as operators instead of sysvars.
I could do it, but wouldn't it just be easier to add a small bank of sysvars which wouldn't involve any changes to the layout of the program wahtsoever?
How many molecules are we talking about here. If you want to add 100s then it will be worth changing the parser but if there are just 10 it will be so much easier to add a bank of sysvars.
:D PY :D