Dominion Strategy Forum

Dominion => Simulation => Topic started by: Geronimoo on June 22, 2011, 10:19:54 am

Title: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on June 22, 2011, 10:19:54 am
Want to find out how fast your nifty Envoy/Village gets 4 Provinces and sick of trying out your strategy on solitaire isotropic?

Just simulate it! (http://users.telenet.be/jeroenaga/dominion.jnlp)

More info can be found here:
http://dominionsimulator.wordpress.com/

This is very much a work in progress, so your input is greatly appreciated (both in finding bugs and suggesting features)
Title: Re: Do it yourself!!!
Post by: DStu on June 22, 2011, 10:43:58 am
Very nice.

Of course it would be nice if you could (at least for some cards) specify "play rules" like you specify "buy rules", but I'm afraid this would more or less double the work for programming...
Title: Re: Do it yourself!!!
Post by: theory on June 22, 2011, 10:57:51 am
Play rules for 90+% of the cards would be pretty useless.

I noticed, however, that Native Village has three "PlayStrategy" options.  Any way to edit/view/create such PlayStrategies?
Title: Re: Do it yourself!!!
Post by: theory on June 22, 2011, 11:07:51 am
My feedback:

* I would have Colony be a tick-box.  This screws up a ton of buy rules, but it seems more intuitive.  Perhaps if every strategy had Buy Colony at the top, and Buy Province as "if numColoniesInSupply < 4"
* Maybe make PPR be a tick-box.

I am super excited about this program.  We've been playing with it for a little while and I think it reveals some very interesting factoids.  Namely, that Minion is a lot worse than we all thought ...
Title: Re: Do it yourself!!!
Post by: DStu on June 22, 2011, 11:11:00 am
Yepp, most of the time you don't need them. But I would guess for
Remodel, Upgrade, Workshop, Ironworks etc

so everywhere where you gain some cards it would be nice to specify which you want to gain under which conditions. Or am I missing something and this is possible. I also don't really see what you mean by the "PlayStrategy Options". So clearly I'm missing something..

Title: Re: Do it yourself!!!
Post by: theory on June 22, 2011, 11:15:52 am
Thinking more about it, I'm not sure that there's any way to program in intelligent play rules for cards like Apprentice.  There's just not enough space to encompass that decision.

But I am indeed curious about how Workshop, Remodel, and Ironworks are implemented by default. 
Title: Re: Do it yourself!!!
Post by: Death to Sea Hags on June 22, 2011, 11:40:34 am
My feedback:

* I would have Colony be a tick-box.  This screws up a ton of buy rules, but it seems more intuitive.  Perhaps if every strategy had Buy Colony at the top, and Buy Province as "if numColoniesInSupply < 4"
* Maybe make PPR be a tick-box.

I am super excited about this program.  We've been playing with it for a little while and I think it reveals some very interesting factoids.  Namely, that Minion is a lot worse than we all thought ...

This I was starting to suspect.  I kinda resent must-buy cards that drive the game to a one-dimensional race.  And I've been surprised at how often I can skip Minions (or only get 1-2) and still win.  Granted, 7+ Minions will still rofl-stomp you in a Kingdom without cursing attacks, trashing, or +Action, but still... 
Title: Re: Do it yourself!!!
Post by: Death to Sea Hags on June 22, 2011, 11:43:18 am
Thinking more about it, I'm not sure that there's any way to program in intelligent play rules for cards like Apprentice.  There's just not enough space to encompass that decision.

Maybe heuristics could be drawn from the Councilroom data?  Search all games with Apprentice in similar Kingdoms, look for similar hands at similar game stages and deck-sizes, see how those players are ranked/how they performed in-game, generate a best-guess?
Title: Re: Do it yourself!!!
Post by: theory on June 22, 2011, 12:06:19 pm
Thinking more about it, I'm not sure that there's any way to program in intelligent play rules for cards like Apprentice.  There's just not enough space to encompass that decision.

Maybe heuristics could be drawn from the Councilroom data?  Search all games with Apprentice in similar Kingdoms, look for similar hands at similar game stages and deck-sizes, see how those players are ranked/how they performed in-game, generate a best-guess?
That'd be something for rspeer's Golem (https://github.com/rspeer/golem) project.
Title: Re: Do it yourself!!!
Post by: Geronimoo on June 22, 2011, 12:23:53 pm
Please be careful of drawing conclusions from simulations with cards like Minion, Apprentice, Haven... Basically any card requiring non-trivial decisions.
I programmed a set of play rules for each card but they don't cover every possible situation (far from it). As an example here are the simulator's play rules for Minion:

If I have more Minions in hand or playing it for +$2 enables me to buy a Minion or a Province, play it for $2. Otherwise play it for the attack.

This works fine for a small deck that contains only Minions and money, but if you buy it in another strategy it will not act like you want it to!
Title: Re: Dominion Simulator available for download!
Post by: Taqman on June 22, 2011, 12:51:02 pm
Is there anyway we can see the play rules for each card so I know what assumptions I'm making in these sims?

This is amazing by the way.
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on June 22, 2011, 02:00:33 pm
I have a new favourite toy :D
Is there any way we could make "Total number of cards in my deck" an option we can play with?
Title: Re: Dominion Simulator available for download!
Post by: Zaphod on June 22, 2011, 02:23:18 pm
Very impressive!

Echoing Taqman's request...you can see the buy rules by clicking edit/create, but I'm not sure what the rules are for playing actions.  For example...how does it determine which cards are trashed by Chapel?  If there are two terminal action cards and only one action available, which gets played?  In what order are cards trashed with Bishop/Apprentice/etc.?  When does Minion play +2 coin and when does it toss the hand?

I hope these questions aren't annoying you too much.  I'm just curious as to how you worked the rules out, and if we have any way to tweak them, if we wish to experiment.
Title: Re: Dominion Simulator available for download!
Post by: Graystripe77 on June 22, 2011, 03:10:26 pm
I've been trying out the simulator, and for some reason, when i have three strategies that had been tested, and i want to take one away to test just two, there doesn't seem to be a way to do that. Help?
Title: Re: Dominion Simulator available for download!
Post by: rspeer on June 22, 2011, 03:23:50 pm
Is the source code available?

The big thing slowing me down on my AI is that I don't want to have to program heuristics for how to play every card. If there are a bunch of reasonable heuristics that Geronimoo's already written, I'd like to just use those.
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on June 22, 2011, 03:31:45 pm
Graystripe: pick the dropdown, and then at the very top there's a blank line. Pick that, and you've eliminated that player.
Title: Re: Dominion Simulator available for download!
Post by: Graystripe77 on June 22, 2011, 03:37:05 pm
Graystripe: pick the dropdown, and then at the very top there's a blank line. Pick that, and you've eliminated that player.

Well, thanks!  (Kinda feel a little stupid now)
Title: Re: Dominion Simulator available for download!
Post by: flymolo on June 22, 2011, 05:06:54 pm
I tried to simulate Ironworks Gardens, but it's not quite right because I can't check whether I have multiple ironworks in hand or how many actions I have left if I want to add in villages, and need to gain actions to avoid terminal collision.

I don't mean to complain.  I'm a computer programmer too, and I know the dangers of wouldn't it be great if.
This is awesome, and we just want to make it better.

I'll put my time where my mouth is, if source code becomes available.  But it's your project and you are entitled to release or not release your code in any manner you wish. 
Title: Re: Dominion Simulator available for download!
Post by: danshep on June 22, 2011, 08:34:29 pm
If you are willing to share the source code, I'm a java and ruby programmer by trade and would love to build a DSL for more complex bots using jruby. Building more complex bots really requires a full programming language.

Ruby modules would be great for including card-specific strategies.

I'm thinking something like:

Code: [Select]
strategy 'Big Money A' do
  include BasicCardStrategies
  def buy_options
    return 'province' if coins > 8 && deck['gold'] > 1
    if piles['province'] <= 3
      return 'duchy' if coins > 5
      return 'estate'
    else
      return 'gold' if coins > 6
      return 'smithy' if piles['smithy'] > 0 && deck['smithy'] == 0
      return 'silver' if coins > 3
    end
  end
end
Title: Re: Dominion Simulator available for download!
Post by: DG on June 22, 2011, 09:42:16 pm
I'd be very careful about decisions. I've run the bot just once to look at a simple game with 1 upgrade, 1 moneylender, and money. When the bot came to a hand with upgrade, gold, silver, copper, province, it played the upgrade and drew the moneylender. It trashed the copper with the upgrade, played the moneylender with no copper, and bought a duchy. Perhaps though it should have trashed the moneylender for a duchy and bought a duchy or gold. Perhaps it should have trashed a silver for another 4 card, trashed the copper with the moneylender and bought a duchy or gold. Perhaps it should have trashed the province (for nothing) just to buy a province and empty the pile. The decisions are not trivial.

There are also too many card combinations to code individually. For example you might always play a pearl diver before an upgrade, or always play a lookout before an upgrade, but deciding the order to play a lookout and a pearl diver is not simple.
Title: Re: Dominion Simulator available for download!
Post by: rrenaud on June 22, 2011, 10:03:45 pm
The perfect is the enemy of the good.

I'd much rather see a system where we leverage the incremental improvements of 10 or 20 skilled players gradually improving the play heuristics and getting better and better bots than us just giving up because getting it perfect is too hard.
Title: Re: Dominion Simulator available for download!
Post by: Kirian on June 23, 2011, 01:49:15 am
Something in this screams "genetic algorithm" but, well, good luck programming that.  I can envision the idea, but I think it would be a monumental task--of which one major problem would be one of "encoding" the genes for an algorithm.

...but deciding the order to play a lookout and a pearl diver is not simple.

I'm trying to imagine a situation in which I'd play Lookout first, but I can't think of one.
Title: Re: Dominion Simulator available for download!
Post by: rrenaud on June 23, 2011, 01:56:25 am
It's near the end game, you want to find a Platinum to buy the final Colony, you play the Lookout to draw it near, and then the Pearl Diver to take it into your deck.
Title: Re: Dominion Simulator available for download!
Post by: rspeer on June 23, 2011, 03:48:09 am
Something in this screams "genetic algorithm" but, well, good luck programming that.  I can envision the idea, but I think it would be a monumental task--of which one major problem would be one of "encoding" the genes for an algorithm.

Well, I've never seen a genetic algorithm that was worth the time it takes to run, but I am using a different machine learning technique (stochastic gradient descent) in my code to determine what to buy. It's basically just fitting a hugely multivariate function whose input is your deck and an opponent's deck, and whose output is the probability that you win against that opponent.

It seems like I could adapt this kind of thing to the play of an individual hand, by making the input be your hand, number of actions, cards in play, etc. and the output be... money? Value of cards gained/bought? Improvement in your win probability as determined by the other function? I kind of like that last one.

What I would need is a lot of data about the intermediate stages one's hand goes through. I don't think dominionstats (the CouncilRoom code) currently does this; it only tracks the changes to decks, not hands. Is there existing code that can parse this from the game logs, or would I have to write it?
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on June 23, 2011, 07:58:31 am
Thanks for the feedback, guys!

I added a "How it works" tab which should clear up a lot of the questions. Check it out: http://dominionsimulator.wordpress.com/how-it-works/

Most people here are wondering about the play rules and that's going to be a very very hard thing to implement properly. I see these possibilities to tackle this:

1)create a system similar to the buy rules to let people define the play rules for a card
I don't think so. Determining what cards to buy has proven to be easy using just a few paramaters, but determining the correct play for a card involves many many decisions that we humans make without thinking, but will need to be explained one by one to the simulator. Just think about a card like Forge when you played Tactician the turn before: you know have 2^9 ways to play Forge... :)
2)use some kind of AI-technique to determine the best way to play a card
I've written a Magic:the Gathering automated Sealed Deck builder that used Genetic Algorithm to find the best 23-card deck out of 90 cards and it worked great because defining the genes was easy, but my head explodes when I try to work it out for Dominion. We'll need a University Professor in AI to work this out... I also doubt my Simulator provides a good framework to set this up
3)use councilroom data to determine the best play by mimicking the play of level20+ players in similar situations
This seems even harder than 2)
4)let experienced players who know JAVA program extra play rules for the cards (at least level10s probably but I doubt we can be picky here?)
Although this will probably lead to thousands of lines of ugly code and more bugs it's the most feasible option to improve the simulator in the near future. This will of course require me to make the code available to the public which I'm still pondering about... What platform would you suggest if I decide to do that (I have no experience with open source)

