Skip to main content

GameKit

PyTests Publish Python Package

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?

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

Metadata

Release files for gameTheory 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gameTheory 0.2.1
File Size Uploaded
gametheory-0.2.1.tar.gz 46.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gameTheory 0.2.1
File Interpreter ABI Platform
gametheory-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 76.1 kB

Release files / gametheory-0.2.1.tar.gz

Download URL gametheory-0.2.1.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9b678da18756e80bdc7e3180b2ec5713910d24690d26dcf2279dcdb9e434a05e
BLAKE2b-256 checksum
How to use checksums
962b902946a27f01ca4f017874e82063c3e29f7a00581a514001825c81ece4bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / gametheory-0.2.1-py3-none-any.whl

Download URL gametheory-0.2.1-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11dbbbe388a4baec305d2bce319e1c5870674a659ce1c04f43c658ac07b95ad6
BLAKE2b-256 checksum
How to use checksums
d3f1aa3ab14baa32e872674ead648f187298d6d98cd0eb73c54c4f4db515039d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.4

2 release files

0.0.4

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page