"vscode:/vscode.git/clone" did not exist on "d4d0c7c367947e95d03c35e48c348c18426073d8"
README.md 1.29 KB
Newer Older
1
2
3
4
5
6
7
8
9
10

## Diffusion-based Policy Learning for RL

`diffusion_policy` implements [Diffusion Policy](https://diffusion-policy.cs.columbia.edu/), a diffusion model that predicts robot action sequences in reinforcement learning tasks.

This example implements a robot control model for pushing a T-shaped block into a target area. The model takes in current state observations as input, and outputs a trajectory of subsequent steps to follow.

To execute the script, run `diffusion_policy.py`

## Diffuser Locomotion
11

Tolga Cangöz's avatar
Tolga Cangöz committed
12
These examples show how to run [Diffuser](https://arxiv.org/abs/2205.09991) in Diffusers.
13
14
There are two ways to use the script, `run_diffuser_locomotion.py`.

Tolga Cangöz's avatar
Tolga Cangöz committed
15
The key option is a change of the variable `n_guide_steps`.
16
17
When `n_guide_steps=0`, the trajectories are sampled from the diffusion model, but not fine-tuned to maximize reward in the environment.
By default, `n_guide_steps=2` to match the original implementation.
Tolga Cangöz's avatar
Tolga Cangöz committed
18

19
20
21

You will need some RL specific requirements to run the examples:

Tolga Cangöz's avatar
Tolga Cangöz committed
22
```sh
23
24
25
26
27
28
29
30
31
pip install -f https://download.pytorch.org/whl/torch_stable.html \
                free-mujoco-py \
                einops \
                gym==0.24.1 \
                protobuf==3.20.1 \
                git+https://github.com/rail-berkeley/d4rl.git \
                mediapy \
                Pillow==9.0.0
```