Take the 2-minute tour ×
Board & Card Games Stack Exchange is a question and answer site for people who like playing board games, designing board games or modifying the rules of existing board games. It's 100% free, no registration required.

Dominion is the specific example I would like to play with but this certainly applies to any game that involves decks of cards being shuffled and drawn.

I often see references to various simulations that people have run or built to test theories but whenever I dig through their code I seem to discover their simulation was custom-built for one or two test cases.

The question I am asking: How are people making these simulations so quickly? I assume that there are a few preferred (or common) ways to do this seeing how many times I see people talking about their simulations. What is a good starter kit for me to learn how to do my own?

Answers that will help: Specific languages, libraries, helpful mathematic formulae, links to projects, and typical pitfalls to avoid.

share|improve this question
add comment

3 Answers 3

up vote 7 down vote accepted

I admit I don't have much experience in actually doing this, so I have no idea how well any of these actually work and can't make any guarantees myself. But I'm sure there are others who can, and these are probably some great starting points:

dominion simulator python framework

similar project

vdom java simulator

A sourceforge project

Dominionsim is also mentioned here

Here are some I found for Magic: The Gathering. Once again, I can't make any personal guarantees:

MTG Studio (don't know if it actually supports simulations)

Magic Workstation

If you are anyone else has more feedback on any of these, I'd love to here it!

share|improve this answer
    
I've used and was reasonably happy with the python simulator 1.5 years ago, but now I think it has fallen behind and doesn't support all cards. –  rrenaud Mar 3 '11 at 1:51
    
Great links. I was hoping for more of a generic "This is how to write a simulator" but learning by example works for me. :) If no better answer appears in a few days I will accept this one. –  MrHen Mar 4 '11 at 20:20
1  
@MrHen OH! I didn't know you wanted to know how to write one. That's probably more on-topic for Stackoverflow than here. :) –  Gordon Gustafson Mar 4 '11 at 20:28
    
I am not so much worried about writing one from scratch but I am interested in the details. Maybe "this is how to use a simulator" is a better wording. –  MrHen Mar 4 '11 at 20:36
add comment

I'm one of the guys working on DominionSim (although the googlecode version isn't up to date*) and we're trying to implement all the cards/rules, not just build for one test case. That said, we still have a ways to go implementing cards.

The way DominionSim in particular works:

  • it's written in C#
  • to test a specific behavior you write a Strategy class that implements IStrategy
  • we've done several simplistic strategies using the base set already
  • supports 2 to 6 player games
  • supports "tourneys" that play all the strategies against each other at least once

Theoretically once we've implemented all the cards it'll be pretty easy to test new ideas, although at the moment it would still require downloading the source code and adding your own IStrategy implementation written in C#. I may investigate implementing a rules-based Strategy like those found at the Simulate Dominion blog at some point, so that folks could just mess with a rules file and not need to recompile or know C#.

*Hopefully the latest version will be publicly available soon

share|improve this answer
add comment

Geronimoo's Dominion Simulator seems to be the current Dominion simulator of choice, at least by the guys on dominionstrategy.com. It has only existed since June, I think, so didn't get mentioned in the accepted answer which is otherwise very comprehensive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.