## Getting Started
- [**Installation**](#installation)
- [**Inference**](#inference)

## Installation
```shell
conda env create -f DTstable.yml
conda activate DTstable
```

## Inference

Download the saved_environments from [here](https://github.com/gsartoretti/PRIMAL) and place them in './MAPF_Envs/'.
Note - We use [Decision Transformer](https://github.com/kzl/decision-transformer) implementation in our code base.

### 1. **DT**

**Step 1** - Run the following commands. We can change the arguments according to your settings, refer to the testing_dt file.
```shell
python ./Pipeline/testing_dt.py
```
**Step 2** - Pass arguments for environment settings in which we want to run the pipeline by changing "agent_setting", "size_setting", "density_setting", "iteration_setting". For example - 
```shell
python ./Pipeline/testing_dt.py --agent_setting [8, 32]  --size_setting [40, 80]  --density_setting [0.1, 0.2] iteration_setting [81, 90]
```
This command would run the pipeline for with 8 & 32 agents on 40x40 & 80x80 testing grid worlds with density 0.1, 0.2. Each of these settings have 20 environments for testing (80 to 100). "iteration_setting" controls which of those we want to use, [x, y] from x to y. 
 
### 2. **DT + LLM**
**Step 3** - A GPT API key will be needed to use this. Please go to [OpenAI_APIs](https://openai.com/api/). We used [GPT-4o](https://platform.openai.com/docs/models/gpt-4o) API in our experiments and results.
```shell
python ./Pipeline/testing_dt.py --USE_LLM --gpt_key {YOUR_GPT_KEY}
```
