Drive wildlife with a deterministic controller recorded in the trace
M11.5d (ADR-0125): wildlife_intents gives each unowned cell a bud intent when it can fund one (at most once a second), else steers it to the nearest perceived food patch and feeds, else wanders. The cellular server puts these intentions into each tick's baseline, so replay and publication treat them like player input. fund_bud refuses a reserve short of the bare investment before scanning growth levels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,10 @@ std::expected<BudTransition, BuddingError> fund_bud(const Genome& genome, Growth
|
||||
invested_matter += mass.value;
|
||||
if (invested_matter == 0)
|
||||
return std::unexpected{BuddingError::no_capability};
|
||||
// The cost is at least the investment, so a reserve short of it refuses before the
|
||||
// growth scan (the same answer, without up to a thousand development derivations).
|
||||
if (!fits(investment, parent_reserve))
|
||||
return std::unexpected{BuddingError::insufficient_funding};
|
||||
|
||||
// The largest realized growth whose developed body fits the invested matter on every
|
||||
// channel. Bodies grow with realized growth, so the scan stops at the first fit.
|
||||
|
||||
Reference in New Issue
Block a user