A library for the study of cooperative game theory. It works with characteristic function games and provides the Shapley value, checks of standard properties (validity, monotonicity, superadditivity, convexity), and core membership.
Full documentation, including a theory section, is available here: https://drvinceknight.github.io/coopgt/
$ python -m pip install coopgtThis project uses uv for environment management,
ruff for linting and formatting,
ty for type checking, and
zensical for the documentation.
Clone the repository and install the development dependencies:
$ git clone https://github.com/drvinceknight/coopgt.git
$ cd coopgt
$ uv sync --group devRun the checks and the test suite:
$ uv run ruff check src/ tests/
$ uv run ruff format --check src/ tests/
$ uv run ty check src/
$ uv run pytestBuild and preview the documentation:
$ uv run zensical build
$ uv run zensical serveIn the interest of fostering an open and welcoming environment, all contributors, maintainers and users are expected to abide by the Python code of conduct: https://www.python.org/psf/codeofconduct/