Giter VIP home page Giter VIP logo

starcraftnash's Introduction

StarcraftNash

Repository with code for strategy selection in StarCraft.

StarCraft is a complex game and players often resort to strategies (policies that map game states to actions). Here, we abstract game details and deal with strategy selection.

StarcraftNash project runs a round-robin tournament between strategy selection methods for StarCraft. In the tournament, methods play each other for a number of matches, selecting strategies that play a game of StarCraft. As strategy may interact in interesting forms (like rock-paper-scissors), it is useful to develop smart strategy selection methods.

Please read the wiki for a detailed discussion on how the software works and how you can implement and test your own strategy selection methods.

Dependencies

  • NashPy: sudo -H pip2 install nashpy
  • XlsxWriter: sudo -H pip2 install XlsxWriter

Example

(assuming you have cloned the project and are located at project's root directory)

Run a tournament with 500 matches between Nash and Random Uniform methods, useing a default pool of matches and parameters.

python main.py -a nash -b random_uniform -i results_demo/fortress1000.txt -m 500

Accepted parameters are:

-i: File with the pool of matches (more information [here](wiki/Pool-of-matches))
-a: Strategy selection method for player a [optional if -t is supplied]
-b: Strategy selection method for player b [optional if -t is supplied]
-m: Number of matches between strategy selection methods
-t: Round-robin tournament with all the strategies
-s: Random seed for experiments
-r: Number of tournament repetitions
-e: Outputs tournament score chart to a .xls file given by this parameter
-oi: Output folder with intermediate results in CSV format of every tournament repetition
-or:'Output folder with the results in CSV format of every repetition of matches
-v: Verbose - prints informations about the games
-en: Parameter that defines the exploitation in an e-nash strategy
-eg: Defines the exploration in an e-greedy strategy
-sh: Shuffle the list of matches before each repetition
-p: Plot the results

Run tournament with experiment parameters given by a default .xml configuration file:

python main.py -c config/config_fortress.xml

Where -c specifies the path to the configuration file. Check this wiki page for instructions on how to specify parameters via the experiments configuration file.

starcraftnash's People

Contributors

amandaccsantos avatar andertavares avatar barbaragcol avatar danielkneipp avatar h3ct0r avatar luci-dot-exe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.