Dominion Strategy Forum

Dominion => Simulation => Topic started by: ecq on May 01, 2012, 09:52:05 am

Title: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: ecq on May 01, 2012, 09:52:05 am
The Challenge: Show that Philosopher's Stone is worth buying as part of an Ill-Gotten Gains strategy.

Create a bot which uses a Philosopher's Stone + Ill-Gotten Gains strategy to defeat a bot on a pure Ill-Gotten Gains strategy.  Inspired by claims in the Philosopher's Stone (http://forum.dominionstrategy.com/index.php?topic=2391.0) article request.

Some rules:
- Use the optimized Ill-Gotten Gains bot (http://forum.dominionstrategy.com/index.php?topic=625.msg24198#msg24198) as a starting point, not the default bot.
- If you include alternate VP, the pure IGG strategy should be updated to buy those cards where rational.  So, for instance, if the P. Stone / IGG bot is buying Tunnel / Province, the pure IGG bot should buy Tunnel with < $5 hands while greening, or to end the game.
- There's no limit in the number of extra cards you throw in the mix, but since the point is to show that P. Stone and IGG work well together, the fewer the better.  I.e. it's a stronger statement to say "IGG + P. Stone works great in the presence of alternate VP" than it is to say "IGG + P. Stone works great if you have at least 3 alternate VP cards and Monument."
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: DG on May 01, 2012, 10:38:13 am
Code: [Select]
<player name="IGG Rush and PS"
 author="DG"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Competitive"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Philosopher$s_Stone"/>
   <buy name="Ill_Gotten_Gains"/>
   <buy name="Duchy"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Apothecary"/>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="8.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Copper"/>
</player>
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: ecq on May 01, 2012, 11:09:49 am
Interesting.  That seems to suggest that P. Stone's losses tend to come from drawing $2p.

I discovered something else when playing with DG's solution.  Take the following 4 bots:

1 beats 3 (narrow margin)
1 ties 2
3 beats 2 (narrow margin)
3 beats 4 (55 / 40)

I guess that illustrates that bots really need to be optimized against their opponent for definitive results, not against themselves.
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: Robz888 on May 01, 2012, 01:35:24 pm
The Challenge: Show that Philosopher's Stone is worth buying as part of an Ill-Gotten Gains strategy.

Create a bot which uses a Philosopher's Stone + Ill-Gotten Gains strategy to defeat a bot on a pure Ill-Gotten Gains strategy.  Inspired by claims in the Philosopher's Stone (http://forum.dominionstrategy.com/index.php?topic=2391.0) article request.

Oh, now you're going to disprove my assertions with facts? You big jerk ;)

I don't know how to use the simulators, so I'll need a champion for my cause!

I suspect alternate VP cards will not help Philosopher's Stone/IGG very much, and they won't prove my case anyway. (Gardens and PS probably work together, it doesn't mean PS and IGG work together.) However, I suspect Colony might benefit the PS/IGG strategy.

I looked through my games where both cards were available, and I lost the majority of them, so ignoring that, here's one where it worked! http://councilroom.com/game?game_id=game-20120408-102226-24607ba0.html
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: shark_bait on May 01, 2012, 02:30:30 pm
I messed around with herbalist a bit this morning.  I forgot to save the bots, but I think I got it to about 50/50 while allowing each bot to buy provinces and making the PS bot buy and gain coppers whenever possible.  If  I have time I'll try fine tuning them, but I'd say it's promising due to Herbalists ability to 1.) put potion on top to buy more stones and 2.) put stones on top to use them more often.
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: Jorbles on May 01, 2012, 05:51:50 pm
I messed around with herbalist a bit this morning.  I forgot to save the bots, but I think I got it to about 50/50 while allowing each bot to buy provinces and making the PS bot buy and gain coppers whenever possible.  If  I have time I'll try fine tuning them, but I'd say it's promising due to Herbalists ability to 1.) put potion on top to buy more stones and 2.) put stones on top to use them more often.
Does the bot use Herbalist to put IGGs/Silvers/?Coppers? back on the deck if there is no PS in hand or does it prefer the slightly faster cycling?
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: shark_bait on May 01, 2012, 08:12:09 pm
Alright, this is what I've got.

First bot is the IGG/PS

Code: [Select]

<player name="Ill-Gotten Gains/PS"
 author="Bruce"
 description="This Bot buy IGG and PS">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Philosopher$s_Stone"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Copper"/>
</player>

The next one is the basic IGG rush bot I ran it against
Code: [Select]

<player name="Ill-Gotten Gains"
 author="Geronimoo"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
   <buy name="Province"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Herbalist">
      <condition>
         <left type="countCardsInDeck" attribute="Herbalist"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="7.0" />
      </condition>
   </buy>
   <buy name="Copper"/>
</player>

The PS bot wins 63:36

Adding in Herbalist to the PS as shown below increases the winrate to 72:26

Code: [Select]

<player name="Ill-Gotten Gains/PS/Herbalist"
 author="Bruce"
 description="This Bot buy IGG and PS">
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Competitive"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Philosopher$s_Stone"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Herbalist">
      <condition>
         <left type="countCardsInDeck" attribute="Herbalist"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="7.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Copper"/>
</player>

@Jorbles - The bot puts Potion and PS on top.  It does not top deck IGG or Silver. 

So in conclusion, I would say that even in the absence of other Kingdom cards, an IGG strategy that utilizes PS will beat one that doesn't.
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: WanderingWinder on May 01, 2012, 08:31:05 pm
Alright, this is what I've got.

First bot is the IGG/PS

Code: [Select]

<player name="Ill-Gotten Gains/PS"
 author="Bruce"
 description="This Bot buy IGG and PS">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Philosopher$s_Stone"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Copper"/>
</player>

The next one is the basic IGG rush bot I ran it against
Code: [Select]

<player name="Ill-Gotten Gains"
 author="Geronimoo"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
   <buy name="Province"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Herbalist">
      <condition>
         <left type="countCardsInDeck" attribute="Herbalist"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="7.0" />
      </condition>
   </buy>
   <buy name="Copper"/>
</player>

The PS bot wins 63:36

Adding in Herbalist to the PS as shown below increases the winrate to 72:26

Code: [Select]

<player name="Ill-Gotten Gains/PS/Herbalist"
 author="Bruce"
 description="This Bot buy IGG and PS">
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Competitive"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Philosopher$s_Stone"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy"/>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Potion">
      <condition>
         <left type="countCardsInDeck" attribute="Potion"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Herbalist">
      <condition>
         <left type="countCardsInDeck" attribute="Herbalist"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="7.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Copper"/>
</player>

@Jorbles - The bot puts Potion and PS on top.  It does not top deck IGG or Silver. 

So in conclusion, I would say that even in the absence of other Kingdom cards, an IGG strategy that utilizes PS will beat one that doesn't.
There's a reason that the rules are what they say they are. You're running an inferior IGG bot, and when you run it against the more optimized one, your loses, albeit extremely slightly.
So your conclusions are totally nullified.
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: shark_bait on May 01, 2012, 08:39:17 pm
There's a reason that the rules are what they say they are. You're running an inferior IGG bot, and when you run it against the more optimized one, your loses, albeit extremely slightly.
So your conclusions are totally nullified.

Ha ha... shows how much effort I put into the basic IGG bot.  Thanks for correcting me.

Care to elaborate on it a bit more?  Was it the Herbalist one that lost slightly?  What happens if you implement the PS/Herbalist buy rules into the more optimized IGG bot?  Would it still lose then?
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: WanderingWinder on May 01, 2012, 08:49:34 pm
There's a reason that the rules are what they say they are. You're running an inferior IGG bot, and when you run it against the more optimized one, your loses, albeit extremely slightly.
So your conclusions are totally nullified.

Ha ha... shows how much effort I put into the basic IGG bot.  Thanks for correcting me.

Care to elaborate on it a bit more?  Was it the Herbalist one that lost slightly?  What happens if you implement the PS/Herbalist buy rules into the more optimized IGG bot?  Would it still lose then?
No, it was the without herbalist one. I'm sure with herbalist, it's worth it. Um, not sure what your last question is asking.
Title: Re: Simulation Challenge: Ill-Gotten Gains / Philosopher's Stone
Post by: shark_bait on May 01, 2012, 08:56:42 pm
There's a reason that the rules are what they say they are. You're running an inferior IGG bot, and when you run it against the more optimized one, your loses, albeit extremely slightly.
So your conclusions are totally nullified.

Ha ha... shows how much effort I put into the basic IGG bot.  Thanks for correcting me.

Care to elaborate on it a bit more?  Was it the Herbalist one that lost slightly?  What happens if you implement the PS/Herbalist buy rules into the more optimized IGG bot?  Would it still lose then?
No, it was the without herbalist one. I'm sure with herbalist, it's worth it. Um, not sure what your last question is asking.

You had said that it loses slightly, just was wondering whether adding the PS/Herbalist buy rules would cause that bot to win against the optimized IGG rush bot, but you already answered that.