Spielerando

A farm that should make 0.4 grain a second shows zero forever

Small production rates disappear when the game rounds every tick on its own. This entry gives your AI a counter that keeps the leftover between ticks, gives exact numbers after a pause too, and avoids the odd results of decimal math.

Why this works

Whole items need whole counts, but rates are fractions. Carrying the remainder forward makes the long-run total exact, and doing the carrying in thousandths removes float surprises that would otherwise leak a unit now and then.

When not to use it

Skip it if production is meant to come in batches, such as one crate every ten seconds. A timer that fires once is simpler and easier to explain to a player.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 17 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A farm that should make 0.4 grain a second shows zero forever" (read_entry strategy-farm-makes-less-than-it-should) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP