Skip to content

Commit 8885c82

Browse files
committed
Updating README + actions
1 parent d86f630 commit 8885c82

File tree

2 files changed

+24
-45
lines changed

2 files changed

+24
-45
lines changed

.github/workflows/pythontests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
with:
1111
python-version: 3.10.16
1212
architecture: 'x64'
13+
- name: Install missing dependencies
14+
run: |
15+
brew install gettext
16+
brew link --force gettext
1317
- name: Install uv
1418
run: |
1519
curl -LsSf https://astral.sh/uv/install.sh | sh

README.md

Lines changed: 20 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ DRL implementations compatible with the environment are included in the repo as
2121

2222
The old [human_aware_rl](https://github.com/HumanCompatibleAI/human_aware_rl) is being deprecated and should only used to reproduce the results in the 2019 paper: *[On the Utility of Learning about Humans for Human-AI Coordination](https://arxiv.org/abs/1910.05789)* (also see our [blog post](https://bair.berkeley.edu/blog/2019/10/21/coordination/)).
2323

24-
For simple usage of the environment, it's worthwhile considering using [this environment wrapper](https://github.com/Stanford-ILIAD/PantheonRL).
25-
2624
## Research Papers using Overcooked-AI 📑
2725

2826

@@ -45,34 +43,20 @@ You can install the pre-compiled wheel file using pip.
4543
```
4644
pip install overcooked-ai
4745
```
48-
Note that PyPI releases are stable but infrequent. For the most up-to-date development features, build from source with `pip install -e .`.
46+
Note that PyPI releases are stable but infrequent. For the most up-to-date development features, build from source. We recommend using [uv](https://docs.astral.sh/uv/getting-started/installation/) to install the package, so that you can use the provided lockfile to ensure no minimal package version issues.
4947

5048

5149
### Building from source 🔧
5250

53-
It is useful to setup a conda environment with Python 3.7 (virtualenv works too):
54-
55-
```
56-
conda create -n overcooked_ai python=3.7
57-
conda activate overcooked_ai
58-
```
59-
6051
Clone the repo
6152
```
6253
git clone https://github.com/HumanCompatibleAI/overcooked_ai.git
6354
```
64-
Finally, use python setup-tools to locally install
65-
66-
If you just want to use the environment:
6755

56+
Using uv (recommended):
6857
```
69-
pip install -e .
70-
```
71-
72-
If you also need the DRL implementations (you may have to input this in your terminal as `pip install -e '.[harl]'`):
73-
74-
```
75-
pip install -e .[harl]
58+
uv venv
59+
uv sync
7660
```
7761

7862

@@ -84,21 +68,15 @@ When building from source, you can verify the installation by running the Overco
8468
python testing/overcooked_test.py
8569
```
8670

87-
To check whether the `humam_aware_rl` is installed correctly, you can run the following command from the `src/human_aware_rl` directory:
88-
89-
```
90-
$ ./run_tests.sh
91-
```
9271

93-
⚠️**Be sure to change your CWD to the human_aware_rl directory before running the script, as the test script uses the CWD to dynamically generate a path to save temporary training runs/checkpoints. The testing script will fail if not being run from the correct directory.**
9472

95-
This will run all tests belonging to the human_aware_rl module. _These tests don't work anymore out of the box, due to package version issues_: if you fix them, feel free to make a PR. You can checkout the README in the submodule for instructions of running target-specific tests. This can be initiated from any directory.
9673

9774
If you're thinking of using the planning code extensively, you should run the full testing suite that verifies all of the Overcooked accessory tools (this can take 5-10 mins):
9875
```
9976
python -m unittest discover -s testing/ -p "*_test.py"
10077
```
10178

79+
See this [notebook](Overcooked%20Tutorial.ipynb) for a quick guide on getting started using the environment.
10280

10381
## Code Structure Overview 🗺
10482

@@ -117,7 +95,16 @@ python -m unittest discover -s testing/ -p "*_test.py"
11795
- `planners.py`: near-optimal agent planning logic
11896
- `search.py`: A* search and shortest path logic
11997

120-
`human_aware_rl` contains:
98+
`overcooked_demo` contains:
99+
100+
`server/`:
101+
- `app.py`: The Flask app
102+
- `game.py`: The main logic of the game. State transitions are handled by overcooked.Gridworld object embedded in the game environment
103+
- `move_agents.py`: A script that simplifies copying checkpoints to [agents](src/overcooked_demo/server/static/assets/agents/) directory. Instruction of how to use can be found inside the file or by running `python move_agents.py -h`
104+
105+
`up.sh`: Shell script to spin up the Docker server that hosts the game
106+
107+
`human_aware_rl` contains (NOTE: this is not supported anymore, see bottom of the README for more info):
121108

122109
`ppo/`:
123110
- `ppo_rllib.py`: Primary module where code for training a PPO agent resides. This includes an rllib compatible wrapper on `OvercookedEnv`, utilities for converting rllib `Policy` classes to Overcooked `Agent`s, as well as utility functions and callbacks
@@ -142,29 +129,17 @@ python -m unittest discover -s testing/ -p "*_test.py"
142129

143130
`utils.py`: utils for the repo
144131

145-
`overcooked_demo` contains:
146132

147-
`server/`:
148-
- `app.py`: The Flask app
149-
- `game.py`: The main logic of the game. State transitions are handled by overcooked.Gridworld object embedded in the game environment
150-
- `move_agents.py`: A script that simplifies copying checkpoints to [agents](src/overcooked_demo/server/static/assets/agents/) directory. Instruction of how to use can be found inside the file or by running `python move_agents.py -h`
151-
152-
`up.sh`: Shell script to spin up the Docker server that hosts the game
153-
154-
155-
## Python Visualizations 🌠
133+
## Raw Data :ledger:
156134

157-
See [this Google Colab](https://colab.research.google.com/drive/1AAVP2P-QQhbx6WTOnIG54NXLXFbO7y6n#scrollTo=Z1RBlqADnTDw) for some sample code for visualizing trajectories in python.
135+
The raw data used during BC training is >100 MB, which makes it inconvenient to distribute via git. The code uses pickled dataframes for training and testing, but in case one needs to original data it can be found [here](https://drive.google.com/drive/folders/1aGV8eqWeOG5BMFdUcVoP2NHU_GFPqi57?usp=share_link)
158136

159-
We have incorporated a [notebook](Overcooked%20Tutorial.ipynb) that guides users on the process of training, loading, and evaluating agents. Ideally, we would like to enable users to execute the notebook in Google Colab; however, due to Colab's default kernel being Python 3.10 and our repository being optimized for Python 3.7, some functions are presently incompatible with Colab. To provide a seamless experience, we have pre-executed all the cells in the notebook, allowing you to view the expected output when running it locally following the appropriate setup.
137+
## Deprecated: Behavior Cloning and Reinforcement Learning
160138

161-
Overcooked_demo can also start an interactive game in the browser for visualizations. Details can be found in its [README](src/overcooked_demo/README.md)
139+
We used to include code for training BC and PPO agents in the `human_aware_rl` module. This is now deprecated, because of package version issues which are hard to fix. See this [issue](https://github.com/HumanCompatibleAI/overcooked_ai/issues/162) for more details.
162140

163-
## Raw Data :ledger:
164141

165-
The raw data used in training is >100 MB, which makes it inconvenient to distribute via git. The code uses pickled dataframes for training and testing, but in case one needs to original data it can be found [here](https://drive.google.com/drive/folders/1aGV8eqWeOG5BMFdUcVoP2NHU_GFPqi57?usp=share_link)
166142

167143
## Further Issues and questions ❓
168144

169-
If you have issues or questions, you can contact [Micah Carroll](https://micahcarroll.github.io) at mdc@berkeley.edu.
170-
145+
If you have issues or questions, you can contact [Micah Carroll](https://micahcarroll.github.io) at mdc@berkeley.edu.

0 commit comments

Comments
 (0)