Dominion Strategy Forum

Dominion => Simulation => Topic started by: Geronimoo on October 03, 2011, 06:08:16 pm

Title: Another release of Geronimoo's Simulator
Post by: Geronimoo on October 03, 2011, 06:08:16 pm
I just released a new version http://dominionsimulator.wordpress.com/

Normally you should upgrade automatically when you launch the simulator.
Title: Re: Another release of Geronimoo's Simulator
Post by: DG on October 05, 2011, 10:53:41 am
I think you might have tweaked remodel out of shape in the last patch. If you script an option to remodel copper to a 2-cost card it will typically do so ahead of remodelling an estate to a better card. It happens with both "card in play: remodel > 0" and "isActionPhase = 1".

Code: [Select]
<player name="remodel" author="DG" description="example script">
 <type name="Generated"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="TwoPlayer"/>
 <type name="Bot"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.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="Remodel">
      <condition>
         <left type="countCardsInDeck" attribute="Remodel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Caravan"/>
   <buy name="Silver"/>
   <buy name="Caravan">
      <condition>
         <left type="isActionPhase"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="isActionPhase"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
</player>

Title: Re: Another release of Geronimoo's Simulator
Post by: Geronimoo on October 07, 2011, 03:47:54 am
@DG: this isn't really a Remodel bug, but rather a feature of the Estate card:

http://dominionsimulator.wordpress.com/play-rules/base/estate/

Since Estate is in your buy rules, the Simulator will think you want Estates and it will lower its trash priority so they will get trashed after Copper. If you replace Estate by Pearl Diver for instance the Estates will again be trashed before the Coppers.

I don't see an easy fix for this.
Title: Re: Another release of Geronimoo's Simulator
Post by: DStu on October 07, 2011, 04:03:48 am
I don't see an easy fix for this.
What happens if you put a "if false buy Copper" ahead of the Estates?
Title: Re: Another release of Geronimoo's Simulator
Post by: Geronimoo on October 07, 2011, 04:19:19 am
Copper's trash priority isn't dynamic, it's a fixed number because you'll always want to trash it (except maybe in some corner cases). So putting Copper in the buy rules has no effect.
Title: Re: Another release of Geronimoo's Simulator
Post by: DG on October 07, 2011, 01:03:54 pm
I can't suggest any solutions for the remodel. I suspect there will be solutions though for the mine.


This results in ventures and royal seals getting trashed for gold when copper or silver is in hand. I can see a variety of situations occurring though where treasure cards outside the basic supply should be mined first, so maybe some decision making is needed. Looking through the treasure cards I'd suggest a mining priority in roughly this order:


Gold
Contraband - Situational but removing contraband before the end game is usually desirable.
Loan - Situational. Always mine ahead of silver/copper seems reasonable.
Talisman - Situational. Always mine ahead of silver/copper seems reasonable.
Quarry -  Situational. Always mine ahead of silver/copper seems reasonable.
Silver
Copper
Hoards - Situational. Only mine after basic treasures seems reasonable but mining up to platinum could be better.
Royal Seal - Situational. Only mine after basic treasures seems reasonable.
Stash - Situational. Only mine after basic treasures seems reasonable.
Banks - Situational. Only mine after basic treasures seems reasonable.
Harems - Situational. Only mine after basic treasures seems reasonable.
Horn of Plenty - Situational. Only mine after basic treasures seems reasonable.
Ventures - Only mine when no basic treasures are present.
Potion - Mines and potions can be played cleverly by humans but probably best to never trash potions with the simulator.
Philosopher's stone - never intentionally mine this.
Diadem - Never intentionally mine this.
Title: Re: Another release of Geronimoo's Simulator
Post by: HiveMindEmulator on October 07, 2011, 02:39:06 pm
^The problem with giving gold the highest priority is that it will mine gold into gold in province games where there is no platinum.

Copper's trash priority isn't dynamic, it's a fixed number because you'll always want to trash it (except maybe in some corner cases). So putting Copper in the buy rules has no effect.
Is estate the only card with dynamic trash priority, or are other cards like this too? If other cards are, is there a problem with making copper's trash priority dynamic to fix problems like this?
Title: Re: Another release of Geronimoo's Simulator
Post by: DG on October 13, 2011, 10:31:36 am
I put together a university based script and the bot was gaining action cards (monuments) with the university even though it broke a constraint in the purchasing text (getting more than could ever be played). Is this deliberate or a problem?

Code: [Select]
<player name="University overload" author="DG" description="">
 <type name="UserCreated"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="Bot"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.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="University">
      <condition>
         <left type="countCardsInDeck" attribute="University"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="University">
      <condition>
         <left type="countCardsInDeck" attribute="Scrying_Pool"/>
         <operator type="greaterThan" />
         <right type="countCardsInDeck" attribute="University"/>
      </condition>
   </buy>
   <buy name="Scrying_Pool"/>
   <buy name="Gold"/>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Copper"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Saboteur">
      <condition>
         <left type="countCardsInDeck" attribute="Saboteur"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Terminal"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="University"/>
      </condition>
   </buy>
   <buy name="Monument">
      <condition>
         <left type="countCardTypeInDeck" attribute="Terminal"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="University"/>
      </condition>
   </buy>
   <buy name="Masquerade">
      <condition>
         <left type="countCardsInDeck" attribute="Masquerade"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Menagerie"/>
   <buy name="Silver"/>
</player>
Title: Re: Another release of Geronimoo's Simulator
Post by: Geronimoo on October 13, 2011, 10:37:11 am
I put together a university based script and the bot was gaining action cards (monuments) with the university even though it broke a constraint in the purchasing text (getting more than could ever be played). Is this deliberate or a problem?

This is a bug. I thought University's gaining was mandatory, but I re-read it and it's not. I'll fix this as soon as possible.
Title: Re: Another release of Geronimoo's Simulator
Post by: Epoch on November 01, 2011, 07:02:45 pm
^The problem with giving gold the highest priority is that it will mine gold into gold in province games where there is no platinum.

Yeah, it needs a thing at the top that says, "If this is the most expensive treasure on the user's buy list (or tied for same), then do not Mine it."