Giter Site home page Giter Site logo

radajakub / doubleoracle Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 421 KB

Double Oracle algorithm to solve problems from non-cooperative game theory

Home Page: https://radajakub.github.io/DoubleOracle/

License: MIT License

Julia 100.00%
gametheory julia

doubleoracle's Introduction

DoubleOracle

Solving two-player zero-sum Normal-Form games by Linear programming and DoubleOracle algorithm.

Installation

No additional installation steps are required, the julia package manager manages everything automatically.

This package uses the Coin-Or linear optimizer, which is downloaded automatically by julia when adding the package. This optimizer can be viewed at github.

Documentation

Documentation is present directly in the source code files as docstrings. Moreover, a version generated by Documenter.jl is hosted on GithubPages on url: https://radajakub.github.io/DoubleOracle/ Visit this site to see descriptions of functions and methods together with examples.

Prepared scripts

There are few prepared scripts in the scripts directory to demonstrate functionality.

User can use one of three scripts to solve a game which complies with the description in documentation. The game can be either passed from a text file by an optional first parameter to the scripts, or a random game will be generated if no path_to_input_file is specified. The format of the input file can be deduced from example games located in data/nf_games/. The parameters of the random generator can be edited directly in the scripts.

These scripts run the given algorithm(s) and print the output to stdout.

  • solve_nf_lp.jl [path_to_input_file] solves a game using Linear programming.

    • for example to solve Matching pennies by Linear programming use: julia solve_nf_lp.jl ../data/nf_games/matching_pennies.nfg
  • solve_nf_do.jl [path_to_input_file] solves a game using the Double Oracle algorithm.

    • for example to solve Matching pennies use: julia solve_nf_do.jl ../data/nf_games/matching_pennies.nfg
  • solve_nf_both.jl [path_to_input_file] solves a game using the Linear programming and Double Oracle algorithm.

    • for example to solve Matching pennies use: julia solve_nf_both.jl ../data/nf_games/matching_pennies.nfg

Another script is provided, however not meant for user usage.

  • benchmark.jl was used to generate plots visible in the documentation. It's execution takes some long time, it does not showcase any functionality, it only measures performance.

Tests

Test can be run by executing test in package manager mode in julia REPL. Also, they are run automatically on each push or pull request to master branch via GitHub Actions. Past reports can be seen in the GitHub Actions tab of this repository.

doubleoracle's People

Contributors

radajakub avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.