Explorables + WASM playground for evo.fugue.run (real crate in the browser) - #14
Merged
Conversation
…l from rayon - crates/fugue-evo-wasm/src/explore.rs: seeded step()-based engines (ExploreGa, ExploreCma, ExploreNsga2, ExploreIsland, ExploreUmda) plus landscape grid/info helpers, streaming real algorithm state as JSON for the explorable docs widgets (evo #12/#13) - algorithms::island now compiles without the parallel feature (sequential fallback over the same per-island RNGs, bit-identical seeded results) - Cargo.toml: 0.1.1, documentation + homepage metadata (fixes the missing crates.io Documentation link); CHANGELOG cut for 0.1.1; api-docs.md now links live docs.rs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
- fugue-viz.js/css copied from fugue (shared foundation), navy theme, fugue-evo-wasm-loader.js publishing FV.wasmReady - docs.yml builds the wasm pkg and serves it at <site>/pkg/ - playground.md + SUMMARY entry; explore-engine section in how-to/wasm.md; api-docs.md links live docs.rs - widget embeds with captions across getting-started, tutorials, how-tos, and reference pages (ga-anatomy, cmaes-ellipse, nsga2-front, island-migration, umda-contract + five ambient minis) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
- docs/viz/{landscape,cmaes,nsga2,island,inline,playground}.js: six widget
files registering ga-anatomy, umda-contract, cmaes-ellipse, nsga2-front,
island-migration, five ambient minis, and the evo-playground - all
compute via FV.wasmReady on the real crate (data-fugue-backend attr for
automated tests; .fv-pg-notice fallback when the pkg is absent)
- cmaes heatmap: log ramp + ImageData scaling so rosenbrock's valley
reads (sqrt ramp washed it out; per-cell rects caused moire)
- crates/fugue-evo-wasm/tests/explore_node.rs: 4 wasm-pack --node tests
(determinism, convergence, migration cadence, landscape helpers)
Validated headless (Playwright): 25-page sweep all widgets backend=wasm,
zero console/page/request errors; blocked-pkg fallback path; light theme;
playground exercised across all five algorithms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
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.
Closes #12. Closes #13.
The evo docs get the full fugue explorables treatment — and unlike the original fugue rollout, every widget runs the real crate via WebAssembly from day one. There is no mirrored-JS math anywhere: WASM computes, canvas draws.
Compute layer (
crates/fugue-evo-wasm/src/explore.rs)Seeded, incremental engines exposing generation-by-generation
step()over the real algorithms, streaming state as JSON:ExploreGa— drives the actualTournamentSelection/SbxCrossover/PolynomialMutationoperators directly, exposing each generation's full anatomy (selected parents, pairs, pre/post-mutation offspring, elite)ExploreCma—CmaEs::step, streaming mean/σ/covariance/eigenstructure per generationExploreNsga2—Nsga2::step_boundedon ZDT1/2/3 + Schaffer, streaming objective points with Pareto rank and crowdingExploreIsland—IslandModel::step, streaming per-island populations, diversity, and migration eventsExploreUmda— the crate'sContinuousUnivariateModel(sample → select → refit), streaming the learned modelexplore_landscape_grid/explore_landscape_info— heatmap backgrounds from the real benchmark functionsTo compile the island model for wasm32,
algorithms::islandis no longer gated on theparallelfeature: without rayon, islands evolve sequentially over the same per-island RNGs (bit-identical seeded results, pinned by test).Docs (#12)
fugue-evo-wasm-loader.jspublishingFV.wasmReadyga-anatomy,cmaes-ellipse(live covariance ellipse on Rosenbrock's valley),nsga2-front(Pareto front forming onto the analytic curve),island-migration(2×2 island panels + migration flashes + best-fitness strip),umda-contract, and five ambient minis (mini-convergence,mini-diversity,mini-sigma,mini-front,mini-migration)api-docs.mdnow links live docs.rs (was "(when published)")Playground (#13)
/playground.html— algorithm × landscape × seed, per-algorithm knobs, run/step/reset, speed control, convergence strip, live readouts. All five algorithms.Packaging
version 0.1.1withdocumentation/homepagemetadata — fixes the missing Documentation link on crates.io (fugue-ppl haddocumentation; fugue-evo didn't). Publish workflow picks it up on merge.<site>/pkg/Validation
wasm-pack test --nodetests, clippy clean,--no-default-featuresbuild checkeddata-fugue-backend="wasm", zero console/page/request errors; blocked-pkg fallback renders notices (backend="none") without errors; light theme verified; playground exercised across all five algorithms🤖 Generated with Claude Code
https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB