Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generalized_geography-0.0.14.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

generalized_geography-0.0.14-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file generalized_geography-0.0.14.tar.gz.

File metadata

  • Download URL: generalized_geography-0.0.14.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

Hashes for generalized_geography-0.0.14.tar.gz
Algorithm Hash digest
SHA256 b37bb3ea9f7df7bdbcddcca68d6b351c3becbedc9143b8ba68244b95c1bd0c7b
MD5 7d15a485aafeaf75c3981a41b0481f42
BLAKE2b-256 b02caaf53a2335a3f1fe2d27debf5a29a3bc24b5857d63e197730e59ddcad0aa

See more details on using hashes here.

File details

Details for the file generalized_geography-0.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for generalized_geography-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e1c1a4c1e0e777cc3e90721796515bfc609b82797de60d37352cfd47ab79f21a
MD5 8485f829f68a6e527e6d1416c7ae4bf6
BLAKE2b-256 974000b3228e9704389c2d7ba34acbf9f084578fda798ebb5053a11241c44274

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page