bettermdptools
bettermdptools
Welcome to bettermdptools, a library for working with Markov Decision Processes (MDPs) and reinforcement learning environments. It provides tools for model-based and model-free algorithms, environment modeling, and visualization.
Key Features
Reinforcement Learning Algorithms
bettermdptools includes model-free algorithms such as Q-Learning and SARSA. They work with Gymnasium environments that have single discrete-valued state spaces. Other state spaces can be converted with a callable.
Planning Algorithms
The library also provides model-based planning algorithms such as Value Iteration and Policy Iteration for MDPs with known transitions and rewards.
Environment Models
bettermdptools includes an exact context-aware Blackjack model and discretized models for CartPole, Acrobot, and Pendulum. These adapters allow tabular learning and planning algorithms to work with Gymnasium environments that do not expose a native tabular transition model.
Visualization Tools
The plotting package provides pure preparation functions and explicit
Matplotlib Axes renderers for learning, convergence, value, and policy plots.
Getting Started
Installation
Install bettermdptools from PyPI:
pip install bettermdptools
Source and contributor documentation are available in the GitHub repository:
https://github.com/jlm429/bettermdptools
Modules
- Utils: Shared utility functions and classes.
- Envs: Environment wrappers and models.
- Algorithms: Learning and planning algorithms.
- Plotting: Prepared data and composable Axes renderers.
- Experiments: High-level experiment and optional Optuna entrypoints.
1r""" 2# bettermdptools 3 4Welcome to **bettermdptools**, a library for working with Markov Decision 5Processes (MDPs) and reinforcement learning environments. It provides tools for 6model-based and model-free algorithms, environment modeling, and visualization. 7 8## Key Features 9 10### Reinforcement Learning Algorithms 11bettermdptools includes model-free algorithms such as Q-Learning and SARSA. 12They work with Gymnasium environments that have single discrete-valued state 13spaces. Other state spaces can be converted with a callable. 14 15### Planning Algorithms 16The library also provides model-based planning algorithms such as Value 17Iteration and Policy Iteration for MDPs with known transitions and rewards. 18 19### Environment Models 20bettermdptools includes an exact context-aware Blackjack model and discretized 21models for CartPole, Acrobot, and Pendulum. These adapters allow tabular 22learning and planning algorithms to work with Gymnasium environments that do 23not expose a native tabular transition model. 24 25### Visualization Tools 26The `plotting` package provides pure preparation functions and explicit 27Matplotlib Axes renderers for learning, convergence, value, and policy plots. 28 29## Getting Started 30 31### Installation 32 33Install bettermdptools from PyPI: 34 35```bash 36pip install bettermdptools 37``` 38 39Source and contributor documentation are available in the GitHub repository: 40 41https://github.com/jlm429/bettermdptools 42 43## Modules 44 45- [Utils](./bettermdptools/utils.html): Shared utility functions and classes. 46- [Envs](./bettermdptools/envs.html): Environment wrappers and models. 47- [Algorithms](./bettermdptools/algorithms.html): Learning and planning 48 algorithms. 49- [Plotting](./bettermdptools/plotting.html): Prepared data and composable Axes 50 renderers. 51- [Experiments](./bettermdptools/experiments.html): High-level experiment and 52 optional Optuna entrypoints. 53"""