A dominion simulator for playing the card game of dominion.
The goals of the project are as follows, in priority order.
- Create a game engine which enforces the rules of Dominion the game. Separation of Game Rules from AI or heuristics is required.
- Simulation of all available dominion cards.
- Ability to easily extend the game engine with custom cards.
- Include a foundation for easily composing strategies from simple build orders.
- Include default strategies for playing most cards.
- Create a strategy optimizer that given a set of 10 cards, finds the best combination to play.
Goal 6 is lofty - but would be very nice :).
- Install Visual Studio express desktop 2012. You only need C#.
- Load Dominion.sln from the root of the repository
- Set a breakpoint at the end of main in Program.cs (You don't want to lose the output)
- Run the "TestProgram" from the ide.
The simulator does 2 primary things right now.
-
It compares 2 strategies against each other, and tells you which one is better.
The ComparePlayers method does this. -
It compares a specific strategy against all other known strategies.
Use CompareStrategyVsAllKnownStrategies for this.
You will have to tweak the main program to get it to do one of the above. There is no UI for it
All output is to the console right now. Set a break point at end of main so you don't lose the output under the debugger.
You can also find individual log files for example games under TestProgram/Results. These log files are crucial when debugging the new strategy.
You can write a strategy to behave any way you want, but that's a lot of work.
Most strategies right now derive from PlayerAction. You specify a purchase order, discard order, trash order etc... along with a few method overrides and voila!
There are many example strategies included already. Look in the TestProgram/Strategies folder.
I am the only ones making checkins right now, but please send me a changelist of anything you would like and I will try to get it included.
Though the project is public, please refrain from forking the code. When I'm making changes, there will be large amounts of refactoring and re-organization. I will keep everything checked in working, but will not be worried about breaking external dependencies.
I have decided to begin collaboration on this project before it is complete. It's already useful enough for people to play around with it. Expect to find bugs.
- Many of the cards are implemented, but not all of them. Goal is to eventually have them all complete.
- Write innovating strategies. See how yours does on the leader board
- We need test case infrastructure. Long term, I would like to see a test case for every clarifiction in the rule book.
- Contribute to the AI portion of the project.
Dominion has 205 kingdom cards. There are currently 31 cards that can throw NotImplementedException.
The game engine enforces the rules of the game. If a strategy is breaking the rules, it will throw an exception. The correct fix here is to fix the strategy.
The game will also throw an exception if you use a card that hasn't been implemented yet.
There are also bugs ...