Regarding the extra features suggested:
-Colony and PPR tick boxes (theory): these seem like a good idea (although I'm not sure how to implement PPR yet)
-"total number of cards in deck" buy rule feature (WanderingWinder): I'll add this in the next release, finally an easy request :)
Title: Re: Dominion Simulator available for download!
Post by: DStu on June 23, 2011, 08:36:10 am
Quote
I don't think so. Determining what cards to buy has proven to be easy using just a few paramaters, but determining the correct play for a card involves many many decisions that we humans make without thinking, but will need to be explained one by one to the simulator. Just think about a card like Forge when you played Tactician the turn before: you know have 2^9 ways to play Forge... :)

I don't think it's easy, but it is not as difficult as you outline here. You "just" have to programm the system such that the user can specify the rules (for each card), you don't have to find these rules. And then the rules don't have to be perfect, Forge is kind of the worst case szenario. But also there some top-down rules like in the buys would improve the play of this cards a lot, even if it wouldn't be perfect.

Edit: just read how it handles Workshop etc., this seems very clever and will probably fit most situations. When knowing how it works, you probably can even play with the Buyrules to get good play for Ironworks (haven't figured it out yet).
Other question: Multiple buys is probably also difficult? I guess the easies solution here is to allow a condition on the number of available buys, so that one can test it and have say in a Smithy + Native Village setting

if (#Buys>1) && (other conditions)
Smithy > Gold (so that one would by Smithy+NV instead of Gold in this case)

I think just including this option will do it, than the user can do the rest and think about how he wants to split the money under which conditions...

Edit2: Oh, or you can just do it by CountInPlay(Bridge)>0 or whatever card gives you +Buys.
Title: Re: Dominion Simulator available for download!
Post by: flymolo on June 23, 2011, 09:36:09 am

4)let experienced players who know JAVA program extra play rules for the cards (at least level10s probably but I doubt we can be picky here?)
Although this will probably lead to thousands of lines of ugly code and more bugs it's the most feasible option to improve the simulator in the near future. This will of course require me to make the code available to the public which I'm still pondering about... What platform would you suggest if I decide to do that (I have no experience with open source)

sourceforge.net and github are the most common.  Sourceforge is easier unless you are already familiar with git.
You choose who has access to change the code directly.  Normally other people will submit patches to one of the people with commit access.  That is how code quality is maintained, and tests.

As to license
if you don't care that someone changes the code and never gives you those changes even if they are selling it: Apache License or BSD
If you want the code to be distributed if someone distributes binaries: GPL
If you are worried that someone will turn you program into a web service and not release the code: AGPL 3.0
Title: Re: Dominion Simulator available for download!
Post by: rrenaud on June 23, 2011, 09:52:31 am
Well, I've never seen a genetic algorithm that was worth the time it takes to run, but I am using a different machine learning technique (stochastic gradient descent) in my code to determine what to buy. It's basically just fitting a hugely multivariate function whose input is your deck and an opponent's deck, and whose output is the probability that you win against that opponent.

It seems like I could adapt this kind of thing to the play of an individual hand, by making the input be your hand, number of actions, cards in play, etc. and the output be... money? Value of cards gained/bought? Improvement in your win probability as determined by the other function? I kind of like that last one.

What I would need is a lot of data about the intermediate stages one's hand goes through. I don't think dominionstats (the CouncilRoom code) currently does this; it only tracks the changes to decks, not hands. Is there existing code that can parse this from the game logs, or would I have to write it?

The iso logs don't contain enough information to get card play by card play game state info.  You don't see what cards people draw when they play +card actions :(.
Title: Re: Dominion Simulator available for download!
Post by: Thanar on June 23, 2011, 11:55:26 am
First, a big "Thank you!" to Geronimoo for creating this tool and making it publicly available.

Second, a minor bug/limitation: When I first ran it, only the upper left quadrant of the UI showed up (i.e. no VP curve, Money curve, or Results chart). Knowing a bit about programming, I guessed that  my 1024x768 screen size was preventing the window from resizing to fit those additional UI elements. Sure enough, extending my screen size to 1280x960 solved the problem. Trying to resize the screen back down after the program started resulted in a wacky looking UI with most elements missing again. There may be an easy fix for this by just reducing the size of these graph & chart elements a bit to squeak in under 1024x768, or at least some kind of warning or note of the minimum screen size.

Third, I did discover a non-optimality in the _Single Chapel strategy after noticing that it would open Chapel/nothing on a 5/2 split when the $5 hand happened first. This can be easily fixed by adding condition (if available $ < 5) to the Buy Chapel rule, preventing it from triggering until the $2 hand in that one case, resulting in the optimal Silver/Chapel opening. This _Single Chapel Better strategy beats _Single Chapel 48% to 46%. When restricted to a 5/2 start, it wins 65% to 29%.

I'd imagine that similar improvements might be found for the buy rules of other strategies to avoid non-optimal opening buys.
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on June 23, 2011, 12:56:38 pm
He didn't tune the _Single X strategies at all. And yeah, I've been able to improve somewhat on several of the baseline strategies.
Title: Re: Dominion Simulator available for download!
Post by: fp on June 24, 2011, 01:54:16 pm
Silly question:

1) How do you get this to work on Mac OSX?
Title: Re: Dominion Simulator available for download!
Post by: DStu on June 25, 2011, 05:08:59 am
Don't know, but I can tell you how it works under Linux. As there is a UNIX under the Mac/OS, it should work also.

1) Check if you have Java (open terminal, type: java and see if it knows the command), if not get Java from somewhere, http://www.java.com/de/download/ would be an idea. Install it. (Don't know how this works on a Mac)
2) Download the Simulator
3) Open terminal and move into the directory where the Simulator was downloaded to
4) type: java -jar DominionSimulator.jar
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on June 30, 2011, 02:45:43 pm
How does your sim deal with multiple buys? Does it always buy the first thing it can, and then with whatever money is left, buy the next thing? Is there anyway to make it think "oh, I've got 11 and two buys, it's better to get wharf and gold than Province and silver"?
Also, how does it deal with cards like Mint and Grand Market where you may not want to play all your money? Not well, I'd guess, as I can't think of a simple way around it, and don't have suggestions.
Not complaining, just wondering.
Title: Re: Dominion Simulator available for download!
Post by: DStu on June 30, 2011, 02:53:54 pm
With n buys, it goes from the top n times.
You can condition on "inPlay(Bridge)>0" or something like that. Buys would be nicer, but this works for easy setting.
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on July 01, 2011, 05:06:00 am
Like DStu said multiple buys are not accounted for automatically and you should add a condition like "if count in play Bridge (or Woodcutter...)>0". You can also use the condition "if available $ > X" in combation with the former to get the desired behaviour. I might implement something to support multiple buys (if you have suggestions how I to best handle this, they're very welcome).

If you have a Mint in your buy rules, the Simulator won't care if you just played 5 Platinums and buy that Mint anyway :) You can always add the "if count in play Gold =0" to the buy rules of Mint to avoid trashing good treasures.

If you have a Grand Market in your buy rules the Simulator will not play his Coppers if he can buy a Grand Market with the other money available (I built this in because Grand Market is a card I'd expect to see in a lot of simulations).
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on July 01, 2011, 09:11:48 am
Nice on the Grand Market front. The only thing I have for the buys thing is simply measuring buys, but I don't know if that's so feasible, and what you have is, I suppose good for 98% of cases.
I have no idea how you'd come up with something for mint - you probably could, but it would be really really complicated.
Thanks!
Title: Re: Dominion Simulator available for download!
Post by: philosophyguy on July 01, 2011, 02:09:34 pm
Does the simulator implement discard rules for cards like Alchemist and Herbalist? If not, can I make a feature request to add the ability to program discard rules in a similar manner to buy rules? (e.g., if Potion in play >= 1 and Alchemist in play > 0, discard Alchemist to top of deck).
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on July 01, 2011, 02:20:09 pm
Alchemist should always be returned to the top when there's a Potion in play.

If you're not sure if the Simulator does something or not, you can always check the game log (sample game).
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on July 06, 2011, 11:41:40 pm
Geronimoo, does your sim have some kind of anti-self-destruct wherein it won't buy the last province if it is over 6 behind? Because I was looking at a sample game log and found this:

*** Chapel/Money(Plr 2)'s turn 24 ***
Chapel/Money(Plr 2)'s cards in Hand: [Gold, Gold, Silver, Silver, Duchy]
Chapel/Money(Plr 2) played 2 Golds, 2 Silvers, has $10 to spend and 1 buy
SUICIDE!! Can not buy Province
Duchy is no more available to buy
Chapel/Money(Plr 2) buys a Estate
Chapel/Money(Plr 2) draws 5 cards
Chapel/Money(Plr 2)'s cards in Hand: [Province, Duchy, Duchy, Gold, Silver]
     
      *** Monument(Plr 1)'s turn 24 ***
      Monument(Plr 1)'s cards in Hand: [Silver, Copper, Province, Silver, Gold]
      Monument(Plr 1) played 1 Gold, 2 Silvers, 1 Copper, has $8 to spend and 1 buy
      Monument(Plr 1) buys a Province
      Monument(Plr 1) draws 5 cards
      Monument(Plr 1)'s cards in Hand: [Copper, Silver, Copper, Monument, Copper]

!!!!!!!Game ends!!!!!!!!

the Empty Piles : [Duchy, Province]
the Trashed Cards : [Estate, Copper, Copper, Copper, Estate, Copper, Copper, Copper, Estate]



Chapel/Money(Plr 2) has 37 points (0 VP-tokens)!
Chapel/Money(Plr 2) shows this deck (23 cards) : [1 Copper, 5 Silver, 7 Gold, 1 Estate, 4 Duchy, 4 Province, 1 Chapel]

Monument(Plr 1) has 49 points (10 VP-tokens)!
Monument(Plr 1) shows this deck (33 cards) : [7 Copper, 7 Silver, 3 Gold, 3 Estate, 4 Duchy, 4 Province, 5 Monument]

(Edited to Bolden important bit)
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on July 08, 2011, 05:19:05 am
yes, the simulator will not make any purchase that will result in a loss
Title: Re: Dominion Simulator available for download!
Post by: Razzishi on July 19, 2011, 01:27:42 pm
Great program; I downloaded it awhile ago and only really got to see what it was capable of recently.  A few things that I found potentially useful to add to the buy rules have been mentioned already: number of cards in deck, and number of available buys.  In the latter case, it is not sufficient to check for cards giving +Buy in play, because it's possible you already have used the buy it gave you.  Another thing that I'd be interested in is having the ability to put in whatever number you want in places and not be limited by 1-20.  I have times wished I could use fractions when working with * and / operations, and other times wanted to choose numbers larger than 20.  While I can use the additional + number box in some cases, there's other times that I need it for something else.

There's at least one play rule that could use some tweaking, involving King's Court, Grand Market and Bridge.  If there are no more cards in your deck, the program will still copy Grand Market in preference to Bridge.  In such a case, the income + cost reduction of Bridge is superior to the income of GM and the extra actions will generally not be relevant if you've drawn your whole deck and are able to copy multiple Bridges; if you have no deck left with additional King's Court uses to come, you probably have plenty of actions from copied Grand Markets and so long as you copy all your Bridges you only need 1 action to play any number of GMs once you run out of KCs.  With the current rules, it tries to copy every GM in the deck first and thus tends to end up playing some Bridges normally and not reduce the cost of the top green card enough to buy them out that turn when it easily could have.

I think there's a bit of a bug in the VP and money graphs, or at least odd way of handling the last few turns.  It appears as though the number displayed is the determined by adding all the numbers for that turn and dividing by the number of games simulated, and counting a 0 for a game that turn if the game had already finished a previous turn.  This leads to the graph consistently dipping the last few turns, as some games will end sooner than others.  Thus the graphs present a somewhat inaccurate view of how the deck performs the last few turns.
Title: Re: Dominion Simulator available for download!
Post by: DG on July 19, 2011, 01:58:39 pm
I found a logic problem with the card play in the simulator today. If you put a command into the simulator to buy exactly one  gold if there is a no gold in the deck, ahead of buying provinces, then problems can arise. With a remodel and gold in hand it decides to remodel the gold into a province, but looks at the buy list and remodels the gold into a gold instead.

Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on July 19, 2011, 06:02:09 pm
@Razzishi:
I'll try to add the "number of buys left" and >20 number choices in my next release. I originally had a field to let people type in the number themselves which allowed fractions, but it looked ugly and was cumbersome to work with and I haven't ever found the need to use fractions myself.

@DG:
That's indeed a problem. Maybe you can add some extra buy conditions to avoid this behaviour?
Title: Re: Dominion Simulator available for download!
Post by: fp on July 19, 2011, 09:46:55 pm
Don't know, but I can tell you how it works under Linux. As there is a UNIX under the Mac/OS, it should work also.

1) Check if you have Java (open terminal, type: java and see if it knows the command), if not get Java from somewhere, http://www.java.com/de/download/ would be an idea. Install it. (Don't know how this works on a Mac)
2) Download the Simulator
3) Open terminal and move into the directory where the Simulator was downloaded to
4) type: java -jar DominionSimulator.jar

