# REX

This repo contains the source code for the paper: **REX: Rapid Exploration and eXploitation for AI Agents**

## Requirements

- OpenAI API key

## Blocksworld

All the experiments pertaining to Blocksworld is under the `blocksworld` folder. The code for the three variations of REX is available under the names: `blocksworld_R_agent.py`, `blocksworld_UCB_agent.py`, and `blocksworld_UCL_agent.py`.

Use the following command to run the script:
```sh
python blocksworld_UCB_agent.py 
```


## GSM8K

All the experimts pertaining to GSM8K is under the `gsm8k` folder. The code for the three variations of REX is available under the names: `gsm8k_R_agent.py`, `gsm8k_UCB_agent.py`, and `gsm8k_UCL_agent.py`.

Use the following command tin run the script:
```sh
python gsm8k_UCB_agent.py
```

