rl-mind

rl_mind is the small, typed reinforcement-learning toolkit used by the Master MIND RL practicals. Everything an agent exchanges with its environment is a frozen dataclass of torch.Tensors — no untyped string dictionaries — and the action type flows through the whole API, so an editor can autocomplete field names and a type checker can catch a missing log_prob.

pip install rl-mind
import rl_mind.envs  # registers CartPoleContinuous-v1 (explicit opt-in)
from rl_mind import VecEnv, ReplayBuffer, TransitionCollector, Evaluator

env = VecEnv("CartPoleContinuous-v1", num_envs=1, seed=1)
collector = TransitionCollector(env, actor)
buffer = ReplayBuffer(200_000)

while collector.steps < 30_000:
    buffer.add(collector.collect(1))
    batch = buffer.sample(64)          # Transitions[Action]
    ...

Importing the package has no side effect: the extra gymnasium environments are registered only by an explicit import rl_mind.envs or import rl_mind.mazemdp_env.

Two ways in: