The code in this repository supplements the paper "Improving Reward-Based Hindsight Credit Assignment".
scripts/train.py— training entry point. Reads its configuration fromwandb.config(seeconfig_defaultsat the top of the file for all available parameters and their defaults).agents/hca.py— theRHCAAlgoimplementation (R-HCA / COCOA).models.py— actor-critic and hindsight model architectures.environments/— custom Gymnasium environments used in the paper (Catch-v0,ContextualChain-v0), registered withgym.registerinenvironments/__init__.py.curr_utils/— formatting, storage, and other helper utilities (adapted from torch-ac).
Run training with:
python3 -m scripts.trainConfiguration is read from wandb.config (see config_defaults in scripts/train.py for all parameters and their defaults), so runs are typically launched as part of a W&B sweep, which overrides these defaults per run:
wandb sweep sweep.yaml
wandb agent <sweep-id>- numpy
- torch
- torch-ac
- gymnasium
- wandb