Practical overview
When it fits
Use it when you want a code reference or starting point for an offline Q-learning experiment and can provide an environment and the data needed for your task.
Who it is for
- Researchers and developers exploring offline reinforcement learning and autoregressive Q-functions.
- Robotics practitioners adapting Q-learning experiments to their own environments and datasets.
- Educators building demonstrations that compare single-action and multi-action Q-learning.
Documented uses
- Inspect an implementation of autoregressive Q-learning for multiple actions.
- Compare the multi-action approach with retained single-action Q-learning logic.
- Connect a custom environment to an agent that generates replay memory.
- Train a Q learner from replay data and request actions from a model using video-like input and instructions.
Requirements & limits
The repository is public and declares an MIT license. Its README provides the installation command pip install q-transformer.
- The example requires a user-provided environment by overriding BaseEnvironment; the README describes the expected initialization and interaction outputs.
- The README imports PyTorch and shows a mock environment, but does not establish that a task-specific real environment or robotics dataset is included.
- The repository retains single-action Q-learning logic specifically for comparison and educational use.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the package and inspect the example workflow
Set up the documented Python package and identify the components used in its example.
Before you start
- Python environment capable of running the documented pip command
- PyTorch, imported by the README example
- An environment implementation for the example's agent interaction; the README shows a mock environment and says users must supply their own environment by overriding BaseEnvironment
Steps
Run the README installation command: pip install q-transformer.
Review the example imports for QRoboticTransformer, QLearner, Agent and ReplayMemoryDataset.
Inspect how the example constructs a model and passes an environment to Agent.
Expected outcome
The package is installed and the example's model, environment, agent and learner roles are identifiable.
Guide limitations
- The setup steps do not train a model or demonstrate successful interaction with a real robotics environment.
- The README says users must supply their own environment; it specifies the expected initialization and step outputs.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 October 2026
- Original website title
- lucidrains/q-transformer · Official homepage title · retained in its source language

