Code center > Specialization, Metabolism, Digestions and Env Grid
General approach to metabolism
shvarz:
OK, I don't care about the exact mechanics of pooping. As long as there is stomach and enzymes are needed to absorb stuff, I am OK. These are details.
What about break/make commands?
PurpleYouko:
--- Quote ---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?
--- End quote ---
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
Botsareus:
(I'll try to prove my point again , good luck to me)
How about a three enzyme system, and one gas in the e-grid.
The Robots starts out Having enzymeA:
--- Quote ---cond
start
20
.useenzymeA
store
stop
--- End quote ---
It slowly eats up all the gas in the e-grid and mutates.
It cant have bouth enzymeB and enzymeC in the same time. ex:
--- Quote ---cond
start
20
.useenzymeB
store
20
.useenzymeC
store
stop
--- End quote ---
can't happen
then if it evolves to use enzymeB (e-grid gas ran out slowly)
we will have
--- Quote ---' Alga minimalis
'
' Vegetable
'
' This robot has a single gene,
' necessary for it to reproduce.
' Energy is given to it by the sun!!!,
' forget about the Fe#5!"autotroph" box.
cond
start
20
.useenzymeB
store
50
.repro
store
15
.aimdx
store
50 'no enzymeC so does not work
.up 'no enzymeC so does not work
store 'no enzymeC so does not work
-1 'no enzymeC so does not work
.shoot 'no enzymeC so does not work
store 'no enzymeC so does not work
stop
end
--- End quote ---
or it can evolve to use enzymeC (e-grid gas ran out slowly, time to eat the alga)
--- Quote ---cond
start
20
.useenzymeC
store
20 ' No way , enzymeC found so this does not work
.useenzymeB ' No way , enzymeC found so this does not work
store ' No way , enzymeC found so this does not work
20 ' Dam,it No more gas
.useenzymeA ' Dam,it No more gas
store ' Dam,it No more gas
50 'I hunt for food now.
.up 'I hunt for food now.
store'I hunt for food now.
-1 'I hunt for food now.
.shoot 'I hunt for food now.
store 'I hunt for food now.stop
end
--- End quote ---
But hey , thats only the simple and the programer frandly idea , who needs it right?
PurpleYouko:
It is too simple in many ways, you couldn't go far with only 3 enzymes. What we need are infinite variability of enzymes.
On the other hand it involves exactly what I am trying to avoid at all costs.
It make the DNA directly handle the mechanics of digestion.
I don't like that idea one little bit.
Digestion has to be automatic or every bot built without those specific controls will be unable to survive. This would efectively wipe out every existing robot completely. We would have empty league table and a bunch of pissed off bot-programmers.
<_< PY <_<
Botsareus:
Thats why you make the program "patch" every single bot to use a sertain enzyme in the bigging of the simulation.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version