Simple environment for experimenting with cooperative matrix game.
Author: Paresh R. Chaudhary (pareshrc@uw.edu)
This repository provides a framework for creating and experimenting with cooperative game. It includes tools for generating game layouts, calculating payoffs, and simulating agent interactions.
The project is organized into the following directories:
env/: Contains the game environment implementations and matrix game logicpolicy/: Houses policy implementations for different agentstrainer/: Contains training algorithmsutils/: Utility functions and helper modulesrunner/: Scripts for running experiments and simulationsgoat.py: Implementation of the GOAT algorithmgoat_search.py: Hyperparameter search routines for GOATcomedi.py: Implementation of the comedi algorithmmep.py: Implementation of the MEP algorithmtrajedi.py: Implementation of the trajedi algorithmsp.py: Implementation of the SP (Self-Play) algorithm
results/: Directory for storing experiment results and outputs
# Clone the repository
git clone https://github.com/pareshrchaudhary/cooperative_matrix_game.git
cd cooperative_matrix_game
# Create and activate conda environment
conda create -n cmg python=3.11
conda activate cmg
# Install dependencies
pip install -r requirements.txt
# Install the package in development mode
pip install -e .
# Set the PYTHONPATH (required for imports to work correctly)
export PYTHONPATH=$PYTHONPATH:/path/to/parent/directory
# For example, if your package is at /Users/username/dev/cooperative_matrix_game:
export PYTHONPATH=$PYTHONPATH:/Users/username/devAfter installation and setting the PYTHONPATH, you can run individual algorithm files to run experiments and generate results.:
python runner/mep.pyor
- Generate CoMeDi data to train VAE.
python runner/comedi.py- Train VAE.
python trainer/vae_trainer.py- Train GOAT.
python runner/goat.pyor
@article{chaudhary2025improving,
title={Improving Human-AI Coordination through Adversarial Training and Generative Models},
author={Chaudhary, Paresh and Liang, Yancheng and Chen, Daphne and Du, Simon S and Jaques, Natasha},
journal={arXiv preprint arXiv:2504.15457},
year={2025}
}