Python bindings for the Murk simulation framework
Project description
murk (Python)
Python bindings for the Murk simulation engine.
murk gives you:
- Native Rust performance via PyO3 bindings
- Gymnasium-compatible environment adapters
- Batched stepping for high-throughput RL training
- Typed Python API surface (
py.typed+.pyistubs)
Install
python -m pip install murk
Requirements:
- Python 3.12+
Quick Start (Gymnasium)
MurkEnv is designed for subclassing. Override hook methods to map actions,
reward, and episode boundaries for your task.
import numpy as np
from murk import (
Config,
EdgeBehavior,
FieldMutability,
MurkEnv,
ObsEntry,
PropagatorDef,
WriteMode,
)
class SimpleEnv(MurkEnv):
def __init__(self, seed: int = 42):
cfg = Config()
cfg.set_space_line1d(10, EdgeBehavior.Absorb)
cfg.add_field("value", mutability=FieldMutability.PerTick)
cfg.set_dt(0.1)
cfg.set_seed(seed)
def step_fn(reads, reads_prev, writes, tick_id, dt, cell_count):
writes[0][:] = float(tick_id)
PropagatorDef("inc", step_fn, writes=[(0, WriteMode.Full)]).register(cfg)
super().__init__(cfg, [ObsEntry(0)], n_actions=2, seed=seed)
self._tick_limit = 100
def _compute_reward(self, obs, info):
return -float(np.sum(obs))
def _check_terminated(self, obs, info):
return False
def _check_truncated(self, obs, info):
return info["tick_id"] >= self._tick_limit
env = SimpleEnv()
obs, info = env.reset(seed=0)
obs, reward, terminated, truncated, info = env.step(0)
env.close()
High-Throughput Vectorized RL
BatchedVecEnv steps all worlds in one Rust call (single GIL release), which
removes per-world FFI overhead.
import numpy as np
from murk import BatchedVecEnv, Config, EdgeBehavior, FieldMutability, ObsEntry
def make_config(i: int) -> Config:
cfg = Config()
cfg.set_space_line1d(64, EdgeBehavior.Absorb)
cfg.add_field("energy", mutability=FieldMutability.PerTick)
cfg.set_seed(i)
return cfg
env = BatchedVecEnv(
config_factory=make_config,
obs_entries=[ObsEntry(0)],
num_envs=32,
)
obs, infos = env.reset(seed=0)
obs, rewards, terminateds, truncateds, infos = env.step(np.zeros(32))
env.close()
Low-Level API
If you want direct control of stepping and commands, use World and ObsPlan
from murk._murk / murk.
Core types:
Config,World,CommandObsEntry,ObsPlanStepMetrics(timings, queue/realtime counters, sparse reuse counters)
Package Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file murk-0.2.0.tar.gz.
File metadata
- Download URL: murk-0.2.0.tar.gz
- Upload date:
- Size: 415.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dc820ac16142643accd8ba7294a6bdc9270aef953c4a9114b0e6e622e49c2c3
|
|
| MD5 |
3377178312897133d95c218b8aa981eb
|
|
| BLAKE2b-256 |
dce775ccfff977b380cf225ed96fa26b4264b45140434f2854da2e86aa5c4406
|
Provenance
The following attestation bundles were made for murk-0.2.0.tar.gz:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0.tar.gz -
Subject digest:
5dc820ac16142643accd8ba7294a6bdc9270aef953c4a9114b0e6e622e49c2c3 - Sigstore transparency entry: 1804732787
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type:
File details
Details for the file murk-0.2.0-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: murk-0.2.0-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 592.3 kB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20d97038058c533615c4624c5bf81be5a2acc678e658ae4e04c44cfef12b6e0a
|
|
| MD5 |
adf34f8a848b448923967497c4d99c88
|
|
| BLAKE2b-256 |
93258d44c576e9714c2ea245c267a1be1c1fca2ebc5263a9ff24f87e4b1ab23f
|
Provenance
The following attestation bundles were made for murk-0.2.0-cp312-abi3-win_amd64.whl:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0-cp312-abi3-win_amd64.whl -
Subject digest:
20d97038058c533615c4624c5bf81be5a2acc678e658ae4e04c44cfef12b6e0a - Sigstore transparency entry: 1804733142
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type:
File details
Details for the file murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 803.7 kB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e2fb3161b93e9ed2c3ea7b7d3ae6bf57cd5b2da0bad44f026416065b1dbb9f0
|
|
| MD5 |
a489aaec9cd72da8465b1c53aff806db
|
|
| BLAKE2b-256 |
a1bf870e52e53e174f9b8827c1c73be0ede5d7cd77ea20b99c16e86535f420ff
|
Provenance
The following attestation bundles were made for murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
5e2fb3161b93e9ed2c3ea7b7d3ae6bf57cd5b2da0bad44f026416065b1dbb9f0 - Sigstore transparency entry: 1804733518
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type:
File details
Details for the file murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 779.9 kB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ba5b24cf1216a36c1da710bbe16646140d92a280f092dee8c5319884f7ca618
|
|
| MD5 |
d7605ddef747c534a98130379ae953d0
|
|
| BLAKE2b-256 |
1f82f978ae4b4cf5b4957a8dee30e663f9553d489d30a27d7bf3f02d428af5c5
|
Provenance
The following attestation bundles were made for murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
8ba5b24cf1216a36c1da710bbe16646140d92a280f092dee8c5319884f7ca618 - Sigstore transparency entry: 1804733012
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type:
File details
Details for the file murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 714.0 kB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f442eaa5918113dfa6e26ad93343553bc9e61482f0a9dc97aa85755ed1148791
|
|
| MD5 |
a06c0121dbfb2023ee0d9f210fbfac39
|
|
| BLAKE2b-256 |
a0271f3375ff97276e8d288cc46b645f2b496e6bafd64715680c74f0df7510ed
|
Provenance
The following attestation bundles were made for murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl -
Subject digest:
f442eaa5918113dfa6e26ad93343553bc9e61482f0a9dc97aa85755ed1148791 - Sigstore transparency entry: 1804732910
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type:
File details
Details for the file murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 732.1 kB
- Tags: CPython 3.12+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bca520e552b898195aea5549db5d4d2e7b3317b2eb20f292076c376433bac94
|
|
| MD5 |
c86a90556a879d2aa68606d045d42fa9
|
|
| BLAKE2b-256 |
2a37023a5d10640020ca0204f3e18f3c20665918cc8528b5e75b071d845574ae
|
Provenance
The following attestation bundles were made for murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on tachyon-beep/murk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl -
Subject digest:
3bca520e552b898195aea5549db5d4d2e7b3317b2eb20f292076c376433bac94 - Sigstore transparency entry: 1804733355
- Sigstore integration time:
-
Permalink:
tachyon-beep/murk@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Branch / Tag:
refs/tags/murk-v0.2.0 - Owner: https://github.com/tachyon-beep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a50a67d7e155572932f31c6cf1b489566e2eb7f -
Trigger Event:
push
-
Statement type: