DarwinBotsManual
Open the app EspañolES

Parameters: Dynamic costs

The multiplier that scales every cost, the adjustment that moves it by itself to steer the population toward a target, and the brake that makes everything free when few bots are left.

All the prices in the Parameters: Costs group are multiplied by one and the same number, Cost multiplier. This group has that multiplier and two mechanisms that move it by themselves while the simulation runs:

With the factory values both are off and the multiplier stays fixed at 1. The mechanism step by step, with the arithmetic, is in The cycle and the order of actions; here you get what each knob does and how to combine them.

Which population counts

Both mechanisms look at the same figure: the bots that are not vegetables (plus the vegetables, if you turn on Count vegetables too). The count arrives a couple of cycles late, so in the first cycles of a simulation it reads 0 even if the world is full.

The adjustment also compares that figure with the one from about a hundred cycles ago. It only raises the multiplier if the population, besides being above the band, has grown; and it only lowers it if, besides being below, it has dropped. If the population stays stuck at the same number as a hundred cycles ago, it adjusts anyway, but only after ten cycles of that.

How to use it

  1. Set prices in Parameters: Costs: if everything costs 0, moving the multiplier changes nothing.
  2. Pick the target population, the population you want to sustain.
  3. If you don't mind the population oscillating, leave a quiet band with Upper range (% of target) and Lower range (% of target).
  4. Turn on Dynamic cost adjustment.
  5. If the multiplier reacts too slowly or too abruptly, adjust Sensitivity.

Every cycle outside the band, the multiplier moves by 0.0000001 × (bots too many or too few, counted from the edge of the band) × Sensitivity. With the factory sensitivity (50) and 200 bots over a target of 100, it rises by 0.0005 per cycle: half a point every thousand cycles. It is a slow thermostat on purpose, because the population takes a while to respond to prices.

To see what the multiplier is worth at any moment, the classic interface shows it in its status bar (as CostX) when it isn't 1. Bots can't read it: they notice it in how fast their energy drops.

If the simulation is played in rounds (Parameters: Game modes (F1 / rounds)), the new round starts with the multiplier as the adjustment left it, not with the value you set at the beginning.

Dynamic cost adjustment

Raises or lowers the multiplier to steer the population to the target.

Default
no
Usual range
yes / no
Variable
USEDYNAMICCOSTS
Key
cost:56
Live
can be changed while the simulation runs
Mode
advanced only

Turns on the thermostat: from then on the engine adjusts Cost multiplier at the start of every cycle, before the DNA runs, so that same cycle is already paid at the new price. Turning it off leaves the multiplier where it was; it doesn't return it to its initial value. With the target population at 0 (as it comes), any population other than 0 is above the target, and turning it on only makes prices climb and climb.

Target population

Population the adjustment aims at.

Default
0
Usual range
0 to 32000
Variable
DYNAMICCOSTTARGET
Key
cost:53
Live
can be changed while the simulation runs
Mode
advanced only

The population, in bots, that the adjustment aims for. It counts only the bots that aren't vegetables, unless you turn on Count vegetables too. Without Dynamic cost adjustment on, it does nothing. Choose it with the size of the field and the amount of food in mind: if the world can't feed that many bots, the multiplier will drop to 0 and stay there.

Sensitivity

How fast the adjustment reacts.

Default
50
Usual range
0 to 1000
Variable
DYNAMICCOSTSENSITIVITY
Key
cost:55
Live
can be changed while the simulation runs
Mode
advanced only

How strongly the adjustment reacts: each step is 0.0000001 × the bots outside the band × this number. At 0, the thermostat is on but moves nothing. With very high values the multiplier shoots up in a few cycles and the population oscillates, because the engine keeps correcting before the bots have time to respond.

Upper range (% of target)

No-adjust band above the target.

Default
0
Usual range
0 to 1000
Variable
DYNAMICCOSTTARGETUPPERRANGE
Key
cost:57
Live
can be changed while the simulation runs
Mode
advanced only

A margin above the target, as a percentage of the target, within which the adjustment doesn't raise the multiplier. With the target at 200 and the margin at 10, the population can reach 220 without anything changing. What gets corrected is only the excess over the edge of the band, not over the target.

Lower range (% of target)

No-adjust band below the target.

Default
0
Usual range
0 to 1000
Variable
DYNAMICCOSTTARGETLOWERRANGE
Key
cost:58
Live
can be changed while the simulation runs
Mode
advanced only

The margin below the target, as a percentage of the target, within which the adjustment doesn't lower the multiplier. With the target at 200 and the margin at 25, the population can fall to 150 without prices dropping. With both margins at 0 (the factory value) the thermostat corrects with a difference of a single bot.

Count vegetables too

The target population includes vegetables.

Default
no
Usual range
yes / no
Variable
DYNAMICCOSTINCLUDEPLANTS
Key
cost:61
Live
can be changed while the simulation runs
Mode
advanced only

Adds the vegetables to the population that the adjustment and the brake count. It makes sense when the vegetables are part of what you want to regulate, for example in a world of only vegetables. If the vegetables repopulate themselves (see Parameters: Energy and vegetables), counting them makes the thermostat react to something the bots don't control.

Cost multiplier

Multiplies every cost (0 = free).

Default
1
Usual range
-1000 to 1000
Variable
COSTMULTIPLIER
Key
cost:54
Live
can be changed while the simulation runs
Mode
advanced only

The number by which all the costs in Parameters: Costs are multiplied: at 1 (factory value) prices are worth what they say, at 0 everything is free, at 2 everything costs double. Entered by hand, it can be negative and turn costs into payments: at −1, every store gives the bot energy instead of charging it. If the dynamic adjustment is on, the value you set is the starting point and the engine moves it from there.

Allow a negative multiplier

The adjustment may push it below 0.

Default
no
Usual range
yes / no
Variable
ALLOWNEGATIVECOSTX
Key
cost:62
Live
can be changed while the simulation runs
Mode
advanced only

Lets the dynamic adjustment take the multiplier below 0. Off (the factory value), the thermostat never goes below 0: in the worst case everything is free. On, if the population keeps falling, costs turn into payments and every action gives the bot energy. It is an extreme way of rescuing a population, and it also rewards the bots that spend the most.

Zero costs below population

Below this many bots nothing costs (-1 = off).

Default
-1
Usual range
-1 to 32000
Variable
BOTNOCOSTLEVEL
Key
cost:52
Live
can be changed while the simulation runs
Mode
advanced only

The threshold of the emergency brake: if the population drops below this number, the multiplier goes to 0 and nothing costs anything. The previous value is saved so it can be restored when the population exceeds the reinstatement level. It works even if Dynamic cost adjustment is off. At −1 (the factory value) it never acts, because the population can't be negative. Since the count reads 0 in the first cycles, with any positive value the simulation starts with costs at 0.

Reinstate above population

Costs return above this population.

Default
0
Usual range
0 to 32000
Variable
COSTXREINSTATEMENTLEVEL
Key
cost:59
Live
can be changed while the simulation runs
Mode
advanced only

The population that has to be exceeded for costs to come back after the brake has acted; the multiplier returns to the value it had before the brake. Set it above the brake threshold, to let the population recover before charging it again. If it is below, the brake and the reinstatement step on each other: in a test with 3 bots, the brake at 10 and the reinstatement at 0 (as it comes), costs were charged every other cycle.