No project description provided
Project description
game_resolver
This library is internal library for nishino-lab(The University of Tokyo)
http://www.css.t.u-tokyo.ac.jp
Run Sample Game
This library has three type sample games(prisoner, battle of sex, cournot).
from game_resolver.games.custom_game import Prisoner
from game_resolver.nash_equilibrium import NashEquilibrium
prisoner = Prisoner()
ne = NashEquilibrium()
eq = e.get_equilibrium(g)
for i in eq:
print(i)
Run your own game
A Nash equilibrium can be solved by representing the problem to be solved in the Game class.
from game_resolver.games.custom_game import CustomGame
from game_resolver.nash_equilibrium import NashEquilibrium
player_num = 2
action_list = ["Cooperate", "Defect"]
all_player_action_list = [
("Cooperate", "Cooperate"),
("Cooperate", "Defect"),
("Defect", "Cooperate"),
("Defect", "Defect")
]
payoff_list = [
[3, 0, 5, 1],
[3, 5, 0, 1]
]
your_own_game = CustomGame("volunteer_dilenma",
player_num,
action_list,
all_player_action_list,
payoff_list)
e = NashEquilibrium()
eq = e.get_equilibrium(your_own_game)
for i in eq:
print(i)
Project details
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 game_resolver-0.3.1.tar.gz.
File metadata
- Download URL: game_resolver-0.3.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.12.1 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b1a50d5cef48f8624fec09f964bdddffd7ee6dfc5a76d4218e7a6a9f5b884a4
|
|
| MD5 |
975b92920b82dc011233f7c87b750e17
|
|
| BLAKE2b-256 |
8efe673ee006587847b8f825948761b4c5b8f2e50f120bbe06a1c54e01068d75
|
File details
Details for the file game_resolver-0.3.1-py3-none-any.whl.
File metadata
- Download URL: game_resolver-0.3.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.12.1 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c23f3370ef4e802f3c8e42e1b60053cb7c7ff074b7a19733df706b7a9af732
|
|
| MD5 |
a42a63e4df57f0bf69708b98a4dc11de
|
|
| BLAKE2b-256 |
71aff9457c584783c55c4e87a43d159b13d8d7ee20e857abd7c95d2ebf13acdf
|