Giter Site home page Giter Site logo

susuhahnml / asp-game-strategies Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 71.13 MB

Learning game strategies in ASP (clingo) using minimax and inductive logic programming (ILASP) :clubs: :game_die:

Shell 2.72% Python 93.58% R 3.71%
game-strategy nim tic-tac-toe clingo answer-set-programming minimax monte-carlo-tree-search ilasp

asp-game-strategies's Introduction

Game play strategies powered by ASP โ™ฃ๏ธ ๐ŸŽฒ

Overview

With this framework, we want to encourage the use and research of Answer Ser Programming(ASP) in two-player games. Our implementation allows simple expansions for new games following the Game Description Language formalisms as well as new approaches for learning strategies. These expansions will automatically generate command-line tools to build strategies, create agents and compute benchmarks. We also make available the tree visualizations by simply defining an ASCII representation of the states for the new game. In the README we include a detailed explanation of how to extend it with new games and approaches.

Game description

The description of the games is represented in ASP and it is called from python using Clingo API to compute the legal actions and successor states.

To represent the game encoding we use Game Description Language (GDL), allowing the formalization of any finite game with complete information. This framework only works with two-player games with complete information where turns alternate after every move.

Some of the already available games are Nim and TicTacToe.

Learning approaches

We consider as a learning approach, a process that is capable of creating a strategy given a game description and use such strategy latter on to choose actions during game play. A strategy might involve an additional ASP file, a pre-computed tree search, a machine learning model among many other.

All approaches can be found inside the approaches directory. Every folder in this directory will automatically generate command-line arguments to run the building of the strategy and to play such approach against other, generating usefully benchmarks.

The instructions to create a new strategic approach can be found here. Please refer to the README.md file in each approach for any specific information.

Methodologies

Information on our source code and workflow can be found in the src directory.

Development

A comprehensive changelog can be found here. You can fork this repo and extend it with your own approach and game definitions.

Citations

Gebser, Kaminski, Kaufmann and Schaub, 2019 (Clingo)

@article{gebser2019multi,
  title={Multi-shot ASP solving with clingo},
  author={Gebser, Martin and Kaminski, Roland and Kaufmann, Benjamin and Schaub, Torsten},
  journal={Theory and Practice of Logic Programming},
  volume={19},
  number={1},
  pages={27--82},
  year={2019},
  publisher={Cambridge University Press}
}

Law, Russo and Broda, 2015 (ILASP)

@misc{ILASP_system,
  author="Law, Mark and Russo, Alessandra and Broda, Krysia",
  title="The {ILASP} system for learning Answer Set Programs",
  year="2015",
  howpublished={\url{www.ilasp.com}}
}

Authors

Susana Hahn, Atreya Shankar

Cognitive Systems, University of Potsdam, WiSe 2019/20

asp-game-strategies's People

Contributors

atreyasha avatar dependabot[bot] avatar susuhahnml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

asp-game-strategies's Issues

Benchmarking performance of algorithms

  • Compare Tree minimax and min_max_asp algorithms โœ”๏ธ
  • Show average runtimes with standard deviations โœ”๏ธ
  • Check performance of various players against each other (for example human vs. min_max player) with possible time limits โœ”๏ธ

Add new games for breadth of project

  • @atreyasha Add tic-tac-toe game with background.lp, new game definitions and more agnostic visualization โœ”๏ธ
  • @atreyasha debug issues with tic-tac-toe related to step and state โœ”๏ธ
  • @atreyasha update changelog with new goals and perspectives โœ”๏ธ
  • @atreyasha return bold pretty print to html visual, or other emphasis tricks for terminal โœ”๏ธ
  • @susuhahnml Add full_time.lp for extra games โœ”๏ธ
  • @susuhahnml Add domino game as the third game from RL project โœ”๏ธ

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.