Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdpkjc/snapshotrl
Open source code for "Snapshot Reinforcement Learning: Leveraging Prior Trajectories for Efficiency"
https://github.com/sdpkjc/snapshotrl
Last synced: 8 days ago
JSON representation
Open source code for "Snapshot Reinforcement Learning: Leveraging Prior Trajectories for Efficiency"
- Host: GitHub
- URL: https://github.com/sdpkjc/snapshotrl
- Owner: sdpkjc
- Created: 2024-03-11T13:34:59.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-14T01:45:18.000Z (8 months ago)
- Last Synced: 2024-10-11T05:50:59.958Z (about 1 month ago)
- Language: Python
- Homepage: https://sdpkjc.github.io/snapshotrl/
- Size: 463 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 Snapshot Reinforcement Learning: *Leveraging Prior Trajectories for Efficiency*
This repository contains the code for the paper "Snapshot Reinforcement Learning: Leveraging Prior Trajectories for Efficiency" by [Yanxiao Zhao](https://sdpkjc.com), Yangge Qian, Tianyi Wang, Jingyang Shan, Xiaolin Qin.
![snapshotrl](./snapshotrl.svg)
## Running the code
The code is written in Python 3.9 and PyTorch 2.0.1. To install the required dependencies, run
```bash
pip install -r src/requirements.txt
```To train the agents, run the following commands:
```bash
# for S3RL+TD3
python src/snapshot_td3_mujoco.py --env-id Hopper-v4 --n-clusters 6 --truncate-step 100 --seed 1# for SnapshotRL+SC+TD3
python src/snapshot_td3_mujoco.py --env-id Hopper-v4 --n-clusters 6 --truncate-step 1000 --seed 1# for SnapshotRL+STT+TD3
python src/snapshot_td3_mujoco_random.py --env-id Hopper-v4 --truncate-step 100 --seed 1# for SnapshotRL+TD3
python src/snapshot_td3_mujoco_random.py --env-id Hopper-v4 --truncate-step 1000 --seed 1# for S3RL+SAC
python src/snapshot_sac_mujoco.py --env-id Hopper-v4 --n-clusters 6 --truncate-step 100 --seed 1# for S3RL+PPO
python src/snapshot_ppo_fix_mujoco.py --env-id Hopper-v4 --n-clusters 6 --truncate-step 100 --seed 1
```## Citing this work
```tex
@article{zhao2024snapshot,
title={Snapshot Reinforcement Learning: Leveraging Prior Trajectories for Efficiency},
author={Zhao, Yanxiao and Qian, Yangge and Wang, Tianyi and Shan, Jingyang and Qin, Xiaolin},
journal={arXiv preprint arXiv:2403.00673},
year={2024}
}
```