I receive the following error message:

Code: [Select]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:54)
Title: Re: Dominion Simulator available for download!
Post by: danshep on July 20, 2011, 01:44:12 am
That error message means that the simulator was compiled with a later version of java than the version you have installed. Upgrade your java runtime if you can.
Title: Re: Dominion Simulator available for download!
Post by: Davio on August 01, 2011, 08:54:24 am

4)let experienced players who know JAVA program extra play rules for the cards (at least level10s probably but I doubt we can be picky here?)
Although this will probably lead to thousands of lines of ugly code and more bugs it's the most feasible option to improve the simulator in the near future. This will of course require me to make the code available to the public which I'm still pondering about... What platform would you suggest if I decide to do that (I have no experience with open source)

sourceforge.net and github are the most common.  Sourceforge is easier unless you are already familiar with git.
You choose who has access to change the code directly.  Normally other people will submit patches to one of the people with commit access.  That is how code quality is maintained, and tests.

As to license
if you don't care that someone changes the code and never gives you those changes even if they are selling it: Apache License or BSD
If you want the code to be distributed if someone distributes binaries: GPL
If you are worried that someone will turn you program into a web service and not release the code: AGPL 3.0
I would very much like to see this get some sort of Open Source status.
I am a computer programmer by trade and would very much like to contribute to this project.

Geronimoo, you can always review the changes yourself before you approve them.

We can start with card strategies for simple cards.
For instance Smithy: If you already have $8 (with 1 Buy) and there are 3 remaining Estates in your draw pile, play the Smithy.
If the next three cards are 2 Golds and 1 Silver, don't play it.

Something like that.

Obviously, correctly choosing one of Pawn's 6 options is not so easy.
Title: Re: Dominion Simulator available for download!
Post by: Captain_Frisk on August 04, 2011, 05:32:39 pm
How on earth does the countMaxOpponentsVP work?  Is that the theoretical maximum vp of the opponent, or the current max?

I tried "improving" the big money ultimate strategy that wouldn't buy the final province if it would cause you to lose... assuming that you wouldn't buy the final province unless opponentVP - YourVP >= 6 (I was playing from 2nd place).

Naturally, this dropped my win rate from 43% to 20%.

What am I doing wrong?
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="6.0" />
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on August 04, 2011, 08:41:26 pm
Frisk, I haven't worked out how to get that vxml into my newly-downloaded copy of the sim (new laptop, all other data gone... :( ), but it looks to me like instead of not buying provinces if you are behind by more than 6, you aren't buying provinces until you're AHEAD more than 6...
Title: Re: Dominion Simulator available for download!
Post by: DStu on August 05, 2011, 03:33:39 am
Frisk, I haven't worked out how to get that vxml into my newly-downloaded copy of the sim (new laptop, all other data gone... :( ), but it looks to me like instead of not buying provinces if you are behind by more than 6, you aren't buying provinces until you're AHEAD more than 6...

Not exatly, he buys Provinces if
A) There are at least 2 left or
B1) his VP are at least the once of his opponent MINUS 6 and
B2)  there is exactly one left

In my Simulator Frisk's vxml also gives 43% winchance. The point is that, as far as I understood it, the simulator by itself does not buy cards if they cause you to loose. You can see this in the individual sample game, when the line "SUICIDE!! Can not buy Province" apears (If you want to see it yourself delete the lines for Duchies and Estates, that increases the likelihood that this will happen)
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on August 05, 2011, 04:38:02 am
As DStu said (and this has been mentioned several times) the simulator bot will not buy ANY card that causes it to lose the game.
Title: Re: Dominion Simulator available for download!
Post by: Captain_Frisk on August 05, 2011, 11:41:34 am
As DStu said (and this has been mentioned several times) the simulator bot will not buy ANY card that causes it to lose the game.

Guess I should have RTFM.  Thanks folks!
Title: Re: Dominion Simulator available for download!
Post by: Captain_Frisk on August 05, 2011, 11:46:10 am
Frisk, I haven't worked out how to get that vxml into my newly-downloaded copy of the sim (new laptop, all other data gone... :( ), but it looks to me like instead of not buying provinces if you are behind by more than 6, you aren't buying provinces until you're AHEAD more than 6...

Not exatly, he buys Provinces if
A) There are at least 2 left or
B1) his VP are at least the once of his opponent MINUS 6 and
B2)  there is exactly one left

In my Simulator Frisk's vxml also gives 43% winchance. The point is that, as far as I understood it, the simulator by itself does not buy cards if they cause you to loose. You can see this in the individual sample game, when the line "SUICIDE!! Can not buy Province" apears (If you want to see it yourself delete the lines for Duchies and Estates, that increases the likelihood that this will happen)

So then my rule should have no effect...and then i found out that i had accidentally put another rule on Duchy!  Sorry folks... nothing to see here!
Title: Re: Dominion Simulator available for download!
Post by: Captain_Frisk on August 05, 2011, 11:58:26 am
All right - here's a new question... lets say I wanted to add a rule that says:

Don't buy a duchy if I've already got a 2 province lead over my opponent.

Since I don't have a max count of opponent deck, i started with:

P(mine) + P(opponents) + P(supply) = 8

I want to add the condition that P(Mine) - P(Opponents) <2

P(opponents) = 8 - P(Supply) - P(mine)

Thus the condition I'm interested in is

P(mine) >= -0.5 * P(Supply) + 4

Unfortunately, even with the VXML, I can't seem to add enough extra operations, and it barfs at me.

Any way to model this?


Title: Re: Dominion Simulator available for download!
Post by: fp on August 22, 2011, 12:16:07 am
I should my problems with Mac OS X are not strictly fixed by downloading and installing java. Mac OS X actually comes with several versions of Java, so one must specify which one(s) to use. Apparently, it preferred 1.5 over 1.6.
Title: Re: Dominion Simulator available for download!
Post by: jonts26 on August 29, 2011, 09:29:59 pm
I have a question. How does the simulator handle the play of wishing well? I was trying to test the benefits of wishing well/silver opening. I know picking a card to wish for isn't exactly non-trivial, but it could just be coded to wish for the highest probability card in the draw deck.
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on August 30, 2011, 01:29:49 am
Wishing Well is coded to wish for the card with the highest frequency in the draw deck.
Title: Re: Dominion Simulator available for download!
Post by: Thisisnotasmile on August 30, 2011, 06:03:10 am
If it knows for certain what the card is (because of Ghost Ship, Apothecary, Scout, etc.), will it wish for that, or only if it's also the most common card left?
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on August 30, 2011, 06:49:26 am
No, Wishing Well's implementation does not take previous plays in account.
Title: Re: Dominion Simulator available for download!
Post by: Davio on August 30, 2011, 06:03:16 pm
Here's an idea: Since the program is written in Java, could it be modified to work as an applet online?

This way we always have the newest version when we want to use the simulator.
Of course, the drawback is that it can't be used off-line, but who is off-line nowadays?

And maybe the JAR can be offered as a download as well as an online version?

I'm just mentioning this so we don't have to download it again with every little fix (and there may be many, due to the nature of the cards and how they are played).
Title: Re: Dominion Simulator available for download!
Post by: danshep on August 30, 2011, 10:31:19 pm
Here's an idea: Since the program is written in Java, could it be modified to work as an applet online?

This way we always have the newest version when we want to use the simulator.
Of course, the drawback is that it can't be used off-line, but who is off-line nowadays?

And maybe the JAR can be offered as a download as well as an online version?

I'm just mentioning this so we don't have to download it again with every little fix (and there may be many, due to the nature of the cards and how they are played).

Running things as applets is annoying. The way to go down this route is to make the app into a java webstart package (which makes it runnable off-line, but also auto-updatable). Geronimoo, if you're interested in that and don't know your way around webstart I can give you a hand (danshep@gmail.com).
Title: Re: Dominion Simulator available for download!
Post by: Davio on August 31, 2011, 04:09:35 am
Well, I haven't touched Java since I learned it at the university and that was way back with the annoying applets, so I didn't know of the Webstart thing.

I have always hated applets myself though, but thought they might have become less annoying over the years.
Title: Re: Dominion Simulator available for download!
Post by: AdamH on September 09, 2011, 11:32:01 am
Your simulator is awesome.

I was wondering if you could add a way to run a simulation with more than 10000 games. Perhaps have a form box where you type in the number of games you want to simulate and a button to press to actually run it.
Title: Re: Dominion Simulator available for download!
Post by: Thisisnotasmile on September 09, 2011, 11:39:39 am
Something I've been wondering which is kind of related to the above:

