This release is a pre-release and may not be stable for production use.
Mimir Python API
Mimir 0.14.0b3 provides a typed, semantic API for loading PDDL and prototyping search algorithms.
from pymimir import LiftedFFHeuristic, Problem, SearchStatus, astar
problem = Problem.from_files("domain.pddl", "problem.pddl")
heuristic = LiftedFFHeuristic(problem)
result = astar(problem, heuristic, timeout_seconds=30)
if result.solution is not None:
for action in result.solution.plan:
print(action, action.cost)
Use problem.fact("at", "robot", "room"), problem.action(...), and
problem.state(...) to construct values without editing PDDL files. Search
callbacks receive immutable Transition records. The pymimir.advanced
module is an unstable implementation detail.
Programmatic construction
DomainBuilder and ProblemBuilder construct the same native models without
parsing PDDL text. Builder sections follow PDDL order, are single-use, and must
be closed explicitly.
from pymimir import DomainBuilder, ProblemBuilder
domain = (
DomainBuilder("switches")
.requirements().add(":strips").close()
.predicates().add("on", ("?switch", "object")).close()
.actions()
.add("turn-on")
.add_parameter("?switch")
.add_effect("on", "?switch")
.close()
.close()
.build()
)
problem = (
ProblemBuilder(domain, "one-switch")
.objects().add("light").close()
.goal().add("on", "light").close()
.build()
)
Learning encodings
pymimir.learning provides framework-independent native graph encoding. One
EncodingContext owns node IDs, relation rows, and example metadata for a
complete batch. Each example assigns its canonical problem objects first;
encoders then allocate additional nodes in call order.
from pymimir import Domain, Problem, learning
domain = Domain.from_file("domain.pddl")
problem = Problem.from_file(domain, "problem.pddl")
state = problem.initial_state
actions = state.applicable_actions()
successors = [action.apply(state) for action in actions]
with learning.EncodingContext() as context:
context.begin_instance(problem)
learning.encode_state(context, state)
learning.encode_goal(context, state, problem.goal)
learning.encode_action_list(context, state, actions)
learning.encode_transition_effects(
context, state, successors, [], problem.goal
)
context.end_instance()
relation_buffer = context.to_relation_buffer()
node_sizes = context.node_sizes
relations = relation_buffer.to_relations()
assert node_sizes == [len(problem.all_objects) + 2 * len(actions)]
to_relation_buffer() performs one native bulk copy into a Python-owned packed
int32 snapshot. Its immutable descriptors use int32-value offsets, and its
writable values memoryview can be passed directly to torch.frombuffer by
framework integrations. The view and any tensor created from it share storage,
so mutations are visible through both. The snapshot remains valid after the
context closes. RelationBuffer.to_relations() and the convenience
EncodingContext.to_relations() materialize the compatible
dict[str, list[int]] form; those values already contain batch offsets and can
be consumed without PyTorch. Relation row order is unspecified, while argument
order inside each row is preserved.
True nullary predicates are lifted over the active problem's canonical
all_objects: state, goal, and expressive encodings emit P(object) once for
every object, including domain constants. Transition effects instead emit the
unary relation P(transition). If a problem has no objects, state, goal, and
expressive encodings retain the corresponding relation key with an empty value
buffer, while transition effects still encode their transition node.
Encoding functions append into the native context and return None. A batch
may mix Problems only when they share the exact Domain object. The context
manager calls the idempotent close() method to release the native owner
deterministically; copied buffers, relation dictionaries, and metadata remain
valid after the context is closed. Transition-effect encoding computes fluent
and derived net changes directly from the source and each ordered successor;
every successor, including a no-op or repeated state, receives its own node.
Run the complete example with:
python python/examples/quickstart.py domain.pddl problem.pddl
Release files for pymimir 0.14.0b3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymimir-0.14.0b3.tar.gz | 221.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pymimir-0.14.0b3-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pymimir-0.14.0b3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pymimir-0.14.0b3-py3-none-macosx_12_0_x86_64.whl | Python 3 | none | macOS 12.0+ x86-64 | Details |
| pymimir-0.14.0b3-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details |
Total release size: 8.9 MB
Release files / pymimir-0.14.0b3.tar.gz
| Download URL | pymimir-0.14.0b3.tar.gz |
|---|---|
| Size | 221.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c854378acc31f07c4fab5ad45c5eb3f7884cef0fa588c76bbea5a1ba9fee8e7
|
|
BLAKE2b-256 checksum How to use checksums |
3d7dd9607e443a525e2f535eff4a484560ecb389e80cbfa7a82ddfc3061d02ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / pymimir-0.14.0b3-py3-none-win_amd64.whl
| Download URL | pymimir-0.14.0b3-py3-none-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8f34adc2c6182d44279ba55832ee835e99e44d8a75b3fe8c73fa5530ef90a368
|
|
BLAKE2b-256 checksum How to use checksums |
03bc1f76187dc9221806e641003cc24d10216c40939fb5be59f69a001218f841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / pymimir-0.14.0b3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pymimir-0.14.0b3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
ae5709532a42eba374f7da43903fb67cea6a07c91262b062c5a8223b78e2b18d
|
|
BLAKE2b-256 checksum How to use checksums |
259670714f4491d7fcc058401bb9a23ec06654a79567033e13be3b93b9a9a7fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / pymimir-0.14.0b3-py3-none-macosx_12_0_x86_64.whl
| Download URL | pymimir-0.14.0b3-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
b2ab49ce07cb5c6dfa37e55dea43acb7706ccefe7d1263ab9254c7ba7deb1a79
|
|
BLAKE2b-256 checksum How to use checksums |
c6bf16a32cc12634b8afdb4e7d0e4482290fe8834ccd61e2e6a378eb02115d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / pymimir-0.14.0b3-py3-none-macosx_12_0_arm64.whl
| Download URL | pymimir-0.14.0b3-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8bc9cb6204c4ef4605c1d7c0bbfffed8d021797b2ee21cb4f72d2e097ead3671
|
|
BLAKE2b-256 checksum How to use checksums |
b2b98865e77fd5ec67157e744023784d6f9486502652d81b12b3a60a7b2286d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log