Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 2 [3] 4 5 ... 7  All

Author Topic: Geronimoo's Dominion Simulator: the ultimate simulation tool  (Read 231574 times)

0 Members and 1 Guest are viewing this topic.

Captain_Frisk

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1257
  • Respect: +1263
    • View Profile
Re: Dominion Simulator available for download!
« Reply #50 on: August 05, 2011, 11:41:34 am »
0

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!
Logged
I support funsockets.... taking as much time as they need to get it right.

Captain_Frisk

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1257
  • Respect: +1263
    • View Profile
Re: Dominion Simulator available for download!
« Reply #51 on: August 05, 2011, 11:46:10 am »
0

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!
Logged
I support funsockets.... taking as much time as they need to get it right.

Captain_Frisk

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1257
  • Respect: +1263
    • View Profile
Re: Dominion Simulator available for download!
« Reply #52 on: August 05, 2011, 11:58:26 am »
0

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?


Logged
I support funsockets.... taking as much time as they need to get it right.

fp

  • Thief
  • ****
  • Offline Offline
  • Posts: 94
  • Respect: +6
    • View Profile
Re: Dominion Simulator available for download!
« Reply #53 on: August 22, 2011, 12:16:07 am »
0

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.
Logged

jonts26

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2746
  • Shuffle iT Username: jonts
  • Respect: +3671
    • View Profile
Re: Dominion Simulator available for download!
« Reply #54 on: August 29, 2011, 09:29:59 pm »
0

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.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Dominion Simulator available for download!
« Reply #55 on: August 30, 2011, 01:29:49 am »
0

Wishing Well is coded to wish for the card with the highest frequency in the draw deck.
Logged

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +676
    • View Profile
Re: Dominion Simulator available for download!
« Reply #56 on: August 30, 2011, 06:03:10 am »
0

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?
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Dominion Simulator available for download!
« Reply #57 on: August 30, 2011, 06:49:26 am »
0

No, Wishing Well's implementation does not take previous plays in account.
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: Dominion Simulator available for download!
« Reply #58 on: August 30, 2011, 06:03:16 pm »
0

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).
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

danshep

  • Navigator
  • ****
  • Offline Offline
  • Posts: 70
  • Respect: +15
    • View Profile
Re: Dominion Simulator available for download!
« Reply #59 on: August 30, 2011, 10:31:19 pm »
0

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).
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: Dominion Simulator available for download!
« Reply #60 on: August 31, 2011, 04:09:35 am »
0

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.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2834
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3882
    • View Profile
    • My Dominion Videos
Re: Dominion Simulator available for download!
« Reply #61 on: September 09, 2011, 11:32:01 am »
0

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.
Logged
Visit my blog for links to a whole bunch of Dominion content I've made.

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +676
    • View Profile
Re: Dominion Simulator available for download!
« Reply #62 on: September 09, 2011, 11:39:39 am »
0

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.
Logged

ftl

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2056
  • Shuffle iT Username: ftl
  • Respect: +1345
    • View Profile
Re: Dominion Simulator available for download!
« Reply #63 on: September 09, 2011, 12:51:28 pm »
0

At 10,000 games, the margin of error is already pretty darn small...
Logged

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2834
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3882
    • View Profile
    • My Dominion Videos
Re: Dominion Simulator available for download!
« Reply #64 on: September 09, 2011, 12:55:04 pm »
0

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.
Logged
Visit my blog for links to a whole bunch of Dominion content I've made.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Dominion Simulator available for download!
« Reply #65 on: September 09, 2011, 01:20:36 pm »
0

I doubt there's much value in having more than 10,000 simulations. The margin of error for most games is <1%.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4389
    • View Profile
    • WanderingWinder YouTube Page
Re: Dominion Simulator available for download!
« Reply #66 on: September 09, 2011, 01:36:09 pm »
0

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.

rod-

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 213
  • Respect: +49
    • View Profile
Re: Dominion Simulator available for download!
« Reply #67 on: September 09, 2011, 02:02:03 pm »
0

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.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Dominion Simulator available for download!
« Reply #68 on: September 12, 2011, 10:21:46 am »
0

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.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Dominion Simulator available for download!
« Reply #69 on: September 12, 2011, 10:29:55 am »
0

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.
Logged

Tydude

  • Baron
  • ****
  • Offline Offline
  • Posts: 54
  • Respect: +5
    • View Profile
Re: Dominion Simulator available for download!
« Reply #70 on: September 12, 2011, 05:39:47 pm »
0

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?
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Dominion Simulator available for download!
« Reply #71 on: September 13, 2011, 03:29:30 am »
0

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.
Logged

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +676
    • View Profile
Re: Dominion Simulator available for download!
« Reply #72 on: September 13, 2011, 06:27:20 am »
0

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.
Logged

Tydude

  • Baron
  • ****
  • Offline Offline
  • Posts: 54
  • Respect: +5
    • View Profile
Re: Dominion Simulator available for download!
« Reply #73 on: September 13, 2011, 06:33:23 am »
0

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.
Logged

Tydude

  • Baron
  • ****
  • Offline Offline
  • Posts: 54
  • Respect: +5
    • View Profile
Re: Geronimoo's Dominion Simulator: the ultimate simulation tool
« Reply #74 on: September 17, 2011, 09:05:35 am »
0

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.
Logged
Pages: 1 2 [3] 4 5 ... 7  All
 

Page created in 0.052 seconds with 20 queries.