Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Simulation Challenge: play according to the draw  (Read 2673 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Simulation Challenge: play according to the draw
« on: February 27, 2012, 12:58:45 pm »
+1

Some boards will favor a certain strategy and you should go for it no matter what: happily paying $6 for Minion and $4 for Lighthouse, while other boards are not that clear cut: always hitting $5 and going for an engine with Bazaar or always hitting $6 and happily buy Golds and go for a Big Money strategy.

So here's the challenge: create a bot that plays an engine strategy if it draws in a certain way, but goes for Big Money if it draws different. This bot should convincingly beat the optimized bots that go for the same strategy however they draw their money (so also provide the engine bot and money bot).

(engine strategies will have some kind of Village in their end deck while a money strategy shouldn't)
Logged

A_S00

  • Spy
  • ****
  • Offline Offline
  • Posts: 84
  • Respect: +41
    • View Profile
Re: Simulation Challenge: play according to the draw
« Reply #1 on: February 28, 2012, 06:30:21 pm »
0

This challenge is cool enough that I feel like it shouldn't keep languishing, so here's a (probably not especially good) solution:

Code: [Select]
<player name="Fool's Gold/Mint || Familiar/FV/Smithy"
 author="A_S00"
 description="Goes Fool's Gold/Mint with a 5/2 split, or Familiar/Fishing Village/Smithy with a 4/3 split.">
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="Combo"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
 <type name="UserCreated"/>
 <type name="Province"/>
   <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="Mint">
      <condition>
         <left type="countCardsInDeck" attribute="Mint"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Fool$s_Gold">
      <condition>
         <left type="countTurns"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Fool$s_Gold">
      <condition>
         <left type="countCardsInDeck" attribute="Fool$s_Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Potion">
      <condition>
         <left type="countTurns"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Familiar">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Smithy">
      <condition>
         <left type="countCardsInDeck" attribute="Smithy"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Fishing_Village"/>
      </condition>
   </buy>
   <buy name="Fishing_Village">
      <condition>
         <left type="countTurns"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Fishing_Village">
      <condition>
         <left type="countCardsInDeck" attribute="Fishing_Village"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

This bot plays FG/Mint on a 5/2 split, or opens Familiar, then transitions into a Fishing Village/Smithy engine if it gets a 4/3 split.  With both bots on a random split, it beats FG/Mint 70-27 (not surprisingly, since FG/Mint is terrible on 4/3), and beats my Familiar/Fishing Village/Smithy bot 62-34.  It also crushes BMU 86-11, and takes out the built-in Familiar bot 78-19 (it loses 26-71 against the "lucky 3rd turn" variant, but I don't think that's really a fair comparison).

For reference, here are the two bots I'm comparing it against (which are just the two halves of the bot above, without the conditional play):

FG/Mint:
Code: [Select]
<player name="Fool's Gold/Mint"
 author="A_S00"
 description="The 5/2 dominator.">
 <type name="Bot"/>
 <type name="Combo"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="Competitive"/>
 <type name="UserCreated"/>
 <type name="Province"/>
   <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="Mint">
      <condition>
         <left type="countCardsInDeck" attribute="Mint"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Fool$s_Gold"/>
   <buy name="Gold"/>
   <buy name="Silver"/>
</player>

Familiar/Fishing Village/Smithy:
Code: [Select]
<player name="Familiar/FishingVillage/Smithy"
 author="A_S00"
 description="A Fishing Village/Smithy engine that buys an early Familiar.">
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
 <type name="Attacking"/>
 <type name="Province"/>
   <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="Familiar">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="4.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="Smithy"/>
   <buy name="Fishing_Village"/>
   <buy name="Silver"/>
</player>

Both of these bots beat BMU (even FG/Mint on a 4/3 split edges it out 48-45...this just in, Fool's Gold is pretty good).  They're also both competitive against the simulator's built-in Familiar bot (the engine beats it 60-37 on random split; FG/Mint needs a 5/2 split to win, but crushes through 92-6 if it gets it).

(Attached are two sample games, one of it playing the engine, one playing with FG.)

Who's next?
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulation Challenge: play according to the draw
« Reply #2 on: February 29, 2012, 05:07:26 am »
0

The goal of this was actually to prove that changing your strategy mid game is viable if you draw your money in a certain way. Very often opening $5/$2 against $4/$3 will lead to diverging strategies anyway.

I'm thinking more along the lines of: Open Silver/Silver, then get a Wharf, then diverge into Bazaar/Wharf if you draw lots of $5 or Big Money Wharf with lots of $6 draws (not saying this is a solution to the challenge)

So, A_S00, thanks for the effort, but not really what I was looking for...
Logged

A_S00

  • Spy
  • ****
  • Offline Offline
  • Posts: 84
  • Respect: +41
    • View Profile
Re: Simulation Challenge: play according to the draw
« Reply #3 on: February 29, 2012, 07:29:54 am »
0

That is harder (which is why I was lazy and went for the 5/2 split case :P )...I'll see if I can come up with a good case for what you're actually going for.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulation Challenge: play according to the draw
« Reply #4 on: March 30, 2012, 04:19:32 am »
+1

Opening $5/$2, this bot goes for an Envoy/Fishing Village engine by default, BUT if it gets a Gold on turn 3 it goes for a pure money strategy. It easily beats the pure money bot and beats the pure engine bot by 2% (make sure both bots open $5/$2):

Code: [Select]
<player name="Envoy dynamic strategy"
 author="Geronimoo"
 description="">
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Engine"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <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">
      <condition>
         <left type="countTurns"/>
         <operator type="equalTo" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Gold">
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="14.0" />
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Village"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Woodcutter"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Fishing_Village"/>
</player>

Here's the pure money bot:
Code: [Select]
<player name="Envoy"
 author="WanderingWinder"
 description="The optimized Envoy strategy that buys no other actions.">
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <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="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="14.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Here's the pure engine bot:
Code: [Select]
<player name="Envoy/FV"
 author="Geronimoo"
 description="">
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="Engine"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <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="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Envoy">
      <condition>
         <left type="countCardsInDeck" attribute="Envoy"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Village"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Woodcutter"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Fishing_Village"/>
</player>

Logged
Pages: [1]
 

Page created in 0.041 seconds with 20 queries.