docs(simulation): continuous organism ecology design note (Phase 3, PR 1/5) - #92
Merged
Merged
Conversation
Locks the Phase 3 design before any engine code: organism model additions (parentIds, birthTick, reproductionCooldownRemaining, lastTurnMagnitude), derived (never stored) life stages, extended metabolism formula (turningCost, sensorCost; learningCost and environmentalCost deferred to their own phases), reproduction economics and the full ReproductionSystem algorithm (partner-required, no asexual fallback), the extended ReproductionAttemptedEvent, bounded historical-organism records via a new HistoryStore, an organism spatial index, new invariants, and HASH_SCHEMA_VERSION 1->2. Updates docs/simulation/update-order.md (reproduction's real reads/writes/emits, the two-index spatial stage, a new Life stages section) and determinism.md (schema version 2 table, keeping v1 for history). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design note first, matching how Phase 2 handled RNG/update-order changes and per the discipline doc's own trigger list ("changing the world update order", "adding a new resource or hazard model" analog, "changing the random-number strategy" analog). Locks the Phase 3 design before any engine code.
parentIds,birthTick,reproductionCooldownRemaining,lastTurnMagnitude); life stages as a pure, never-stored function of age; the extended metabolism formula (turningCost+sensorCostnow,learningCost/environmentalCostdeferred to Phases 5/6); full reproduction economics and theReproductionSystemalgorithm (partner required, no asexual fallback; only'no-partner'/'population-cap'failure reasons, since ineligible organisms silently don't "attempt"); bounded historical-organism records via a newHistoryStore(mirrorsEventLog); a second, organism-indexedSpatialHash; new invariants;HASH_SCHEMA_VERSION1 -> 2.docs/simulation/update-order.md: Reproduction's real reads/writes/emits, the "spatial" stage now covers two indices, a new "Life stages" section, the three-writerorganism.energynote (gain/metabolic cost/reproductive cost).docs/simulation/determinism.md: a versioned "7.3 Canonical stream, schema versions" section - v1 kept verbatim for history, v2 appends the new organism fields (incl.parentIdsas a length-prefixed id array) and the three reproduction metrics.Two behavioral forks were resolved with the project owner before this PR: reproduction requires a partner (no asexual fallback), and the metabolism formula gets
turningCost/sensorCostnow but notlearningCost/environmentalCost(their systems don't exist yet).Simulation impact
Determinism
Testing
Not applicable - documentation only, no code changed.
pnpm format:checkpasses on the touched files.Review notes
genomeId/health/alivefields, no species-aware "compatibility", no extinction policies beyond'stop'. Each is a real absence, not a stub, consistent with howReproductionSystemitself was left a genuine no-op rather than fake behavior.🤖 Generated with Claude Code