gnnparitygames

Project for graph neural networks learning to play parity games.

https://github.com/dillon-ward/gnnparitygames

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Project for graph neural networks learning to play parity games.

Basic Info
  • Host: GitHub
  • Owner: dillon-ward
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 25.4 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

License: MIT REUSE status Badge: Citation File Format Inside

gnnprsolver

Requirements

pip install --user torch torch-geometric

Train models

Use

./gnn-pg-solver.py train --network GAT --output GAT_weights.pth games/game_1.txt solutions/solution_1.txt

or its equivalent using shorthand options

./gnn-pg-solver.py train -n GAT -o GAT_weights.pth games/game_1.txt solutions/solution_1.txt

Predict winning regions

We assume that the directory games contains a set of plain-text files containing parity games. Use

./gnn-pg-solver.py predict --network GAT --weights GAT_weights.pth --output results.csv games/*

or its equivalent using shorthand options

./gnn-pg-solver.py predict -n GAT -w GAT_weights.pth -o results.csv games/*

Evaluate predictions

First, generate some predictions using the command in the previous section. We assume that for each game games/game_XXXX.txt there exists a solution solutions/solution_game_XXXX.txt.

The evaluate subcommand expects the input to be in the form game prediction reference, so we need to add the final column to the results before handing them to the evaluation.

sed 's:^games/game_\([0-9]*\).txt.*$:solutions/solution_game_\1.txt:' < results.csv > solutions.csv
paste -d' ' results.csv solutions.csv | ./gnn-pg-solver.py evaluate 

Owner

  • Name: dwardy
  • Login: dillon-ward
  • Kind: user

Passionate programmer currently studying Comp Sci at uni.

Citation (CITATION.cff)

# SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
# SPDX-FileContributor: Alexander Weinert <alexander.weinert@dlr.de>
#
# SPDX-License-Identifier: CC-BY-NC-ND-3.0

cff-version: 1.2.0
message: "If you use gnn_pr_solver in your research, please cite it using these metadata."
title: gnn_pr_solver
abstract: "gnn_pr_solver is a prototypical incomplete solver for parity games based that uses graph neural networks"
authors:
  - family-names: Hecking
    given-names: Tobias
    affiliation: "German Aerospace Center (DLR)"
    orcid: "https://orcid.org/0000-0003-0833-7989"
license: MIT
repository-code: "https://github.com/DLR-SC/gnn_pr_solver"

GitHub Events

Total
Last Year