TwisteRL Documentationο
Welcome to TwisteRLο
TwisteRL is a minimalistic, high-performance Reinforcement Learning framework implemented in Rust with Python bindings.
The current version is a Proof of Concept, stay tuned for future releases!
π Key Featuresο
High-Performance Core: RL episode loop implemented in Rust for faster training and inference
Inference-Ready: Easy compilation and bundling of models with environments into portable binaries for inference
Modular Design: Support for multiple algorithms (PPO, AlphaZero) with interchangeable training and inference
Language Interoperability: Core in Rust with Python interface
Symmetry-Aware Training: Environments can expose observation/action permutations (βtwistsβ) so policies automatically exploit symmetries for faster learning
Quick Startο
Installationο
pip install twisterl
Trainingο
python -m twisterl.train --config examples/ppo_puzzle8_v1.json
This example trains a model to play the popular β8 puzzleβ where numbers have to be shifted around through the empty slot until they are in order.
This model can be trained on a single CPU in under 1 minute (no GPU required!).
Current State (Proof of Concept)ο
- Hybrid Rust-Python implementation:
Data collection and inference in Rust
Training in Python (PyTorch)
- Supported algorithms:
PPO (Proximal Policy Optimization)
AlphaZero
Focus on discrete observation and action spaces
Support for native Rust environments and Python environments through a wrapper
Repository: GitHub
Getting Startedο
Ready to dive in? Here are the essential links to get you up and running:
π¦ Installation Guide - Install TwisteRL and set up your environment
β‘ Quick Start Guide - Your first RL model in minutes
π Examples - Interactive examples and use cases
π§ Algorithms - PPO and AlphaZero algorithm guides
Documentationο
API Reference
twisterl package - Core package and functions
Algorithms API - Algorithm implementations (PPO, AlphaZero)
Environments - Built-in and custom environments
Neural Networks - Neural network architectures
Development & Community
Contributing to TwisteRL - How to contribute to TwisteRL
Documentation Guide - Building and deploying documentation
Additional Resources
Index - Complete index of functions and classes
Search Page - Search the documentation