Spielerando

Pick the nearest berry bush the gatherer can still bring home from

A gatherer with a limited amount of strength should only head for food it can reach and still walk back from. The way home costs something different from the way out, and doubling the trip is wrong. Here is the calculation.

Why this works

A trip out and back is not twice the way out, because the cost depends on which cells you step onto, and that changes with direction. Adding the real cost of each leg tells you whether the gatherer can still get home.

When not to use it

Skip it when the gatherer can camp out, find food on the way or be carried home, since the limit on the return then does not apply. It also adds little on flat, evenly priced ground, where doubling the one-way trip is close enough.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Pick the nearest berry bush the gatherer can still bring home from" (read_entry survival-forage-and-return-budget) 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