An updated and extended version of the paper is now available: Combining a Meta-Policy and Monte-Carlo Planning for Scalable Type-Based Reasoning in Partially Observable Environments. The code for the newer paper is available at: https://github.com/Jjschwartz/potmmcp.
This repository contains the implementation of the Bayes Adaptive Monte-Carlo Planning algorithm for Partially Observable Stochastic Games (BA-POSGMCP) algorithm used for the AAMAS paper Bayes-Adaptive Monte-Carlo Planning for Type-Based Reasoning in Large Partially Observable Environments.
Available in this repository are the:
The library is implemented in python 3.8
and has the following main dependencies:
- Pytorch >=1.11,<2.0
- Rllib == 1.12
- posggym == 0.1.0
- posggym-agents == 0.1.1
As with any python package we recomment using a virtual environment (e.g. Conda).
Installation of baposgmcp
requires cloning the repo then installing using pip:
git clone [email protected]:Jjschwartz/ba-posgmcp.git
cd ba-posgmcp
pip install -e .
This will install the baposgmcp
package along with the necessary dependencies.
And voila.
There are two main parts to the codebase:
- The
baposgmcp
directory containing thebaposgmcp
python package - The
experiments
directory containing scripts and Jupyter notebooks for running and analysing the experiments used in the paper. The results are also store here.
The baposgmcp
python package contains a few main parts:
baselines
- implementation code for the different baselines used in the paperplot
- code used for generating plots and running analysisrun
- code for running and tracking experimentstree
- the implementation of the BA-POSGMCP algorithmmeta-policy.py
- classes and functions implementing the meta-policypolicy_prior.py
- classes and functions implementing the prior over policies
The main implementation of the BA-POSGMCP algorithm is contained in the baposgmcp/tree/policy.py
file.
This directory contains scripts for running the experiments in each environment as well as Jupyter notebooks for analysing the results and the actual results files.
If you run any of the experiment scripts, by default experiment results are saved to the ~/baposgmcp_results
directory.
If you have any questions or issues please email [email protected] or create an issue in the issue section on github.
Jonathon Schwartz (primary author and code writer/maintainer) and Hanna Kurniwati
If you use the code in this repository or the BA-POSGMCP algorithm, please consider citing the latest version of this work. The citation instructions are available in the README at: https://github.com/Jjschwartz/potmmcp