Repository navigation
Releases: hyqzz/worldsim
Releases · hyqzz/worldsim
Release list
v0.1.2 — Publish-ready: sync training + 3D data plane + full audit
v0.1.2 — Publish-ready audit (2025-08-27)
This release makes the repository truly publish-ready: every claim is now backed by code, tests, and live verification.
Contracts & determinism
auto_start+seed_hexprevent 53-bit truncation and scheduler races; world creation, batch create, and WDL all respectauto_start:false.as_vec3rejects NaN/Inf; unknown materials return errors; event errors are retained and visible viaevent_errors.- Fluid
sample_velocitynormalization andw0fixed;sample_density/velocityreuse the 27-cell grid (not brute force). - Heat finite-source lifetime counts macro ticks, not substeps; both temperature buffers are restored; sources are snapshotted.
- Snapshot now carries
seed_hex,active_forces,replay_log, runtimepaused/rate/qos, andppressure column, withu64/usizeoverflow guards. - Capacity scales with quality (Low 1k rigid / QoS-capped fluid) so batch training does not over-reserve.
Training data plane
- New
POST /v1/worlds/:id/step {events,ticks,include_fluid,include_fields}— one request = action → exact simulation → observation, no realtime race. POST /v1/batch/transitioncarries per-environmenttransitionswith unique-ID, 4096 caps, and synchronousbatch_stepwith fixed worker pool.GET /v1/worlds/:id/state/fullandPOST /v1/worlds/:id/observereturn columnar Base64bodies/fluid/nbody/fields;World::observation_jsonpreserves full state for Gym and scientific clients.- Python
Client.step_sync(events=),BatchTrainer.transition(),WorldSimEnv(Gymnasium, reward_fn, flush before first obs, single-request step) all use the sync contract.
3D display
- WebSocket stream now carries three 3D datasets:
bodies+fluid+nbody; the WebGL2 viewer uses persistent buffers and renders N-body as warm-gold points. demos/three_d_scene.pyis a true offline Axes3D demo over the public state columns, companion todocs/viewer.md.
Quality gates
cargo fmt + clippy -D warningsgreen,node --check viewer/app.js,py_compilefor all demos/SDK/examples, 59 tests all green (22+15+8+7+3+4), live health + sync/batch/nbody/snapshot WebSocket verified.- Added
sdk/python/demos/requirements.txtand fixed all demo imports to run fromdemos/.
Benchmark note
- The heat→fluid advection was re-enabled via grid-sampled O(n) sampling after the earlier brute-force regression was fixed.
See CHANGELOG.md, docs/api.md, docs/configuration.md, docs/training.md, docs/viewer.md for the updated contracts.
v0.1.1 — Training-ready batch API + WDL + Gymnasium wrapper
v0.1.1 — Training-ready batch API, WDL, capsules, Gymnasium wrapper
New
- Batch API:
POST /v1/batch/{create,step,inject}— parallelstd::thread::scopeexecution across N worlds, enabling RL training at >10k steps/s - WDL:
POST /v1/worlds/from-wdl+POST /v1/wdl/parse— declarative world description with JSON +//comments - Capsules:
SpawnCapsuleevent (v0.1 approximates as volume-equivalent sphere; true capsule distance in v0.2 law registry) - Law registry:
ws-solvers::law—ForceLaw,FluxLaw,ConstraintLaw,EventLawtraits with cost models + validation suites (v0.2 plugin contract) - Gymnasium wrapper:
worldsim.gym.WorldSimEnv— drop-ingym.Envtalking to any WorldSim server - BatchTrainer:
worldsim.training.BatchTrainer— high-throughput batch client with built-inbenchmark() - Training docs:
docs/training.md— Gymnasium quickstart, batch training, WDL, capsule, perf targets
Tests
51 tests all green: 22 core + 12 domain + 7 solvers + 13 engine (batch + validation) + 1 server + 0 doc
Verified
cargo run -p worldsim -- demo --port 8090
# Batch: POST /v1/batch/create (4 worlds) → inject → step → capsule spawn — all working
# WDL: POST /v1/wdl/parse → config + events parsed correctlySee CHANGELOG.md and docs/training.md for full details.
v0.1.0 — First public release
First public release of WorldSim — physics-world simulation infrastructure.
- Deterministic multi-scale kernel (rigid + WCSPH fluid + heat + N-body) with buoyancy/drag coupling
- Snapshots, restore, fork, QoS auto controller
- HTTP/WebSocket/SSE API + embedded WebGL2 viewer (single binary, 0 runtime deps)
- Python SDK (stdlib only) + 4 examples
- 7-problem validation suite (projectile, orbit, heat, fluid, determinism, snapshot, fork)
cargo run -p worldsim -- demo --port 8090
# http://127.0.0.1:8090/viewer/See CHANGELOG.md, docs/api.md, docs/physics.md for details.