This release is a pre-release and may not be stable for production use.
Mimir-RL
Mimir-RL is a Python library that implements RL algorithms using PyTorch and PyTorch RL that are tightly integrated with Mimir.
Dead-end detection
Pass an optional state/goal detector callable to a trajectory sampler:
import pymimir as mm
from pymimir_rl import BoltzmannTrajectorySampler, CachedDeadEndDetector
detector = CachedDeadEndDetector(mm.H2DeadEndDetector)
sampler = BoltzmannTrajectorySampler(
model, reward_function, temperature=0.5, dead_end_detector=detector,
)
For h², construct problems with generator="grounded". The cache creates one
native detector per problem. Trajectory calls it after sampling, in state order,
and propagates each proof forward for the same goal. Existing reward-function
proofs and actionless non-goal states also provide dead-end evidence.
Detected states with applicable actions do not terminate or prune rollouts.
Transition.successor_is_dead_end is separate from is_terminal, and ordinary
rewards are preserved. Optimizers assign fixed dead-end targets without
bootstrapping from those successors. Hindsight cloning recomputes labels for its
new goal using the same detector cache.
OffPolicyAlgorithm accepts dead_end_replay_buffer and hindsight_replay_buffer.
The former receives a suffix of each trajectory containing a proven dead state.
By default it starts with the transition entering the first proven dead state.
An earlier state whose recorded maximum Q-value is at most
-10000 * dead_end_q_factor moves the cutoff to the transition entering that
state. dead_end_q_factor defaults to 0.25 (threshold -2500) and must be in
(0, 1]. Nonfinite predictions do not move the cutoff. Selection uses the
recorded maximum over all applicable actions and requires no additional inference.
The Q-based cutoff only selects replay experience; it does not create dead-end labels or change targets. All sampled trajectories remain intact for hindsight refinement. Unproven horizon cutoffs do not qualify for the dead-end buffer, even if their Q-values are low.
Release files for pymimir-rl 0.3.0b5
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_rl-0.3.0b5.tar.gz | 59.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymimir_rl-0.3.0b5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.7 kB
Release files / pymimir_rl-0.3.0b5.tar.gz
| Download URL | pymimir_rl-0.3.0b5.tar.gz |
|---|---|
| Size | 59.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7472daa982e2699f3fec531fb9ea02c15a6552562a2994f090fbf2f5c7d3ee52
|
|
BLAKE2b-256 checksum How to use checksums |
66a4aa85a0366ce177ced552836aa64f65c0e54c3722b0fea8713e95ec93eb6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pymimir_rl-0.3.0b5-py3-none-any.whl
| Download URL | pymimir_rl-0.3.0b5-py3-none-any.whl |
|---|---|
| Size | 58.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62b35b71983a15197f9ae305b962ac23459bfe34421954b062253dfff4bcce4e
|
|
BLAKE2b-256 checksum How to use checksums |
b535c94eb3a71a2e9864acdac4ae6d5c6379b2df5d713cd1495b757fcd3621a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|