# 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.Tensor`s — 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`. ```bash pip install rl-mind ``` ```python 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: - the [guide](guide.md) walks through the design — what each building block is for, how the three collectors map onto the three families of algorithms, and why `terminated` and `truncated` must not be confused; - the [API reference](api.md) documents every class, method and function, straight from the docstrings, one page per area: [actors & actions](api/core.md), [environments](api/env.md), [data](api/data.md), [collectors](api/collectors.md), [evaluation](api/evaluation.md), [rendering](api/rendering.md), [utilities](api/utilities.md), [extra environments](api/extra-envs.md). ```{toctree} :maxdepth: 2 :hidden: guide api ```