.bodgain
How much body the bot gained in the last cycle; negative if it lost any.
Facts
- Address
- 194
- Name
.bodgain- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Gains and losses
- Written by
- The engine, in the actions phase of every cycle: the body now minus the body one cycle ago. You read it in the next cycle.
- Cleared
- Nobody; the engine rewrites it every cycle.
- Range
- −32000 to 32000; negative if the bot lost body.
- Mutations
- picked as a read (
*)
.bodgain is the body (.body) the bot has at the end of this cycle minus what it had at the end of the previous one. .bodloss is the same number with the sign flipped. It works like .pleas, but for body: the engine publishes it at the end of every cycle and your DNA reads what happened in the previous cycle.
Body grows mostly when the bot converts energy with .strbody (every 10 of energy gives 1 of body), and also a little when eating. It drops when the bot converts it back into energy with .fdbody or when it is attacked.
A bot placed at the start of the simulation reads all of its body as gain in its second cycle, just as with energy. The same happens with body for a newborn child (its energy, in contrast, starts without a jump), and the parent reads that body it gave up as a loss in .bodloss.
' stores the last body increase in cell 50
cond
*.bodgain 0 >
start
*.bodgain 50 store
stopWith 100 .strbody store the bot spends 100 of energy and, in the next cycle, reads .bodgain 10 and .pain 100.