Dominion Strategy Forum

Please login or register.

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

Author Topic: Can you play this board better than my sim?  (Read 3825 times)

0 Members and 1 Guest are viewing this topic.

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Can you play this board better than my sim?
« on: April 04, 2015, 11:01:00 pm »
+1

I played a game against one of the Goko bots in which I ran a bunch of sims before I started playing. I thought people might enjoy looking at the board, thinking about what they would do, and then comparing their strategy to the best sim bot I built (and perhaps trying to beat it). If people like it I may post some more.

Here's the board:
Beggar, Masterpiece, Wishing Well, Baron, Island, Monument, Navigator, Pirate Ship, Contraband, King's Court, Copper, Silver, Gold, Estate, Duchy, Province, Curse

My game log is at http://dominionlogs.goko.com//20150403/log.516cccebe4b082c74d79df9b.1428125493922.txt.

The bot, in Geronimoo format, is attached. I tested it against the built-in Monument bot. For those comfortable reading XML I've also pasted in below as a spoiler.


<?xml version="1.0" encoding="UTF-8"?>
<playerCollection>
<player name="My bot"
 author="Chadeos"
 description="">
 <type name="Optimized"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="King$s_Court"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <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="1.0"/>
      </condition>
   </buy>
   <buy name="King$s_Court"/>
   <buy name="Gold">
      <condition>
         <left type="countCardsInDeck" attribute="King$s_Court"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Monument">
      <condition>
         <left type="countCardsInDeck" attribute="Monument"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
         <extra_operation type="divideBy" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Wishing_Well"/>
</player>

</playerCollection>


Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Can you play this board better than my sim?
« Reply #1 on: April 04, 2015, 11:14:55 pm »
0

Pretty sure a deck that uses KC-monument and never greens except on the last turn crushes this mercilessly. Although the deck takes a very long time to build, I think it gets there in time.
Logged

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Can you play this board better than my sim?
« Reply #2 on: April 04, 2015, 11:27:21 pm »
0

Pretty sure a deck that uses KC-monument and never greens except on the last turn crushes this mercilessly. Although the deck takes a very long time to build, I think it gets there in time.

Where do you get the +Buy for a megaturn?
Logged

2.71828.....

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1290
  • Shuffle iT Username: irrationalE
  • Respect: +1322
    • View Profile
Re: Can you play this board better than my sim?
« Reply #3 on: April 04, 2015, 11:51:33 pm »
+1

Pretty sure a deck that uses KC-monument and never greens except on the last turn crushes this mercilessly. Although the deck takes a very long time to build, I think it gets there in time.

Where do you get the +Buy for a megaturn?

You don't need a megaturn.  Every turn you should be getting at least 15 (or so) vps from KC-monument without buying any green
Logged
Man. I had four strips of bacon yesterday. Was one automatically undercooked, one automatically overcooked? No, let's put a stop to that right here, all four strips were excellent.

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Can you play this board better than my sim?
« Reply #4 on: April 05, 2015, 10:30:16 am »
0

Yeah the greening on the last turn bit is misleading. I just mean buying the last province after your opponent has 7.
Logged

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Can you play this board better than my sim?
« Reply #5 on: April 05, 2015, 11:35:02 am »
0

You are right. Here's a bot that doesn't green and beats the bot I posted above 52-45. Presumably if I changed the original bot to expect a long game from the "Don't green" bot the original bot would do better and 45%, maybe even win the majority of games. EDIT: Yes, if I prevent the original bot from greening until the KC and Monuments are out it wins 75-24 though it can no longer beat the built-in Monument bot.

I didn't know how to say, "Buy Monument if it will end the game immediately" so the new bot has a lot of rules that say, "Buy Monument if there's one Monument in the supply and the number of buys needed to win the game is one" for various cards.

I've attached an image showing the display from the simulator ($ and VP per turned for each turn for the two bots).

<player name="Don't green"
 author="Chadeos"
 description="">
 <type name="Province"/>
 <type name="Bot"/>
 <type name="TwoPlayer"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Wishing_Well">
      <condition>
         <left type="countCardsInSupply" attribute="Wishing_Well"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Monument">
      <condition>
         <left type="countCardsInSupply" attribute="Monument"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="King$s_Court"/>
   <buy name="Gold">
      <condition>
         <left type="countCardsInDeck" attribute="King$s_Court"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Monument">
      <condition>
         <left type="countCardsInDeck" attribute="Monument"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="King$s_Court"/>
         <extra_operation type="minus" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Monument">
      <condition>
         <left type="countCardsInDeck" attribute="Monument"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="King$s_Court"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Wishing_Well"/>
