# Chain-of-Goals Hierarchical Policy for Long-Horizon Offline Goal-Conditioned RL

# Overview

This code is based on [OGBench](https://github.com/seohongpark/ogbench) repository.

# Implementations

### Installation

CoGHP implementations require Python 3.9+ and additional dependencies, including `jax >= 0.4.26`.
To install these dependencies, run:

```shell
cd impls
pip install -r requirements.txt
```

### Running CoGHP

To train an agent, you can run the `main.py` script.
Training metrics, evaluation metrics, and videos are logged via `wandb` by default.
Here is a example commands (see [hyperparameters.sh](impls/hyperparameters.sh) for the full list of commands):

```shell
# antmaze-large-navigate-v0    
python main.py --env_name=antmaze-large-navigate-v0 --eval_episodes=50 --agent=agents/coghp.py --agent.num_subgoals=1 --agent.subgoal_steps=50 --agent.decode_subgoal=False
```