Generalized Geography Game Solver
Project description
Generalized Geography Game Solver
Install
$ pip install generalized-geography
Example
import generalized_geography as gg
import networkx as nx
graph = nx.DiGraph()
graph.add_edges_from([(1, 2, {"num": 2}), (2, 3, {"num": 5}), (3, 1, {
"num": 1}), (3, 4, {"num": 1}), (4, 4, {"num": 5})])
result = gg.deg_classify_fast(graph)
lose, win = gg.split_nodes_by_resolved_type(result.type_map)
print("Lose nodes:", lose)
print("Win nodes:", win)
print("Unknown nodes:", result.pruned_graph.nodes)
type_map = gg.deg_classify_complete(graph)
print()
print("After complete classification:")
lose, win = gg.split_nodes_by_resolved_type(type_map)
print("Lose nodes:", lose)
print("Win nodes:", win)
# Lose nodes: []
# Win nodes: [4]
# Unknown nodes: [1, 2, 3]
# After complete classification:
# Lose nodes: [2]
# Win nodes: [1, 3, 4]
Documentation
RDG
Directed Edge/Vertex Geography with Repetitions
DEG
Directed Edge Geography
DVG
Directed Vertex Geography
CDEG
Changeable DEG
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 generalized_geography-0.0.17.tar.gz.
File metadata
- Download URL: generalized_geography-0.0.17.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee07db17e0ba84e8a3928ddf19486f42621921ce2f495e6013c942ec1cd17b41
|
|
| MD5 |
3dd73b36a4153b1b5f51975d8551650e
|
|
| BLAKE2b-256 |
caa53a7eb130d56b61a8261f1fd7b22a53f153d96e6cfcd3e92ce46a4483dd2c
|
File details
Details for the file generalized_geography-0.0.17-py3-none-any.whl.
File metadata
- Download URL: generalized_geography-0.0.17-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce5f44cb8049e1923d53da7c14de2ccdaa8e893fc7cf7e66af4c97fd497b09ca
|
|
| MD5 |
24f5132c81aab22c56695dec39531ca1
|
|
| BLAKE2b-256 |
0bc1b918bdd3b65dd1ad3f840c23ca5314d534d1e62368cc0fd769d87a43525c
|