A library for game theory algorithms in Python
Project description
GameKit
What is this?
This is a python package for game theory-related algorithms.
How can I install this?
pip install gameTheory
Usage:
from game_theory.algorithms.bankruptcy import constrained_equal_losses
# Example: Constrained Equal Losses
claims = [60, 90]
asset = 100
allocations, r = constrained_equal_losses(claims, asset)
print(allocations, r)
# Output: [35.0, 65.0] 25.0
Note: Currently, this repository is under development.
What do you mean by a library for game theory?
In game theory, we deal with problems like finding equilibrium, evolutionarily stable strategies, stable matching, fair division, bankruptcy, voting, etc. In this package, we are implementing the algorithms proposed for these problems. For example, a function that finds the stable matching for marriage problem with the Gale-Shapley algorithm.
Can I contribute to this repository?
We would be glad if you contributed to this package even by creating an issue and requesting a new feature. You are always welcome to make a bug report, open an improvement suggestion issue, or send pull requests. Moreover, you can implement the new feature issues that have not been assigned and send pull requests.
Also look at the TODO list for the next features or improvements.
Where can I find the theory behind the algorithms?
- Game Theory, Alive
- Any other game theory book
Build and Test
To build the package, you can use the following command:
python3 -m build
To test the package, you can use the following command:
pytest
How can I contact you?
You can open a new discussion in this repository's Discussion section for any question.
If you want to contact us by email, you can send your feedback, question, proposal, or requests to ali@faraji.info
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gametheory-0.2.1.tar.gz.
File metadata
- Download URL: gametheory-0.2.1.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b678da18756e80bdc7e3180b2ec5713910d24690d26dcf2279dcdb9e434a05e
|
|
| MD5 |
1e64a7dbc424177b96c83e395ad6451d
|
|
| BLAKE2b-256 |
962b902946a27f01ca4f017874e82063c3e29f7a00581a514001825c81ece4bf
|
File details
Details for the file gametheory-0.2.1-py3-none-any.whl.
File metadata
- Download URL: gametheory-0.2.1-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11dbbbe388a4baec305d2bce319e1c5870674a659ce1c04f43c658ac07b95ad6
|
|
| MD5 |
191da67b6389c0fc5ff00b43c141832d
|
|
| BLAKE2b-256 |
d3f1aa3ab14baa32e872674ead648f187298d6d98cd0eb73c54c4f4db515039d
|