• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 13 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simulator for Dominion card game strategies

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!

This is old code

I did most of my work on this in 2014. CoffeeScript was a beneficial thing at the time, because JavaScript before ES2015 was a bad language.

Now there are better ways to write nice JavaScript, and also there are several more Dominion packs that I never accounted for. I'm permissively licensing the code so that anyone who is interested can pick up the pieces.

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.

More Repositories

1

python-ftfy

Fixes mojibake and other glitches in Unicode text, after the fact.
Python
3,747
star
2

wordfreq

Access a database of word frequencies, in various natural languages.
Python
698
star
3

langcodes

A Python library for working with and comparing language codes.
Python
340
star
4

ordered-set

A mutable set that remembers the order of its entries. One of Python's missing data types.
Python
210
star
5

wiki2text

Extract a plain text corpus from MediaWiki XML dumps, such as Wikipedia.
Nim
132
star
6

text-as-data

A PyData 2013 talk on straightforward, data-driven ways to handle natural language text in Python.
Python
50
star
7

wikiparsec

An LL parser for extracting information from Wiki text, particularly Wiktionary.
Haskell
48
star
8

solvertools

Mystery Hunt solving tools for Metropolitan Rage Warehouse. Or anyone really.
JavaScript
32
star
9

scholar.hasfailed.us

Google Scholar is a trans-exclusionary site. Don't use it. Help us demand change.
HTML
22
star
10

dominiate-python

A Python implementation of the card game Dominion
Python
15
star
11

openmind-commons

The dynamic Web site that lets people browse and contribute to Open Mind Common Sense and ConceptNet.
JavaScript
11
star
12

dominionstats

The code behind councilroom.com.
JavaScript
11
star
13

csc-pysparse

A fast sparse matrix library for Python (Commonsense Computing version)
C
10
star
14

music-decomp

Associating music/sound and semantics
Python
10
star
15

mixmaster

Smarter than the average anagrammer.
Python
9
star
16

language_data

An optional supplement to `langcodes` that stores names and statistics of languages.
Python
7
star
17

scorepile

A repository of Innovation games played on Isotropic
JavaScript
6
star
18

solvertools-2014

Julia
4
star
19

adventure

Common sense experiments for working with text adventures.
Python
4
star
20

charcol

An experiment to collect unusual characters from Twitter.
Python
4
star
21

verb-aspect-learning

A hierarchical Bayesian model of biases in how people learn novel verbs
3
star
22

dominion-rank

Calculate ranks based on people's play on dominion.isomorphic.org.
Python
3
star
23

countmerge

A command-line tool that adds counts for sorted keys.
Rust
3
star
24

svdview

A Processing viewer for the results of dimensionality reduction.
Java
3
star
25

spacious_corpus

A corpus build process for use with SpaCy projects
Python
3
star
26

colorizer

JavaScript
2
star
27

analogy_farm

A Web-based puzzle from MIT Mystery Hunt 2013.
Python
2
star
28

irepad

An IRE PROOF collaborative editor, built on FirePad.
JavaScript
2
star
29

rust-nlp-tools

Rust
2
star
30

rspeer-web

My personal Web site.
JavaScript
2
star
31

rspeer.github.io

rspeer's Octopress site
TeX
1
star