Cap the number of creatures in the world without removing the wrong ones
Hundreds of wandering animals slow a game down, but a cap that simply deletes the newest ones can wipe out the pet the player tamed an hour ago. This entry shows the AI how to choose who goes first and who must never go.
Why this works
Removal should follow what the player would miss least. What they care about is protected, what they cannot see goes first, and taking away only the excess keeps the change small. A fixed order also makes two runs behave the same, so the result can be tested.
When not to use it
A cap treats the symptom. If creatures pile up because they are made too fast or never leave, remove the cause by making fewer or letting them walk away. Also, in a game where every creature is a named character, a cap does not fit.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 21 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Cap the number of creatures in the world without removing the wrong ones" (read_entry too-many-creatures-which-to-remove) 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