# GAC: Geometric Action Control - DMC Evaluation

Docker-based **one-command reproducibility** for GAC's DeepMind Control Suite results.

## 🚀 Quick Start (For Reviewers)

### Prerequisites
- Docker (>= 20.10)  
- NVIDIA GPU + CUDA 11.7+ (recommended)
- NVIDIA Container Toolkit (for GPU support)

### Build and Run

```bash
# 1. Extract supplementary materials
unzip gac_dmc_supplementary.zip
cd eval/

# 2. Build Docker image (5-10 minutes, one-time)
docker build -t gac-eval:v1.0 .

# 3. Run evaluation on all 6 DMC environments (~30 minutes)
docker run --rm --gpus all gac-eval:v1.0
```

**CPU-only mode (slower):**
```bash
docker run --rm gac-eval:v1.0
```

## 📊 Expected Results

Automatic evaluation of 6 DMC environments at 500K steps:

| Environment    | Mean Return     | Status |
| -------------- | --------------- | ------ |
| fish-upright   | 904.22 ± 60.74  | SOTA   |
| walker-walk    | 970.13 ± 13.74  | SOTA   |
| walker-run     | 735.29 ± 20.45  | SOTA   |
| cheetah-run    | 822.90 ± 178.58 | SOTA   |
| quadruped-walk | 913.67 ± 106.11 | SOTA   |
| quadruped-run  | 771.86 ± 58.11  | SOTA   |

**Training:** 500K steps with 8 parallel environments per task

## Snapshot

We provide **three evaluation snapshots** to facilitate the reviewers in verifying our results.

## 🔧 Docker & GPU Setup

### Install Docker (Ubuntu/Debian)

```bash
sudo apt-get update && sudo apt-get install -y docker.io
```

### Install NVIDIA Container Toolkit (for GPU)

```bash
# Add repository
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
  sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
  sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

# Install and configure
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Verify GPU access
docker run --rm --gpus all nvidia/cuda:11.8.0-base-ubuntu22.04 nvidia-smi
```

## 🎯 Evaluate Single Environment

```bash
# Specific environment
docker run --rm --gpus all gac-eval:v1.0 \
  python eval_gac.py --checkpoint gac_pretrain_model/quadruped-run-v0_step_500000.pt

# Fewer episodes (faster)
docker run --rm --gpus all gac-eval:v1.0 python eval_gac.py --episodes 10
```

## 📁 Contents

```
supplementary_materials/
├── README.md                 # This file
├── Dockerfile                # Docker configuration
├── eval_gac.py              # Evaluation script
├── setup.py                 # Compilation script
└── gac_pretrain_model/      # Pre-trained models (6 files)
    ├── fish-upright-v0_step_500000.pt
    ├── walker-walk-v0_step_500000.pt
    ├── walker-run-v0_step_500000.pt
    ├── cheetah-run-v0_step_500000.pt
    ├── quadruped-walk-v0_step_500000.pt
    └── quadruped-run-v0_step_500000.pt
```

## ⚙️ System Requirements

**Recommended (GPU):**
- NVIDIA GPU (6GB+ VRAM)
- 16GB RAM
- 10GB disk space

**Minimum (CPU-only):**
- 16GB RAM  
- 10GB disk space
- ~10x slower evaluation

## 🐛 Troubleshooting

**`could not select device driver with capabilities: [[gpu]]`**  
→ Install NVIDIA Container Toolkit (see setup instructions above)

**Out of memory**  
→ Reduce episodes: `docker run --rm gac-eval:v1.0 python eval_gac.py --episodes 5`

**X11/GLFW warnings**  
→ Normal in Docker, doesn't affect results (headless rendering)

## Code Release

**Included:**
- ✅ Complete PyTorch architecture
- ✅ Full evaluation pipeline  
- ✅ All 6 pre-trained models

**Note:** Full implementation including training code will be released under MIT License upon paper acceptance.

## 📧 Support

For reproduction issues, contact authors via OpenReview.

---
**Version:** 1.0 | **Last updated:** November 2025

