Skip to content

Releases: hyqzz/worldsim

v0.1.2 — Publish-ready: sync training + 3D data plane + full audit

Choose a tag to compare

@hyqzz hyqzz released this 27 Aug 06:57

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_hex prevent 53-bit truncation and scheduler races; world creation, batch create, and WDL all respect auto_start:false.
  • as_vec3 rejects NaN/Inf; unknown materials return errors; event errors are retained and visible via event_errors.
  • Fluid sample_velocity normalization and w0 fixed; sample_density/velocity reuse 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, runtime paused/rate/qos, and p pressure column, with u64/usize overflow 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/transition carries per-environment transitions with unique-ID, 4096 caps, and synchronous batch_step with fixed worker pool.
  • GET /v1/worlds/:id/state/full and POST /v1/worlds/:id/observe return columnar Base64 bodies/fluid/nbody/fields; World::observation_json preserves 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.py is a true offline Axes3D demo over the public state columns, companion to docs/viewer.md.

Quality gates

  • cargo fmt + clippy -D warnings green, node --check viewer/app.js, py_compile for 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.txt and fixed all demo imports to run from demos/.

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

Choose a tag to compare

@hyqzz hyqzz released this 26 Aug 16:56

v0.1.1 — Training-ready batch API, WDL, capsules, Gymnasium wrapper

New

  • Batch API: POST /v1/batch/{create,step,inject} — parallel std::thread::scope execution 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: SpawnCapsule event (v0.1 approximates as volume-equivalent sphere; true capsule distance in v0.2 law registry)
  • Law registry: ws-solvers::law — ForceLaw, FluxLaw, ConstraintLaw, EventLaw traits with cost models + validation suites (v0.2 plugin contract)
  • Gymnasium wrapper: worldsim.gym.WorldSimEnv — drop-in gym.Env talking to any WorldSim server
  • BatchTrainer: worldsim.training.BatchTrainer — high-throughput batch client with built-in benchmark()
  • 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 correctly

See CHANGELOG.md and docs/training.md for full details.

v0.1.0 — First public release

Choose a tag to compare

@hyqzz hyqzz released this 26 Aug 15:39

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.