.light
How much light is left available in the field, from 0 to 32000: it drops as bots take up more surface.
Facts
- Address
- 923
- Names
.light,.availability- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Chloroplasts and light
- Written by
- The engine, in the actions phase: the part of the field that the bots do not cover. It is only recalculated during the day; at night it repeats the last value.
- Cleared
- No: the engine rewrites it every cycle.
- Range
- 0 to 32000: 32000 is an empty field.
- Note
- A freshly loaded bot reads it as 0 in its first cycle.
- Mutations
- picked as a read (
*)
It measures what part of the field is not covered by bots. The engine adds up the surface of all living bots, compares it with that of the field and publishes the remainder on the scale of 0 to 32000: 32000 is an empty field, and the more populated it is, the lower it goes. It is also called .availability.
It matters because photosynthesis depends on it: in a full field, each chloroplast yields less (see Chloroplasts and vegetables). It is a value for the whole field, not of where the bot is: everyone reads the same number, whether or not they are in the sun.
Two details:
- The engine only recalculates it in daytime cycles. At night (see
.daytime) it keeps publishing the last daytime value, even if the population has changed. - A freshly loaded bot reads it as 0 in its first cycle.
' Only buys chloroplasts if the field is not saturated
cond
*.light 24000 >
*.chlr 500 <
*.nrg 1000 >
start
100 .mkchlr store
stop