If you simulate 10,000 games, then simulate 10,000 games again, will the results shown be for the last batch of 10,000 games, or cumulative for the whole 20,000? If it's cumulative you could get arbitrarily accurate results by just simulating 10,000 however many times you can be bothered to do it.
Title: Re: Dominion Simulator available for download!
Post by: ftl on September 09, 2011, 12:51:28 pm
At 10,000 games, the margin of error is already pretty darn small...
Title: Re: Dominion Simulator available for download!
Post by: AdamH on September 09, 2011, 12:55:04 pm
I've been running simulations where I'd like to distinguish between 1% of "noise" (the game's natural variance) and 1% of "this strategy is actually slightly better than the other one by 1%"

The thread is here: http://forum.dominionstrategy.com/index.php?topic=552.0

I figured that it was an easy enough feature to add... also, if I had the source code I'd be happy to do it myself.
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on September 09, 2011, 01:20:36 pm
I doubt there's much value in having more than 10,000 simulations. The margin of error for most games is <1%.
Title: Re: Dominion Simulator available for download!
Post by: WanderingWinder on September 09, 2011, 01:36:09 pm
I want to second the request I guess. I've had LOTS of times where I simmed 50k or 100k games in quests of optimization. And sometimes 10k gives margins of more like 2% for even strategies. OTOH, I'm fine with just simming these 50k or 100k 10k at a time by myself.
Title: Re: Dominion Simulator available for download!
Post by: rod- on September 09, 2011, 02:02:03 pm
I find myself repeatedly simming every little tweak of a strategy i do, as well, because often the tweak i've made comes up in so few games that it could only impact 1% or fewer of games - the noise in 10000 simulations is greater than 1%, so I have to repeat and determine the noise in the win rate by hand.

I'd gladly let the program do that.
Title: Re: Dominion Simulator available for download!
Post by: DG on September 12, 2011, 10:21:46 am
If you include a card only in the condition clauses it seems to have a default supply pile of 0 cards. It should probably become a recognised card in the kingdom with a full supply pile.

I came across this while simulating tournaments in colony games where you might want to buy duchies if the colony pile becomes low but never want to buy any colonies or platinum.  At the moment the bots always buy duchies under this condition as the colony pile starts empty. version 1.12.
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on September 12, 2011, 10:29:55 am
If you include a card only in the condition clauses it seems to have a default supply pile of 0 cards. It should probably become a recognised card in the kingdom with a full supply pile.

I came across this while simulating tournaments in colony games where you might want to buy duchies if the colony pile becomes low but never want to buy any colonies or platinum.  At the moment the bots always buy duchies under this condition as the colony pile starts empty. version 1.12.

Indeed, only cards in the "buy" line of the buy rule will be added to the supply. I hadn't considered your case before, but it seems reasonable, so I'll add this feature in a future release.
Title: Re: Dominion Simulator available for download!
Post by: Tydude on September 12, 2011, 05:39:47 pm
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Title: Re: Dominion Simulator available for download!
Post by: Geronimoo on September 13, 2011, 03:29:30 am
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Might do this, but I'd need a compelling reason. Please give me a good example where this would be useful.
Title: Re: Dominion Simulator available for download!
Post by: Thisisnotasmile on September 13, 2011, 06:27:20 am
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Might do this, but I'd need a compelling reason. Please give me a good example where this would be useful.

Remaking Copper > Estate early to get a thin deck asap to Remake more often. Not trashing Estates in a Baron/*some trasher* strategy. There may be others.
Title: Re: Dominion Simulator available for download!
Post by: Tydude on September 13, 2011, 06:33:23 am
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Might do this, but I'd need a compelling reason. Please give me a good example where this would be useful.
Ok, the simulation that prompted me to post that was I was trying to make a "Perfect Venture" deck (8 ventures and no other treasure) and see if it's actually feasible in a game to try that. Obviously, I couldn't. Making Scrying Pool decks or other action heavy decks (mega turns with bridges, bishop, maybe goons...) Running a Coppersmith or other copper dependent strategy but still wanting to get rid of estates. All in all, it would just be a nice feature to have.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Tydude on September 17, 2011, 09:05:35 am
So, I think I found a bug. Here's my code for a University/Wharf engine.

Code: [Select]
<player name="University/Wharf">
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="University">
      <condition>
         <left type="countCardsInDeck" attribute="University"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Wharf">
      <condition>
         <left type="countCardsInDeck" attribute="Wharf"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

I ran a sample game to check that it worked. And it seemed to (only gaining wharfs from university and just buying money). The weird problem is that after buying two provinces, it won't buy anymore. I didn't code any buy rules into provinces. After getting two, it gives this error message in the sample game: "SUICIDE! Can not buy Province". It'll then buy a duchy or something when it has eight. It's weird.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on September 17, 2011, 10:59:11 am
If buying the last card will end the game in a loss then the simulator will not do it. SUICIDE is printed as explanation. Although it may not immediately appear to be progressive, the alternative is a 100% losing strategy!
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: WanderingWinder on September 17, 2011, 11:14:50 am
The reason why is that buying the third province must end the game there, and the simulator is programmed to never make a purchase that will end the game with the bot making the buy losing - it won't kill itself.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on September 17, 2011, 11:18:30 am
Actually you DID find a bug TyDude: University shouldn't be gaining any Wharves at all with the buy condition you're using (count Wharves > 12). So thx for reporting!
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Tydude on September 17, 2011, 02:02:19 pm
Oh, okay, that makes perfect sense. It just confused me a lot, but I get it now.

Actually you DID find a bug TyDude: University shouldn't be gaining any Wharves at all with the buy condition you're using (count Wharves > 12). So thx for reporting!

Oh, I thought it was supposed to do that. If that's a bug, then how do you make it so that it only gains Wharves using University and never buys them?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on September 17, 2011, 02:12:28 pm
I use "if available $ = 0" but that's not fool proof (eg if you played a Bazaar first it won't work anymore)

So I should probably add a new condition like "if not in buy phase" or something for gaining cards.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on September 17, 2011, 03:11:46 pm
Quote
So I should probably add a new condition like "if not in buy phase" or something for gaining cards.
Yes please.
Title: Re: Dominion Simulator available for download!
Post by: Tydude on September 17, 2011, 07:43:51 pm
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Might do this, but I'd need a compelling reason. Please give me a good example where this would be useful.
Ok, the simulation that prompted me to post that was I was trying to make a "Perfect Venture" deck (8 ventures and no other treasure) and see if it's actually feasible in a game to try that. Obviously, I couldn't. Making Scrying Pool decks or other action heavy decks (mega turns with bridges, bishop, maybe goons...) Running a Coppersmith or other copper dependent strategy but still wanting to get rid of estates. All in all, it would just be a nice feature to have.

Also, as I just found, getting Salvager and other cards like that to trash Peddler. The other strategies here are more edge cases, but this is one I've seen many times.
Title: Can't save?
Post by: Raggedjoe on October 15, 2011, 08:39:44 pm
I'm having a strange issue where I can't save any changes I make. Actually, everything saves and can be loaded fine, but when I close the simulator the changes go away. Anyone have any ideas what to do?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on October 16, 2011, 04:39:24 am
I'm having a strange issue where I can't save any changes I make. Actually, everything saves and can be loaded fine, but when I close the simulator the changes go away. Anyone have any ideas what to do?

Could you be more specific? I don't quite understand what you mean.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Raggedjoe on October 16, 2011, 01:06:39 pm
I'm having a strange issue where I can't save any changes I make. Actually, everything saves and can be loaded fine, but when I close the simulator the changes go away. Anyone have any ideas what to do?

Could you be more specific? I don't quite understand what you mean.

Ok, maybe this is a better question:

I want to save a bot program I have written to use tomorrow. How do I do this?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on October 16, 2011, 01:23:47 pm
File/Save Players, will let you save the players to file. File/Load Players will add all the players from the file into the simulator.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on October 16, 2011, 01:28:07 pm
At the moment I'm creating problems for myself through the interface by opening more than one edit window for a bot. Changes are then going into one version and not the other, or perhaps not being saved at all. Could the interface please be changed to either only open one window for a bot (and activate if opened again) and/or show the opened edit windows as tabs.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on October 16, 2011, 05:57:24 pm
At the moment I'm creating problems for myself through the interface by opening more than one edit window for a bot. Changes are then going into one version and not the other, or perhaps not being saved at all. Could the interface please be changed to either only open one window for a bot (and activate if opened again) and/or show the opened edit windows as tabs.
That seems awkward. I'll fix it so you can only edit one at a time.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Raggedjoe on October 17, 2011, 07:18:12 am
Thanks Geronimo, I hadn't been saving correctly lol :D

When do you expect the Hinderland cards to be up? Are you waiting for the whole set?

Also, are you working on/considering letting the user to test buy conditions? It might be tricky for more complex programs, but it would be a great troubleshooting tool, especially for games with, say, Goons, to easily check your extra buys are being done correctly.

Edit: I also can't get Apprentice to be played how I think it should be. Could you share how it is programmed?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on October 17, 2011, 07:52:36 am
Thanks Geronimo, I hadn't been saving correctly lol :D

When do you expect the Hinderland cards to be up? Are you waiting for the whole set?

Also, are you working on/considering letting the user to test buy conditions? It might be tricky for more complex programs, but it would be a great troubleshooting tool, especially for games with, say, Goons, to easily check your extra buys are being done correctly.

Edit: I also can't get Apprentice to be played how I think it should be. Could you share how it is programmed?

I have programmed the spoiled Hinterlands card, but I'm still testing them. I might release in the coming days.

If you want to check if your bot works as intended, just examine a few Sample Games (this is also how I do it, so I don't really see a need for a separate testing option).

If you want to see the play rules of the cards, go to my blog:

http://dominionsimulator.wordpress.com/

Here's Apprentice's play rules (which I know are far from optimal, but these give decent results while keeping it simple):
http://dominionsimulator.wordpress.com/play-rules/alchemy/apprentice/
Title: Re: Dominion Simulator available for download!
Post by: Qvist on November 09, 2011, 10:07:32 am
I just looked into this great simulator. Kudos, I like it very much.
Especially the conditions you can add for the buy priority are very quick to setup.

But I have a suggestion too. I'm referring to this:
There really needs to be a way to set card trashing priority. For action heavy strategies and all that. I can't imagine this would be that hard to implement, but of course I know almost nothing about programming. Couldn't you just make a button (similar to Chapel's playstrategy button) and ask the user to set the trash priority? Have it set to whatever the default is normally, and then just reset the variable, right?
Might do this, but I'd need a compelling reason. Please give me a good example where this would be useful.

It would be great to define or modify the Trash and Discard Priority. I just tried several strategies and realised that Fool's Gold Trash Priority is too low.

For example:
Code: [Select]
*** Fool's Gold + Steward + Vault + Mint(Plr 1)'s turn 10 ***
Fool's Gold + Steward + Vault + Mint(Plr 1)'s cards in Hand: [Fool's Gold, Fool's Gold, Fool's Gold, Steward, Fool's Gold]
Fool's Gold + Steward + Vault + Mint(Plr 1) plays Steward
... Fool's Gold + Steward + Vault + Mint(Plr 1) trashes a Fool's Gold
... Fool's Gold + Steward + Vault + Mint(Plr 1) trashes a Fool's Gold
Fool's Gold + Steward + Vault + Mint(Plr 1) plays Fool's Gold
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
Fool's Gold + Steward + Vault + Mint(Plr 1) plays Fool's Gold
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$4
Fool's Gold + Steward + Vault + Mint(Plr 1) has $5 to spend and 1 buy
Fool's Gold + Steward + Vault + Mint(Plr 1) buys a Fool's Gold
Fool's Gold + Steward + Vault + Mint(Plr 1) shuffles deck
Fool's Gold + Steward + Vault + Mint(Plr 1) draws 5 cards
Fool's Gold + Steward + Vault + Mint(Plr 1)'s cards in Hand: [Fool's Gold, Copper, Fool's Gold, Copper, Fool's Gold

The same goes with the Discard Priority:
Code: [Select]
** Fool's Gold + Steward + Vault + Mint(Plr 1)'s turn 12 ***
Fool's Gold + Steward + Vault + Mint(Plr 1)'s cards in Hand: [Steward, Fool's Gold, Fool's Gold, Vault, Copper]
Fool's Gold + Steward + Vault + Mint(Plr 1) plays Vault
... Fool's Gold + Steward + Vault + Mint(Plr 1) draws 2 cards
... Fool's Gold + Steward + Vault + Mint(Plr 1)'s cards in Hand: [Steward, Fool's Gold, Fool's Gold, Copper, Copper, Province]
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Steward
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Province
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Copper
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Copper
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Fool's Gold
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
... Fool's Gold + Steward + Vault + Mint(Plr 1) discards a Fool's Gold
... Fool's Gold + Steward + Vault + Mint(Plr 1) gets +$1
Fool's Gold + Steward + Vault + Mint(Plr 1) has $6 to spend and 1 buy
Fool's Gold + Steward + Vault + Mint(Plr 1) buys a Fool's Gold
Fool's Gold + Steward + Vault + Mint(Plr 1) shuffles deck
Fool's Gold + Steward + Vault + Mint(Plr 1) draws 5 cards
Fool's Gold + Steward + Vault + Mint(Plr 1)'s cards in Hand: [Copper, Copper, Fool's Gold, Fool's Gold, Fool's Gold]

Best would be: A Trash & Discard Priority list in the same way you implemented the Buy Priority list.
But at least it would be great to include: If a card is in the buy rules, don't trash it!
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: kn1tt3r on November 11, 2011, 08:13:56 am
I cannot start it right now (blocked at workplace), but have you Mint/Fool's Gold implemented? According to Council Room it's one of the very best opening combos available (http://councilroom.com/openings)...
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Qvist on November 11, 2011, 09:20:47 am
That was my intention. It works quite well. But then I tried to make it better for 4/3 openings. Steward would work best I think, but it doesn't work. It trashes Fool's Gold although it is in the buy rules.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Davio on December 01, 2011, 10:28:07 am
Does the Simulator have a "play on" functionality?

If not, I would really like it.

If the Simulator always starts from the beginning, it doesn't get a lot of the interesting decisions we have to make, like CCCS-Salvager (http://forum.dominionstrategy.com/index.php?topic=864.0), or Familiar/Chapel with Black Market (http://forum.dominionstrategy.com/index.php?topic=1072.0).

It would be really useful if we could enter a game state and let the simulator run from there so we can analyze different branches of a decision we're faced with.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Fabian on December 01, 2011, 11:16:31 am
I haven't thought about it like that before, but I really agree. A lot of the things I wish I could get answered through simulations happen later on in the game, not as part of a carefully formulated strategy from turn 1. I imagine it's no small task to implement, but I think it would definitely be cool.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DStu on December 01, 2011, 12:45:28 pm
I imagine it's no small task to implement, but I think it would definitely be cool.

I think in rspeer's Dominiate that can be done in changing 4 lines of code. (At least defining the deck, and then draw a random hand. Think's like played Tacticians, Schemes etc from last turn are a lot more difficult of course).
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on December 01, 2011, 02:10:54 pm
It would also be nice to play as a human against a simulated strategy. However I imagine this moves the tool away from being a mere simulator and would also be a great deal of work.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on December 01, 2011, 04:57:09 pm
It would also be nice to play as a human against a simulated strategy. However I imagine this moves the tool away from being a mere simulator and would also be a great deal of work.

Yes, it's a lot of work ;)

GUI is annoying...
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: pst on February 04, 2012, 06:40:09 am
If buying the last card will end the game in a loss then the simulator will not do it. SUICIDE is printed as explanation.

But in other situations the simulator can commit suicide. At least I've seen it happily deal out the last Curse, even if that is a losing three-piling move, and I just confirmed that that is still so.

The suicide detection is made by suicideIfBuys, and even though I'm not a Java person (nor a Java Man!) it seems to me it only looks at the VPs of the very card it's considering to buy before (not) three-piling. So it might avoid three-piling with Border Villages for example, even if it then would gain a Duchy for the win, right?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on February 04, 2012, 08:57:14 am
Without looking at your specific example I'm pretty sure the general answer is yes. The simulator usually makes single decisions and will miss some end game combinations. Unfortunately there are so many situations that would need to be coded into the software that it would be very time consuming to correct (in this version of the software). If a user knows that a significant purchasing problem is clouding the results then extra purchase conditions can often be added to a script as a solution.

To give another example, if the bot had 38 cards with gardens in the deck, it would not realise that buying the last province + peddlar would narrowly win. It would first evaluate the first buy with a 38 card deck, probably not buy the last province (suicide), and would then evaluate the second buy and might not have enough coins to spend for the province.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: pst on February 04, 2012, 09:20:30 am
There are many possible tricky situations like that. The other side of the Don't Make a Losing Move is even harder: Make That Winning Move.

Obviously you don't want to write buying rules for all cards in the game that they should be bought if that means victory, so ideally there should be a special step looking at all possible moves that would end the game analyzing the situations that would result in, and if any of those are winning then just do that instead of following the normal play rules and buy rules.

Tricky to do, I guess, but how else would you make a simulator be able to buy that last Caravan and the last two Curses for a sudden win when opportunity knocks?
Title: Re: Dominion Simulator available for download!
Post by: Loschmidt on February 06, 2012, 07:18:51 pm
Firstly Geronimoo; wow this thing is aweseome! Thanks so much for sharing it :D

Secondly; I would love it if you could access the play/discard/trash priorities. Most of the time they're spot on but sometimes you want to mess with them for a given strategy.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: blueblimp on February 16, 2012, 08:04:26 pm
Feature request: confidence intervals for simulation results. I've implemented a little Python script that calculates these for me using the formula from http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Normal_approximation_interval. It would be nice to have these in the app itself though.

For what it's worth, the Python code is:
Code: [Select]
import math
from scipy.stats import norm

def binomial_confidence_interval(p, N, conf):
  return norm.ppf(1 - conf/2) * math.sqrt(p*(1-p)/N)
"p" is the observed probability, "N" is the number of trials, and "conf" is the desired probability of the interval being wrong (sorry that the name doesn't make any sense, as I hacked it together pretty quickly).
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Empathy on May 18, 2012, 05:05:41 pm
Feature request:

Change ending condition (and victory condition).

In particular, first deck to gain a specific card (plat, follower), who 'wins' the split of a certain card (fool's gold, peddler, curse), first to reach a certain hand (KC/Bridge, KC/KC/card drawer, KC/possession) or deck size (golden deck).

The point is to simplify simulations. Endgames are hard to code for some games, but often the first step to a complicated kingdom is to be the first to reach a certain important benchmark. It doesn't always guarantee victory, but the simulation would help find out 'which strategy gets there faster', or even just the expected number of turns versus a different strategy. After that you assume the human player knows how to take advantage of his edge.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: axlemn on May 30, 2012, 05:26:48 pm
...
...
...

I actually know Java. 

This is the first time that knowing a programming language has enabled me to do something this awesome. 

Yay!  I can finally test my beloved Counting House thoroughly!  With massive modifications to only 5 cards! 
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on May 31, 2012, 02:23:37 am
...
...
...

I actually know Java. 

This is the first time that knowing a programming language has enabled me to do something this awesome. 

Yay!  I can finally test my beloved Counting House thoroughly!  With massive modifications to only 5 cards! 
If you can improve the play rules of cards you're free to add them to the Git.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Davio on July 16, 2012, 02:45:47 am
I'm having problems getting it to work with Java 1.7 (again).
It simply won't launch.

I have run a JNLP analyzer and this is what I get:

Code: [Select]
JaNeLA Report - version 11.05.17


Report for http://users.telenet.be/jeroenaga/dominion.jnlp

XML encoding not known, but declared as utf-8
Codebase + href 'http://users.telenet.be/dominion.jnlp' is not equal to actual location of 'http://users.telenet.be/jeroenaga/dominion.jnlp'.
Desktop icons were subject to bug nnnn in earlier J2SE versions
Downloads can be optimized by specifying a resource size for 'GeronimooDomSim.jar'.
The resource download at GeronimooDomSim.jar can be optimized by removing the (default) value of download='eager'.
The resource download at GeronimooDomSim.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the GeronimooDomSim.jar resource.
Lazy downloads might not work as expected for GeronimooDomSim.jar unless the download 'part' is specified.
Downloads can be optimized by specifying a resource size for 'jfreechart-1.0.13.jar'.
The resource download at jfreechart-1.0.13.jar can be optimized by removing the (default) value of download='eager'.
The resource download at jfreechart-1.0.13.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the jfreechart-1.0.13.jar resource.
Lazy downloads might not work as expected for jfreechart-1.0.13.jar unless the download 'part' is specified.
Downloads can be optimized by specifying a resource size for 'jcommon-1.0.16.jar'.
The resource download at jcommon-1.0.16.jar can be optimized by removing the (default) value of download='eager'.
The resource download at jcommon-1.0.16.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the jcommon-1.0.16.jar resource.
Lazy downloads might not work as expected for jcommon-1.0.16.jar unless the download 'part' is specified.
Downloads can be optimized by specifying a resource size for 'log4j-1.2.14.jar'.
The resource download at log4j-1.2.14.jar can be optimized by removing the (default) value of download='eager'.
The resource download at log4j-1.2.14.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the log4j-1.2.14.jar resource.
Lazy downloads might not work as expected for log4j-1.2.14.jar unless the download 'part' is specified.
Downloads can be optimized by specifying a resource size for 'jester.jpg'.
Icon loading & use can be optimized by specifying the width and height for jester.jpg

Can you maybe update some stuff to work with Java 7, Geronimoo?

- See attachment for UI output -


Edit: Never mind, I got it working. It somehow used the x64 version of Web Start by default instead of the x86 one. So be careful when using 64-bit Windows. When I launched by running the appropriate x86 javaws.exe directly with tje JNLP as a parameter, it worked.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: razorborne on July 27, 2012, 06:37:41 pm
hey, I've been trying to use this simulator, and while the simulations themselves work just fine, if I open the edit/create window to mess around with the strategies, the Buy Rules window is way too compressed to read or edit. here's a screencap:
(http://i148.photobucket.com/albums/s30/razorborne/geronimoo.jpg)

I'm running Mac OS 10.6.8, and I had my brother test it on 10.7.4 and he had the same problem. is anyone else having this issue?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: gamesou on August 02, 2012, 04:02:52 am
I'm running Mac OS 10.6.8, and I had my brother test it on 10.7.4 and he had the same problem. is anyone else having this issue?

I have the same issue (on Ubuntu)
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on August 02, 2012, 04:08:16 am
I have no experience with Mac OS and no way to test it. If anybody knows Java and can test on Mac OS, the code is open source, so they might solve the issue:

https://github.com/Geronimoo/Geronimoo-s-Dominion-Simulator
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: ftl on August 02, 2012, 04:19:53 am
works fine for me on ubuntu...
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Powerman on August 03, 2012, 12:20:22 am


I'm running Mac OS 10.6.8, and I had my brother test it on 10.7.4 and he had the same problem. is anyone else having this issue?

I have the same issue Mac OS 10.7.3.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: razorborne on August 03, 2012, 01:54:53 am
I've found that if you stretch the window wide enough that the scroll bar on the bottom disappears, you can then scroll up and down and read/edit line by line. not ideal by a long shot but it's a workaround for now. I have no knowledge of Java unfortunately, or I'd poke around at it. I might see if I can make my dad do it, he knows about these things.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: blueblimp on August 03, 2012, 02:11:01 am
I run Mac OS X 10.6.8 and I only get that layout issue when shrinking too small horizontally or too small vertically. (It's definitely a layout bug though, since it doesn't fill the window vertically, when it occurs.) If I remember correctly, the root of this problem is basically that most Swing layout managers are horrible.

I have a local version where (among other edits) I replaced the layout manager with something less awful, called MigLayout. (I only did this because I wanted to add some new panels, and got frustrated with the terribleness of the built-in layout managers.) Possibly I could clean this up and send a pull request, if there is interest.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: razorborne on August 03, 2012, 02:36:20 am
I run Mac OS X 10.6.8 and I only get that layout issue when shrinking too small horizontally or too small vertically. (It's definitely a layout bug though, since it doesn't fill the window vertically, when it occurs.) If I remember correctly, the root of this problem is basically that most Swing layout managers are horrible.

I have a local version where (among other edits) I replaced the layout manager with something less awful, called MigLayout. (I only did this because I wanted to add some new panels, and got frustrated with the terribleness of the built-in layout managers.) Possibly I could clean this up and send a pull request, if there is interest.
I have no idea what 90% of these words mean, but if it solves the problem, that'd be awesome.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on August 03, 2012, 03:34:00 am
I saw the change blueblimp made and incorporated it. But the next release might be a while (I might be coding all the Dark Ages cards right now...)
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: blueblimp on August 03, 2012, 11:44:41 am
I have a JAR file locally with the layout fix, but I'm not sure how to send it to you.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: michaeljb on August 03, 2012, 09:23:58 pm
I saw the change blueblimp made and incorporated it. But the next release might be a while (I might be coding all the Dark Ages cards right now...)

http://www.youtube.com/watch?v=yqyixwqiCag
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: carstimon on August 05, 2012, 12:20:22 pm
I made some changes to the code, how do I compile?  It's been a long time since I used javac. 
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: blueblimp on August 05, 2012, 01:16:02 pm
I made some changes to the code, how do I compile?  It's been a long time since I used javac.
My preference is to install IntelliJ IDEA (http://www.jetbrains.com/idea/) and use that to do your compilation and running. The Community Edition is free.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: razorborne on August 19, 2012, 02:50:12 am
for some reason, when I try to set up a start state involving Mandarin, I get an error. I've quadruple-checked that I'm spelling it right, and it works just fine if I set up a buy rule to buy them, but it won't let me start with them.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: heron on December 10, 2012, 09:50:00 pm
I have the same problem as razorbone, and would be interested in a fix.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Stealth Tomato on December 21, 2012, 01:36:51 pm
Simple bug: The board creator want Jack capitalized as "Jack of all Trades" although it's "Jack of All Trades" (confirmed in Iso).
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Drab Emordnilap on December 21, 2012, 02:25:13 pm
Simple bug: The board creator want Jack capitalized as "Jack of all Trades" although it's "Jack of All Trades" (confirmed in Iso).

Also confirmed by, you know, the card itself (http://wiki.dominionstrategy.com/index.php/Jack_of_all_Trades).
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: theory on December 21, 2012, 02:29:49 pm
Simple bug: The board creator want Jack capitalized as "Jack of all Trades" although it's "Jack of All Trades" (confirmed in Iso).

Also confirmed by, you know, the card itself (http://wiki.dominionstrategy.com/index.php/Jack_of_all_Trades).

Uh, the card itself looks like it's Jack of all Trades...
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: HiveMindEmulator on December 21, 2012, 04:51:02 pm
Yeah, that's weird. Is that the only example where a non-trivial word in the card name is not capitalized?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Drab Emordnilap on December 21, 2012, 07:22:47 pm
Simple bug: The board creator want Jack capitalized as "Jack of all Trades" although it's "Jack of All Trades" (confirmed in Iso).

Also confirmed by, you know, the card itself (http://wiki.dominionstrategy.com/index.php/Jack_of_all_Trades).

Uh, the card itself looks like it's Jack of all Trades...

I agree. That's what the board creator wants, also. I was trying to say that it isn't a bug for the board creator to match the actual card.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Polk5440 on July 23, 2013, 03:52:48 pm
Is there any chance that you will update the Simulator to handle some/all of Dark Ages and/or Guilds, Geronimoo?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on October 08, 2015, 02:09:10 am
I've updated the sim. Some Adventures cards have been implemented. I'll be taking requests to implement cards. Long term plan is to code all the cards (and events).
Governor finally beats Big Money.

Click here (http://users.telenet.be/jeroenaga/dominion.jnlp) to get the latest version.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: GendoIkari on October 08, 2015, 05:54:17 pm
I've updated the sim. Some Adventures cards have been implemented. I'll be taking requests to implement cards. Long term plan is to code all the cards (and events).
Governor finally beats Big Money.

Click here (http://users.telenet.be/jeroenaga/dominion.jnlp) to get the latest version.

Why was Governor (http://wiki.dominionstrategy.com/index.php/Governor) not beating big money before? Something wrong with the simulator, or are the play rules just that complex for it? Does the simulator provide any mechanism for choosing the play rules of a card instead of only what cards to buy?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Limetime on December 03, 2015, 08:11:44 pm
Prince+hermit doesn't work :(
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on February 01, 2016, 01:24:25 pm
All cards and events have been implemented in the simulator.

Click here (http://users.telenet.be/jeroenaga/dominion.jnlp) to get the latest version.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: schadd on February 01, 2016, 01:59:55 pm
man wouldn't it be the stupidest thing if it turned out witch-bm beat cultist-bm
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: schadd on February 01, 2016, 06:33:42 pm
guys it turns out witch-bm handily beats cultist-bm
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: liopoil on February 01, 2016, 07:49:29 pm
guys it turns out witch-bm handily beats cultist-bm
How is this even possible? What if the cultist player picks up a witch after 2 cultists or something?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: singletee on February 01, 2016, 08:07:34 pm
guys it turns out witch-bm handily beats cultist-bm
How is this even possible?

It's harder to connect Cultists when you're being junked yourself. With 10 junks per player and 2 piles running out, the game will pretty much inevitably end in a Duchy rush, and the Witch player has a sizeable lead from the curses.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Limetime on February 02, 2016, 07:28:55 pm
Can you copy and paste strategies?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: DG on February 19, 2016, 06:26:17 pm
How are shelters implemented? I can change the starting deck into "7 Copper, Necropolis, Hovel, Overgrown Estate", and that does happen, but the supply then includes an extra 3 estates for each player.

There's a problem with counterfeit and spoils. A sample game be played but simulations are failing (stopping early?) and the activity cursor keeps spinning with no stats.

Seaway is activating on silver when it should only activate on actions.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Infthitbox on April 18, 2016, 04:19:27 pm
I think there's a bug with Feodum in that the simulator appears to think it costs $3.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Infthitbox on April 19, 2016, 01:11:54 pm
The simulator never actually plays Beggar, making simulating Beggar/Gardens impossible.

EDIT: Apparently, you have to have a buy rule for Copper in your strategy in order for the sim to play Beggar. (Apparently it only plays it if owner.wants(Copper) or something like that, and you only want Copper if you have a buy rule for it).
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Jargonius on May 12, 2016, 01:47:04 pm
I can't get the simulator to run.  It just pops up with this window.  http://imgur.com/sxyy1c1
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Jargonius on May 12, 2016, 01:57:38 pm
I can't get the simulator to run.  It just pops up with this window.  http://imgur.com/sxyy1c1

I got it to work by adding the url to the exceptions list but you should still look into this.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: pab9ab on August 08, 2016, 01:39:50 pm
I wanted to use it but Java wouldn't trust it. I edited my Java Settings to make an exeption for http://users.telnet.be (Where the file is located) but it still doesn't work. Anybody else have this problem? How do I fix this?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: jup on August 19, 2016, 06:25:01 pm
I wanted to use it but Java wouldn't trust it. I edited my Java Settings to make an exeption for http://users.telnet.be (Where the file is located) but it still doesn't work. Anybody else have this problem? How do I fix this?

It's http://users.telenet.be. Be mindful of the extra 'e'. ;) That worked for me.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: CPiGuy on October 31, 2017, 03:03:54 pm
Is there a way to make strategies which involve putting the Training, etc. tokens on certain piles? If so, how?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: belugawhale on November 28, 2017, 06:54:00 pm
Bug with Trade Route and Castles: Trade Route counts EACH castle as having a coin token rather than the pile, allowing Trade Route to reach $11.
Quote
Human plays Trade Route
   ... Human gets +1 buys
   ... Human gets +$11
   ... Human trashes a Trade Route
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Polk5440 on February 20, 2018, 10:32:08 am
Nocturne cards look like they are in the simulator with Heirlooms, but are they fully implemented? Shephard, for instance, takes the +1 Action but does not discard green to draw cards.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on February 20, 2018, 12:32:28 pm
Only a few nocturne cards have been implemented. I can prioritize them if you ask for specific cards.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Polk5440 on February 20, 2018, 01:22:30 pm
Only a few nocturne cards have been implemented. I can prioritize them if you ask for specific cards.

Thanks. Shepherd would be my only request at the moment. I opened the simulator to try out faust's proposed simple strategy ("A very simple yet efficient deck for Shepherd is to just add a single Silver, Shepherds whenever you hit $4 and the best green card available otherwise"). It would be very easy to check against some benchmarks, and it's not clear to me that the simple strategy is all that great.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: trivialknot on November 27, 2018, 10:25:09 am
How far along is Renaissance implementation?  Would be interesting to try Flagbearer.

I found a bug with Knights.  You can't buy Knights.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: LittleFish on January 16, 2019, 04:23:12 pm
How do we know this isn't a virus? I'm just a little paranoid and the computer keeps saying "This file will harm your computer" when I click download
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: sudgy on January 16, 2019, 11:07:14 pm
How do we know this isn't a virus? I'm just a little paranoid and the computer keeps saying "This file will harm your computer" when I click download

Does it say this file will harm or can harm?  If it's the former, then you probably have a stupid browser/computer, and if it's the latter, the browser/computer says that for every single program.  There is a small chance that it has become a virus since the last time I used it, but it should be fine.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: LittleFish on January 17, 2019, 07:55:18 am
It could be the file type.(.jnlp) It says "can harm".
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on January 30, 2019, 10:45:44 am
Renaissance had been fully implemented in the sim
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Warwing25 on February 23, 2019, 08:37:03 pm
Really love this tool!!

I was wondering if there was a way to test which player went first(starting player) in the buy rules?

Also whether or not there is a way to count total cards in opponents deck?

Huge thanks for making this tool, it's sick.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on February 24, 2019, 02:41:08 pm
You can set the player order fixed for all games (Player 1 will always be first player, then Player 2, then Player 3). Just check the box on the main screen "Keep this player order for all games".

There is no option to count total cards in opponent's deck, but I'll provide it in the next release.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Limetime on April 22, 2020, 06:09:37 pm
I was wondering if you could write a feature to run many different AIs head to head, so we can get a better idea of what counters what without tediously running each separate simulation. Also menagerie would be a welcome update!
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on April 23, 2020, 05:39:45 am
I was wondering if you could write a feature to run many different AIs head to head, so we can get a better idea of what counters what without tediously running each separate simulation. Also menagerie would be a welcome update!
I suppose I could write a service that accepts a csv-file with a bunch of matchups and then spits out a csv with the results. If you're a programmer you're free to implement it yourself. The code is open source on Github.

I've implemented most of the Menagerie cards. I plan to make an anouncement when I'm finished with the whole set.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: ftl on April 26, 2020, 10:06:23 pm
I think there's a bug in Cargo Ship. The cards gained with cargo ship in play don't seem to make it back into the deck, they never get drawn.
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: boardgametheories.com on October 06, 2020, 05:45:49 am
So are these projects still being maintained?
Title: Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
Post by: Geronimoo on October 07, 2020, 02:18:20 am
So are these projects still being maintained?
yes...