FRT

Robot Motion Skill Learning using Focused Reward Transformer (FRT)

Overview

This repository provides an implementation of Focused Reward Transformer (FRT), an advanced model for robot motion skill learning. The FRT improves upon Decision Transformers (DT) by integrating immediate reward mechanisms, optimizing motion control through a balanced approach between long-term planning and real-time adaptation.

Key Features:

Installation

To set up the environment, install the required dependencies using:

pip install -r requirements.txt

Additionally, ensure MuJoCo is installed for running simulations.

Model Architecture

The architecture consists of three key components:

  1. Reward-Integrated Transformer (RIT): Adds real-time reward sequences into input embeddings. alt text

  2. Reward-Driven Transformer (RDT): Introduces a reward-specific attention block for improved reward learning. alt text

  3. Focused Reward Transformer (FRT): Optimizes reward integration within the self-attention mechanism. alt text

Experiments and Results

The model was evaluated on three environments:

Performance Comparison:

alt text alt text alt text alt text

Usage

To train and test the model, run:

python train.py --env Hopper
python train.py --env Walker2d
python train.py --env HalfCheetah

Modify hyperparameters in config.py as needed.

Visualization

alt text alt text alt text

Citation

If you use this work, please cite:

@article{FRT2024,
  author = {Borui Nan, Xinyi Zheng, Wanru Gong, Lanyue Bi, Xiaoyv Zhu, Xiaoqing Zhu},
  title = {Robot Motion Skill Learning Method based on Focused Reward Transformer (FRT)},
  journal = {arXiv preprint},
  year = {2024}
}

License

This project is licensed under the MIT License.