Metadata-Version: 2.4
Name: generalized-geography
Version: 0.0.9
Summary: Generalized Geography Game Solver
Home-page: https://github.com/singrum/generalized-geography
Author: Hyomin
Author-email: miamiq0000@gmail.com
Keywords: generalized geography,word chain,game,graph theory
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: networkx
Requires-Dist: matplotlib
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Generalized Geography Game Solver

## Install

```console
$ pip install generalized-geography
```

## Example

```python
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
