Let automatic buying leave enough behind to feed the town
A helper that buys or builds whenever it can afford to will happily spend the last grain and starve the town on the next turn. This entry keeps back what the next few turns will cost beyond the income, and counts how many units the rest can really pay for.
Why this works
A helper that spends everything it can afford ignores what is about to be needed. Keeping back only the gap between what goes out and what comes in is the smallest cushion that still protects the town, so the helper stays useful instead of timid.
When not to use it
Skip it when the player decides every purchase, or when running out is a lesson the game wants to teach. Also skip it for goods that never run short; a reserve there only holds back spending for no reason.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 19 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 "Let automatic buying leave enough behind to feed the town" (read_entry auto-buy-keeps-food-reserve) 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