Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Examples

Murk ships with seven Python example projects demonstrating different spatial backends, RL integration patterns, and the batched engine.

ExampleSpaceDemonstrates
heat_seekerSquare4PPO RL, diffusion physics, Python propagator
hex_pursuitHex2DMulti-agent, AgentDisk foveation
crystal_navFcc123D lattice navigation
layered_hexProductSpace (Hex2D × Line1D)Multi-floor navigation
batched_heat_seekerSquare4BatchedVecEnv, high-throughput parallel training
batched_benchmarkSquare4BatchedVecEnv vs MurkVecEnv vs raw BatchedWorld throughput comparison
batched_cookbookSquare4Low-level BatchedWorld API: lifecycle, context manager, per-world commands, selective reset

There are also three Rust examples:

ExampleDemonstrates
quickstart.rsRust API: config, propagator, commands, snapshots
realtime_async.rsRealtimeAsyncWorld: background ticking, observe, shutdown
replay.rsDeterministic replay: record, verify, prove determinism

The BatchedVecEnv adapter is demonstrated in the batched engine tests, which show config factory patterns, observation extraction, auto-reset, and override hooks.

Running the Python examples

# Install published murk package (default)
python -m pip install murk

# If you are developing Murk internals from source instead:
# cd crates/murk-python && maturin develop --release && cd ../..

# Run an example
cd examples/heat_seeker
pip install -r requirements.txt
python heat_seeker.py