Installation Guide
Prerequisites
TwisteRL requires:
Python 3.9 or higher
Rust toolchain (for building from source)
PyTorch 2.2 or higher
From PyPI
pip install twisterl
From Source
Clone the repository:
git clone https://github.com/AI4quantum/twisteRL.git
cd twisteRL
Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install the Rust toolchain (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
Install the package:
pip install .
Development Installation
For development, install in editable mode:
pip install -e .
Verify Installation
Test your installation by running the training example:
python -m twisterl.train --config examples/ppo_puzzle8_v1.json
Or import the package in Python:
import twisterl
from twisterl.rl import PPO, AZ
from twisterl.nn import BasicPolicy