Repository navigation
Conversation
Start the new simulation crate: an owned xoshiro256++ RNG, math routed through libm so results are bit-identical on every platform and in wasm, a pure-arithmetic atan2 for retina binning, a stateless feed-forward brain evaluator, the retina geometry and a counting-sort spatial hash. Commit Cargo.lock (the workspace ships binaries) and set release and dev profiles; opt-level 1 in dev keeps the numeric test suite fast.
Agents are struct-of-arrays so hot loops stream through memory and frames export as flat copies; removal swap-removes every column in lock step. A genome is brain weights plus four heritable body traits, each with bounds. Plants regrow logistically around slowly drifting patches. Config is a plain serde tree that rejects unknown fields and validates ranges with dotted-path errors; every field carries its unit in a doc comment. World::step runs sense, think, eat, move, metabolise, cull, reproduce, immigrate, regrow, each phase borrowing only the columns it needs. Energy pays for moving, seeing and living; a bird with enough energy reproduces, one with none dies, and a species that falls below a floor may receive immigrants with fresh genomes. Snapshots are postcard with a magic and version check. A golden checksum for seed 1 at tick 2000 pins behaviour.
A fixed-seed world with plenty of seeds, no reproduction, death or immigration, where one genome forages for a set number of ticks. The score is meals eaten, and the ratio of an evolved genome's score to a random one's is the learning metric CI gates on. An ignored slow test checks that 40k ticks of evolution beat random by a wide margin.
run writes per-tick stats as CSV or JSON lines and can save a snapshot; bench reports ms per tick at a chosen population; verify prints the world checksum for a seed and tick and optionally asserts it; arena evolves a few seeded worlds in parallel and fails below a learning ratio; config prints the defaults as JSON to edit and pass back with --config.
Lint and test on every push. The golden checksum test runs on Linux, macOS and Windows so a seed is proven to mean the same world everywhere, and the arena job fails if evolved sparrows stop out-foraging random ones.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Vercel's default runtime for this project reached end of life and preview builds started failing. The legacy site is untouched otherwise.
This branch was successfully deployed
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.
Adds the new simulation core and command-line tool under
crates/. The legacylibs/andwww/are untouched and still build, test and deploy; they are deleted once the browser app has replaced the site.What is in
crates/rustywings-core#![forbid(unsafe_code)],missing_docson.crates/rustywings-clirustywings run / bench / verify / arena / config.libmfor all transcendentals, no hash maps or threads inside a step. A golden checksum is pinned in the tests and CI runs it on Linux, macOS and Windows. Snapshots resume bit-for-bit.-D warnings,cargo test --workspace, cross-OS golden test and the arena learning test on every push.Numbers (native)
rustywings arena(30k ticks, 3 seeds)rustywings benchThe first defaults produced a predator overshoot that pinned herbivores to the rescue floor. A 22-variant sweep with the CLI found the adopted set.
Reviewing
crates/rustywings-core/src/world.rs(stepand the phase methods), thenarena.rs.cargo test -p rustywings-coreandcargo run --release -p rustywings-cli -- arena --seeds 3 --ticks 30000.Each commit builds and passes its tests on its own.