.body
The bot's body, between 0 and 32000: a reserve worth 10 energy per point that sets its size and its weight.
Facts
- Address
- 311
- Name
.body- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Body, energy and state
- Written by
- The engine, in the actions phase, after the
.strbodyand.fdbodyconversions; also when giving birth, for the parent. You read it in the next cycle. - Cleared
- No: the engine rewrites it every cycle.
- Range
- 0 to 32000.
- Note
- In its first cycle of life the bot reads it as 0, whether you loaded it or it was just born.
- Mutations
- picked as a read (
*)
Body is the bot's second currency. Each point is worth 10 of energy: you load it with .strbody and spend it with .fdbody. In the meantime it isn't used to pay for anything, but it has effects:
- Size and weight. More body means a bigger bot (easier to see and to hit) and a heavier one (see
.mass). - Upkeep. If the simulation charges for body, holding it costs energy every cycle (see Energy, body and waste).
- Life. If body drops below 0.5, the bot dies even if it has energy.
- Reproduction. When reproducing, the child takes its percentage of the body (see
.repro); with less than 5 body there is no birth.
The engine publishes it at the end of the cycle, between 0 and 32000. In its first cycle of life a bot reads it as 0, whether you loaded it or it was just born: don't use it alone to decide anything serious in that cycle.
' Reproduces only when it has body to spare
cond
*.body 2000 >
start
50 .repro store
stopWhat it gained or lost in body in the last cycle is in .bodgain and .bodloss; the body of the bot you're facing is in .refbody.