Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tmcclintock/monopolymath

Mathematics of the game Monopoly.
https://github.com/tmcclintock/monopolymath

Last synced: 26 days ago
JSON representation

Mathematics of the game Monopoly.

Awesome Lists containing this project

README

        

# MonopolyMath

Monopoly is a terrible board game. One realizes this after the age of ten. However, Monopoly is actually a very beautiful game, mathematically speaking. This repository offers some neat tools to simulate the game of Monopoly so that we can look at the mathematical properties of the game. Specifically, you can find here the means to simulate an arbitrary number of rolls in order to numerically calculate the probability of landing on each space. Additionally, you can acquire the "transition matrix" of the game, or the matrix that describes the probability of landing on any other square starting from any particular square. This incorporate such game mechanics as the jail, doubles to escape jail, chance, and community chest cards.

This project is inspired by a talk given years ago at the University of Arizona by [Maxwell Gregoire](https://www.linkedin.com/in/maxwell-gregoire-6b2199107), who was a grad student at the time and is now postdoccing at ARL.

## Installation

To install just do:
```bash
python setup.py install
```
If you are missing any requirements, you can install them with `pip` using
```bash
pip install -r requirements.txt
```
Once the package is installed, run the unit tests with
```bash
pytest
```
If any tests fail, please copy the test output into an issue on GitHub. Thank you!