GitXplorerGitXplorer
p

egsolver

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
098a63ca08dddcef54926f16407102daa85b156e

fix dot output (nx api change..)

ppazz committed 7 years ago
Unverified
eb3e040490c24d5fd7d219be24c46279309710ca

networkx api change

ppazz committed 7 years ago
Unverified
ab9e2f9f5a61737220581458c8ad24a71daa1743

remove unnecessary code in dot formatter

ppazz committed 7 years ago
Unverified
c4ceefa105f7c02b9bc81f528bab5e5ba28a1998

energy-to-parity reduction

ppazz committed 8 years ago
Unverified
7908dc857a520b7bab1225054ae2f5ad35825176

more consistent module names

ppazz committed 8 years ago
Unverified
fbff21ea12319192e2164931b033321544a627b2

convert to parity games in pgsolver format

ppazz committed 8 years ago

README

The README file for this repository.

Egsolver solves finite, two-player energy games [0,1,2]. It computes the winning region and a winning strategy for the energy player using a simple progress measure refinement procedure (see e.g. [2]).

It is written in python and loosely motivated by the pgsolver suite for parity games.

Installation

Get the latest version:

git clone git@github.com:pazz/egsolver.git

In case you have pip installed, the following will do.

pip install ./egsolver

Otherwise, manually install the dependencies:

  1. numpy
  2. networkx

On debian/ubuntu:

sudo aptitude install python-networkx python-numpy

Now install egsolver using the setup script:

./setup.py install --user

This should install the executable as $HOME/.local/bin/egsolver.

Usage

There are currently three subcommands: convert, generate, and solve.

>egsolver -h

usage: egsolver [-h] [-v] [--version] [-l LOGFILE] {convert,generate,solve} ...

energy game solver

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase verbosity
  --version             show program's version number and exit
  -l LOGFILE, --logfile LOGFILE
                        where to log to; defaults to '-' (stdout)

commands:
  {convert,generate,solve}
    convert             convert game description to another format
    generate            generate a random game
    solve               solve a game

Also check out egsolver solve -h etc..

To generate a random game (with 5 states, edge- and owner probability 1/2 and maximal absolute effect 10):

egsolver generate 5 0.5 0.5 10

To generate and solve a random game:

egsolver generate 5 0.5 0.5 10 | egsolver solve

To further format the result in dot-format and display with xdot:

egsolver generate 5 0.5 0.5 10 | egsolver solve -f dot | xdot -

Input Format

egsolver uses a custom JSON format, designed with portability and later extensions to other types of games in mind. To see an example, just generate a random game graph.