This repository contains the code for modeling agents through inverse planning with POMDPs on the agent to infer goals and subsequently predict the actions of the other agents in a cooperative setting.
Clone this repository:
git clone https://github.com/terryyylim/ToM-gameplaying-POMDP.git
To prevent complications to the global environment variables, I suggest creating a virtual environment for tracking and using the libraries required for the project.
- Create and activate a virtual environment (run
pip3 install virtualenv
first if you don't have Python virtualenv installed):
virtualenv -p python3 <desired-path>
source <desired-path>/bin/activate
- Install the requirements:
pip install -r requirements.txt
To start the game, run the following.
python overcooked_server/game.py
Human Agent 1
Actions | PICK | CHOP | COOK | SCOOP | SERVE | DROP | STAY |
---|---|---|---|---|---|---|---|
Key-Map | Z | X | C | V | B | N | M |
Movement | UP | DOWN | LEFT | RIGHT |
---|---|---|---|---|
Key-Map | UP | DOWN | LEFT | RIGHT |
Movement | DIAG-UP-LEFT | DIAG-UP-RIGHT | DIAG-DOWN-LEFT | DIAG-DOWN-RIGHT |
---|---|---|---|---|
Key-Map | , | . | / | RSHIFT |
Human Agent 2
Actions | PICK | CHOP | COOK | SCOOP | SERVE | DROP | STAY |
---|---|---|---|---|---|---|---|
Key-Map | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Movement | UP | DOWN | LEFT | RIGHT |
---|---|---|---|---|
Key-Map | Y | H | G | J |
Movement | DIAG-UP-LEFT | DIAG-UP-RIGHT | DIAG-DOWN-LEFT | DIAG-DOWN-RIGHT |
---|---|---|---|---|
Key-Map | Q | W | E | R |
To run a simulation, run the following with desired parameters in CLI.
python overcooked_server/game.py --num_ai_agents=2 --is_simulation=True --simulation_episodes=500