Dominion Strategy Forum

Please login or register.

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

Author Topic: [COMPLETE] Simulation Challenge - Huge Hands  (Read 3310 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
[COMPLETE] Simulation Challenge - Huge Hands
« on: January 30, 2013, 04:43:02 pm »
+1

I recently played this game where I went for a simple TM/Chapel into greening while my opponent decided for something more adventurous with Universities, Council Rooms and Treasure Maps and it paid off very nicely. I immediately thought this would be a fun and not too complicated engine to simulate.

Your goal: build a bot that plays the engine. Highest win rate vs the built in Big Money Ultimate wins the challenge.

The simulator will make tactical errors, but don't worry about them.

PM me the bot by February 6th.
« Last Edit: February 09, 2013, 09:18:56 am by Geronimoo »
Logged

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1708
  • Respect: +1788
    • View Profile
Re: Simulation Challenge - Huge Hands
« Reply #1 on: February 07, 2013, 03:24:05 pm »
0

So did any one else enter, or does my bad bot win by default?  8)
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: [COMPLETE] Simulation Challenge - Huge Hands
« Reply #2 on: February 09, 2013, 09:19:54 am »
+2

So did any one else enter, or does my bad bot win by default?  8)

You were the only contestant. Here's what you wrote:
Here is my submission for your simulation challenge. I am getting a 76% win rate against Big Money Ultimate.

At its core it's a very simple engine. It opens Potion/Chapel and looks to buy Universities, Worker's Villages, and Council Rooms. It purchases/gains Council Rooms and Villages such that the number of villages is at least 2 more than the number of Council Rooms at all times. The goal is to be able to draw the whole deck, University Treasure Maps and trigger 2 Treasure Map connections giving possibly 3 Provinces that turn. Only after connecting Treasure Maps does the engine green. For the end game, I was careful to code in a penultimate province rule for cases where a player has between $8 and $13 to spend.

A human can do better than this bot playing this strategy for three reasons:
1) A human would not play Council Room when there is nothing left to draw.
2) A human would do a better job with Chapel. My hope was to Chapel down to $2P, but aggressive trashing prevents Chapeling away the last two Coppers keeping the money at $4P. Buying the Silver allows the bot to trash down to CCSP rather than keeping CCCCP, and that is the only purpose of the Silver buy. The results when the bot does not have the silver buy rule are disastrous, which leads me to believe correct Chapel play is key here.
3) A human would better implement a few nuances of the PPR, especially taking into consideration whether he is first or second player. This is a second order effect on win rate compared to the first two points, though.

Thanks for setting this one up! It gave me a chance to really understand your simulator!

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<playerCollection>
<player name="SC_Huge_Hands_Polk5440"
 author="Polk5440"
 description="Plays the engine. Opens Potion and Chapel always. Goes for drawing whole deck using Universities, Worker's Villages and Council Rooms then gaining 4 Treasure Maps via University to convert into a multiple Province turn. A PPR applies.">
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="8.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="9.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="4.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="5.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="11.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="5.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="12.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="6.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="13.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Estate"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="6.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
   </buy>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <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>
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.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="Chapel" strategy="aggressiveTrashing">
      <condition>
         <left type="countCardsInDeck" attribute="Chapel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="University">
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Treasure_Map">
      <condition>
         <left type="isActionPhase"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="University"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Treasure_Map"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Treasure_Map">
      <condition>
         <left type="isActionPhase"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="University"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Treasure_Map"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="6.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="Worker$s_Village">
      <condition>
         <left type="countCardTypeInDeck" attribute="Village"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Council_Room"/>
         <extra_operation type="plus" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Council_Room"/>
   <buy name="Worker$s_Village"/>
</player>

</playerCollection>
Logged

Avalanchian

  • Spy
  • ****
  • Offline Offline
  • Posts: 82
  • Respect: +73
    • View Profile
Re: [COMPLETE] Simulation Challenge - Huge Hands
« Reply #3 on: February 09, 2013, 09:23:32 am »
+1

Congrats Polk. You really beat out the competition on this one ^^
Logged
"Edge case challenges are the Rube Goldberg machines of Dominion" - Michaeljb

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1708
  • Respect: +1788
    • View Profile
Re: [COMPLETE] Simulation Challenge - Huge Hands
« Reply #4 on: February 09, 2013, 09:55:42 am »
0

Yes! Victory!  ;D

Too bad no one else wanted to give it a try, though.
Logged

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1708
  • Respect: +1788
    • View Profile
Re: [COMPLETE] Simulation Challenge - Huge Hands
« Reply #5 on: February 09, 2013, 10:02:15 am »
0

The sad thing is that I almost lost because my first attempt didn't beat Big Money Ultimate.  :-[
Logged

Avalanchian

  • Spy
  • ****
  • Offline Offline
  • Posts: 82
  • Respect: +73
    • View Profile
Re: [COMPLETE] Simulation Challenge - Huge Hands
« Reply #6 on: February 09, 2013, 10:06:54 am »
0

The sad thing is that I almost lost because my first attempt didn't beat Big Money Ultimate.  :-[

Well we're all allowed rough drafts right?

I'd love to do this sort of thing more but:

1. I don't have any real coding experience and,
2. When I tried to use the simulator, it kept bugging out when I tried to add buy rules. Eventually it would limit how many I could add and then, after removing some, wouldn't let me add any more, causing me to start over or abandon it. =/

Looks fun though ^^
Logged
"Edge case challenges are the Rube Goldberg machines of Dominion" - Michaeljb
Pages: [1]
 

Page created in 1.008 seconds with 20 queries.