</player>
« Last Edit: April 05, 2015, 12:03:56 pm by h1402686 »
Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Can you play this board better than my sim?
« Reply #6 on: April 05, 2015, 11:50:36 am »
+1

That bot still doesn't play very well. It never gets island and should probably never get gold. Further its wishing well guesses probably aren't very good. The title suggests it's possible to play the bot; is this true?
Logged

faust

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
  • Respect: +5161
    • View Profile
Re: Can you play this board better than my sim?
« Reply #7 on: April 05, 2015, 12:24:04 pm »
0

Yeah, I'm pretty sure the optimal strategy here goes something like:

open Wishing Well/Baron
Buy more wishing wells, a Monument, King's Court if applicable.
With lots of draw, buy an Island or two and King's Court them.
Get more Monuments and King's Courts.
If your opponent goes for money, get Pirate ship just to spite him.

The only question remaining is the best timing of Island buys.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

faust

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
  • Respect: +5161
    • View Profile
Re: Can you play this board better than my sim?
« Reply #8 on: April 05, 2015, 12:25:12 pm »
0

Also, never buy Silver or Gold.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Can you play this board better than my sim?
« Reply #9 on: April 05, 2015, 12:28:13 pm »
+1

That bot still doesn't play very well. It never gets island and should probably never get gold. Further its wishing well guesses probably aren't very good. The title suggests it's possible to play the bot; is this true?

No :( I'm afraid I don't know of any way to do that. We can talk about what we might do differently than the only way to get playing results is by writing another bot (but let me just plug for the simulator that it is very easy to use; see http://dominionstrategy.com/2012/07/30/building-the-first-game-engine/).

I agree that the simulator is probably not playing Wishing Well very well. Surprisingly (to me) the bot is getting some value from the wishing aspect; switching to Great Halls makes the bot a lot worse.

And your original claim was absolutely right. A bot that only buys Province/Duchy/Estate if it ends the game immediately, never buys Gold, and buys Islands once the Wishing Wells are out beats my original bot handily. Adding Island to the original bot puts us in territory in which we may not trust the simulator since the game usually ends on piles and none of my bots are programmed to handle those complicated dynamics well.
Logged

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Can you play this board better than my sim?
« Reply #10 on: April 05, 2015, 12:36:56 pm »
0

Yeah, I'm pretty sure the optimal strategy here goes something like:

open Wishing Well/Baron
Buy more wishing wells, a Monument, King's Court if applicable.
With lots of draw, buy an Island or two and King's Court them.
Get more Monuments and King's Courts.
If your opponent goes for money, get Pirate ship just to spite him.

The only question remaining is the best timing of Island buys.
I can't get Baron instead of Silver to work in the simulator, but presumably the simulator doesn't know to wish for whatever is necessary to get Baron and Estate in the same hand.
Logged

2.71828.....

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1290
  • Shuffle iT Username: irrationalE
  • Respect: +1322
    • View Profile
Re: Can you play this board better than my sim?
« Reply #11 on: April 05, 2015, 12:38:16 pm »
+1

This is an example of the engine faust is talking about.

http://www.gokosalvager.com/static/logprettifier.html?20150405/log.515f2508e4b09ee2d2aa5c19.1428251611805.txt

17 turns.  Pile out on KC, monument, and wishing well.

I don't know anything about simulations though.
Logged
Man. I had four strips of bacon yesterday. Was one automatically undercooked, one automatically overcooked? No, let's put a stop to that right here, all four strips were excellent.

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Can you play this board better than my sim?
« Reply #12 on: April 05, 2015, 12:56:27 pm »
0

Baron is indeed nice because (among other things) it means you can potentially grab the last four Provinces (if you KC a Baron) to end the game.

EDIT: and as I result I find myself using Islands to purge Coppers instead of Estates.
« Last Edit: April 05, 2015, 02:00:47 pm by h1402686 »
Logged
Pages: [1]
 

Page created in 0.042 seconds with 21 queries.