GithubHelp home page GithubHelp logo

bmcmurray / dominiate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rspeer/dominiate

0.0 3.0 0.0 31.56 MB

A simulator for Dominion card game strategies

Home Page: http://rspeer.github.com/dominiate

License: GNU Affero General Public License v3.0

dominiate's Introduction

Dominiate

Dominiate is a Dominion simulator, in which you can program bots to follow strategies that you define and see which one wins.

It is inspired by Geronimoo's Dominion Simulator. It shares the feature that, to define many possible strategies, you may simply list cards and conditions in which to buy them in priority order.

The code is meant to be open and extensible. Many other aspects of a strategy can be overridden, including its preferences for how to play actions. If this system doesn't allow you to define the strategy you want and you're okay with writing more code, I encourage you to fork the simulator and change it so that it does.

Dominiate is written in CoffeeScript, which compiles to JavaScript. This means it can either run at the command line using node.js, or it can run natively in a Web browser!

Documentation

The docs directory contains documentation in the "literate programming" style -- that is, it shows you the code in parallel with explanations of what it does.

Installation

To use the command-line version, you will need a reasonable development environment with a command line.

First, acquire node.js (v0.4 or later) and npm (the Node Package Manager). The best way to do this differs by operating system and changes a lot.

Enable CoffeeScript by running sudo npm-g install coffee-script (or whatever the equivalent is on Windows). Now node.js will understand CoffeeScript source files.

Running "./play.coffee bot1 bot2" will load the bots with the specified names and play them against each other. For example:

./play.coffee strategies/BigMoney.coffee strategies/ChapelWitch.coffee

Building the Web app

The Web version of Dominiate is built using CoffeeScript and Less CSS.

On a reasonable UNIX computer (including Linux and Mac OS): Follow the instructions above to set up CoffeeScript. You should also install Less CSS with sudo npm-g install less.

Then, type make to build the JavaScript and CSS files that will be used on the Web.

Do not edit the computer-written JavaScript directly! That way lies madness.

On Windows: you can now compile the CoffeeScript files on Windows, using an included CoffeeScript compiler, windows/coffee.exe. (Being an .exe file downloaded from the Internet, you of course run this at your own risk.)

Running windows/compile.bat should do the Right Thing, but I haven't tested it. See windows/README for more information.

Genetic algorithm version

Dr. Mitchell Morris is working on an exciting version of Dominiate that can evolve new strategies using genetic algorithms. You can find this version at https://github.com/Narmical/dominiate.

Roadmap

Short-term planned features include:

  • Implement almost all the cards
  • Don't buy cards that make you instantly lose
  • Test cases, making sure the simulator keeps working in weird situations

Some specific features I hope for Dominiate to eventually have appear tagged with "feature" on the Issues list.

dominiate's People

Contributors

bilts avatar davio avatar drheld avatar jorbles avatar kcrca avatar michaeljb avatar robdennis avatar

Watchers

 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.