Minimal implementation of Decision Transformer for reinforcement learning
Top 94.5% on sourcepulse
This repository provides a minimal PyTorch implementation of the Decision Transformer algorithm for reinforcement learning, targeting OpenAI Gym mujoco control tasks. It offers a simplified GPT-based approach, optimized data handling, and includes a Colab notebook for easy experimentation and visualization, making it suitable for researchers and practitioners looking to understand or adapt Decision Transformer for their own RL projects.
How It Works
The implementation utilizes a simple GPT architecture (causal transformer) to model sequential decision-making. It leverages PyTorch's Dataset
and DataLoader
classes for efficient data management and removes redundant computations for rewards-to-go and state normalization, aiming for faster training cycles compared to the official implementation.
Quick Start & Requirements
python3 data/download_d4rl_datasets.py
to format and save datasets in the data
directory.mujoco-py
, d4rl
, PyTorch, Python 3.x. GPU recommended for training.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The provided results are based on 20k training updates and are not directly comparable to the official implementation's 100k updates, serving only as rough reference points. The README does not specify a license, which may impact commercial adoption.
3 years ago
1 day