Dominion Strategy Forum

Please login or register.

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

Author Topic: [COMPLETED] Simulating challenge - The Ultimate Gardener  (Read 6108 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
[COMPLETED] Simulating challenge - The Ultimate Gardener
« on: May 10, 2012, 11:21:08 am »
0

This challenge runs concurrent with the solo challenge.

Challenge - Are you The Ultimate Gardener? Build a bot that finishes the game in less than 18 turns (average number of turns). You are only allowed to use cards from the base set and you are only allowed to buy Gardens and Estates as VP-cards (no Provinces, no Duchies). The Gardens pile must always be emptied. You are not allowed to use Workshop. The winner is the entry with the highest win rate against the built-in Big Money Ultimate (random start). You can use the Start State tab to define a legal opening ($4/$3 or $5/$2)

One entry (as a personal message) only per person, deadline thursday 17/5.
« Last Edit: May 18, 2012, 05:37:58 am by Geronimoo »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Simulating challenge - The Ultimate Gardener
« Reply #1 on: May 10, 2012, 01:16:08 pm »
0

The original one states something about more than 43 points. Still necessary here, or? Otherwise there's no real reason to buy Gardens.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulating challenge - The Ultimate Gardener
« Reply #2 on: May 10, 2012, 01:34:50 pm »
0

It's not possible to check the average points. I've added that the Gardens pile must be empty.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Simulating challenge - The Ultimate Gardener
« Reply #3 on: May 10, 2012, 01:46:42 pm »
0

Hmm, I have a bot that is (a bit) faster than Workshop/Gardens and scores (a bit) more points on average, but loses 6:94 against BigMoney...
Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulating challenge - The Ultimate Gardener
« Reply #4 on: May 15, 2012, 11:26:20 am »
0

I'm having problems forcing the bot to buy Gardens when it thinks that doing so will cause it to lose, even if it can then buy a ton of Copper afterwards and win. Is there any way to force it to buy a Gardens, even when it thinks it will make it lose?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Simulating challenge - The Ultimate Gardener
« Reply #5 on: May 15, 2012, 11:34:48 am »
0

I'm having problems forcing the bot to buy Gardens when it thinks that doing so will cause it to lose, even if it can then buy a ton of Copper afterwards and win. Is there any way to force it to buy a Gardens, even when it thinks it will make it lose?

Let it buy the Copper with 1 Garden left, it will take the Garden as soon as it's enough for a win.
Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulating challenge - The Ultimate Gardener
« Reply #6 on: May 15, 2012, 12:26:53 pm »
0

I'm having problems forcing the bot to buy Gardens when it thinks that doing so will cause it to lose, even if it can then buy a ton of Copper afterwards and win. Is there any way to force it to buy a Gardens, even when it thinks it will make it lose?

Let it buy the Copper with 1 Garden left, it will take the Garden as soon as it's enough for a win.
Thanks, that helps.

Another problem I'm having is play order of cards. Without giving away too much, I'd like to have it play Militia after Council Room, not before it. Is there any way to force this?
Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulating challenge - The Ultimate Gardener
« Reply #7 on: May 16, 2012, 07:56:13 am »
0

Hmm, I have a bot that is (a bit) faster than Workshop/Gardens and scores (a bit) more points on average, but loses 6:94 against BigMoney...
My problem is the opposite. I'm schooling Big Money by a huge amount, but my average turns per game is around 21. So, I need to figure out how to get it down below 18.
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1422
  • Shuffle iT Username: michaeljb
  • Respect: +2115
    • View Profile
Re: Simulating challenge - The Ultimate Gardener
« Reply #8 on: May 17, 2012, 01:58:39 am »
+1

Submitted! I look forward to seeing what the other submissions look like.

Another problem I'm having is play order of cards. Without giving away too much, I'd like to have it play Militia after Council Room, not before it. Is there any way to force this?

I believe the sim does already prefer to play CR before Militia (and, I believe, plays drawing terminals before non-drawing terminals in general), but from what I've seen it doesn't quite work right with Throne Room. Unfortunately you can't set the play rules for the cards unless you edit the source yourself.
Logged
🚂 Give 18xx games a chance 🚂

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulating challenge - The Ultimate Gardener
« Reply #9 on: May 17, 2012, 06:42:15 am »
0

Submitted! I look forward to seeing what the other submissions look like.

Another problem I'm having is play order of cards. Without giving away too much, I'd like to have it play Militia after Council Room, not before it. Is there any way to force this?

I believe the sim does already prefer to play CR before Militia (and, I believe, plays drawing terminals before non-drawing terminals in general), but from what I've seen it doesn't quite work right with Throne Room. Unfortunately you can't set the play rules for the cards unless you edit the source yourself.
Well, shucks. Thanks for letting me know about the weirdness with Throne Room. I guess I'll try to work around it somehow.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulating challenge - The Ultimate Gardener
« Reply #10 on: May 18, 2012, 05:36:45 am »
+2

Results!

I received far fewer entries for this challenge than I did for the solo challenge. I guess it's a lot less work to fire up isotropic and just play. All entries I received used exactly the same strategy!!! open Festival/Chapel, work towards a Festival/Council Room engine, get a Witch somewhere (which will increase the win rate vs BMU) and also a Militia. The Gardens and Estates (and Curses!) are bought in the final mega turn. Throne Room proves to be the decider!!

Third place goes to Schneau with a win rate of 90.5% (ultimate simulation). He uses the same strategy as the winner, but less fine tuned:
Code: [Select]
<player name="Base Set Gardens - No Workshop"
 author="Schneau"
 description="">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Generated"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="Province"/>
  <start_state>
    <hand contents="2 Copper, 3 Estate"/>
    <discard contents=""/>
    <drawdeck contents="5 Copper" shuffle="true"/>
  </start_state>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="8.0"/>
      </condition>
      <condition>
         <left type="countEmptyPiles"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="8.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Estate"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Estate"/>
         <extra_operation type="multiplyWith" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Chapel">
      <condition>
         <left type="countCardsInDeck" attribute="Chapel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Festival">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Council_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Militia">
      <condition>
         <left type="countCardsInDeck" attribute="Militia"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="8.0"/>
      </condition>
      <condition>
         <left type="countEmptyPiles"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Estate"/>
         <extra_operation type="plus" attribute="8.0" />
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Estate"/>
         <extra_operation type="plus" attribute="32.0" />
      </condition>
   </buy>
   <buy name="Curse">
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Curse"/>
         <extra_operation type="plus" attribute="8.0" />
      </condition>
   </buy>
   <buy name="Festival">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="Throne_Room"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
   </buy>
   <buy name="Council_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="Festival"/>
         <extra_operation type="minus" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Throne_Room"/>
   <buy name="Copper">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Woodcutter"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="8.0"/>
      </condition>
   </buy>
</player>

Second place is for DStu who foregoes the Throne Room and has a win rate of 97.25%.
Code: [Select]
<player name="Garden Stu"
 author="DStu"
 description="2% left">
 <type name="TwoPlayer"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
  <start_state>
    <hand contents="Copper, Copper, Copper, Copper, Copper"/>
    <discard contents=""/>
    <drawdeck contents="Copper, Copper, Estate, Estate, Estate" shuffle="true"/>
  </start_state>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Militia">
      <condition>
         <left type="countCardsInDeck" attribute="Militia"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Estate"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterThan" />
         <right type="countCardsInSupply" attribute="Curse"/>
         <extra_operation type="plus" attribute="7.0" />
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
         <extra_operation type="multiplyWith" attribute="8.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="40.0" />
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInSupply" attribute="Village"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Market"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Curse">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Market">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Market">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Village">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Village">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Council_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Festival"/>
         <extra_operation type="divideBy" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Festival"/>
   <buy name="Chapel" strategy="aggressiveTrashing">
      <condition>
         <left type="countCardsInDeck" attribute="Chapel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInDeck" attribute="Woodcutter"/>
         <extra_operation type="multiplyWith" attribute="2.0" />
      </condition>
   </buy>
</player>

And the winner is michaeljb with a win rate of 97.87% (beating second place by half a percent). Despite Throne Room being played far from optimal it still proves to be a very important card in the strategy.
Code: [Select]
<player name="Ultimate Gardener"
 author="michaeljb"
 description="This megaturn bot buys all the Gardens in an average of just less than 18 turns, using only cards from the Base set (excluding Workshop).XXXXWhile this crushes BMU, the Workshop/Gardens bot crushes this even harder.XXXXCreated for Geronimoo's Simulating Challenge 'The Ultimate Gardener.' (http://forum.dominionstrategy.com/index.php?topic=2528)">
 <type name="TwoPlayer"/>
 <type name="Attacking"/>
 <type name="Bot"/>
 <type name="Fun"/>
 <type name="UserCreated"/>
 <type name="Engine"/>
 <type name="Province"/>
  <start_state>
    <hand contents="5 Copper"/>
    <discard contents=""/>
    <drawdeck contents="2 Copper, 3 Estate" shuffle="true"/>
  </start_state>
   <buy name="Curse">
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Curse"/>
         <extra_operation type="plus" attribute="8.0" />
      </condition>
      <condition>
         <left type="countEmptyPiles"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Gardens"/>
         <extra_operation type="multiplyWith" attribute="4.0" />
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInSupply" attribute="Gardens"/>
      </condition>
      <condition>
         <left type="countEmptyPiles"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Chapel" strategy="aggressiveTrashing">
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Chapel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Festival">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="Copper"/>
         <extra_operation type="plus" attribute="4.0" />
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Militia">
      <condition>
         <left type="countCardsInDeck" attribute="Militia"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Festival">
      <condition>
         <left type="countCardsInDeck" attribute="Estate"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Copper"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countAllCardsInDeck"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="Council_Room"/>
         <extra_operation type="multiplyWith" attribute="6.0" />
      </condition>
   </buy>
   <buy name="Throne_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Estate"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Copper"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countAllCardsInDeck"/>
         <operator type="smallerOrEqualThan" />
         <right type="countCardsInDeck" attribute="Council_Room"/>
         <extra_operation type="multiplyWith" attribute="6.0" />
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Throne_Room"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Council_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Festival"/>
         <extra_operation type="minus" attribute="2.0" />
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Festival"/>
   <buy name="Throne_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Throne_Room"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Market"/>
         <extra_operation type="plus" attribute="2.0" />
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Throne_Room"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Market">
      <condition>
         <left type="countCardsInSupply" attribute="Market"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Throne_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="countCardsInDeck" attribute="Throne_Room"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Throne_Room"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInSupply" attribute="Woodcutter"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
</player>
« Last Edit: May 18, 2012, 05:38:52 am by Geronimoo »
Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: [COMPLETED] Simulating challenge - The Ultimate Gardener
« Reply #11 on: May 18, 2012, 07:37:12 am »
0

Good job! I should probably be disqualified though, since my bot averages well above 18 turns to finish the game :(
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1422
  • Shuffle iT Username: michaeljb
  • Respect: +2115
    • View Profile
Re: [COMPLETED] Simulating challenge - The Ultimate Gardener
« Reply #12 on: May 18, 2012, 02:28:30 pm »
0

When I got the basic bot built (my 'first draft' if you will), I was at about 20 turns average I think. It took some work getting it down to under 18! For a while I had taken Militia out, and that sped it up without hurting the win rate too much. Another big jump was when I thought to add in the Curse buy rule--that one surprised me quite a bit.

Initially I only had one Festival rule--the 'vanilla' rule with no conditions that's still in there. The Festival rule that's on top offered another boost--before, I was grabbing my Witch too soon I think. After that it was mostly looking at sample logs a lot, then tweaking the Festival/Council Room/Throne Room rules. The rules for Festival and TR right before Council Room (which includes the check for Coppers and Estates being cleared out) were a little whacky, but definitely had a noticeable effect. Making sure Throne Rooms didn't empty also proved to be very important--I also added, as a failsafe, checks to make sure Markets and Woodcutters wouldn't empty (though in practice that was almost never going to happen, but it felt better to have the rules to be certain).

By then I was down to about 17.8 or so turn average, and decided to throw Militia back in, and found I was still pretty close, around 18.2-18.3. It also added about .6% to my win percentage. I don't think I added any other of the big rules here, but it was a lot more tweaking the details.

I thought I had it, but a quick sim was sometimes showing an average of more than 18 turns. So I ran the ultimate sim 5 or 6 times, and each time the average number of turns was just under 17.99.

As Geronimoo mentioned, Throne Room isn't played quite right; normally, CR is played before Militia, but a Throned Militia is played before CR. More frustrating, in the early game Chapel would get Throned. So sometimes a hand of Festival, Throne Room, Chapel, Copper x2, would play Festival, Throne the Chapel, then only trash 1 Copper so it could still buy a Woodcutter. I think in one log (don't still have it) it even Throned Chapel over Festival, but ended up trashing 0 Coppers.


I have to say I really had a lot of fun with this! Much thanks to Geronimoo for putting up this puzzle and of course writing the awesome simulator. I also have to say I found it pretty funny that my "Ultimate Gardener" wins less than 1% of games against Workshop/Gardens :D .
Logged
🚂 Give 18xx games a chance 🚂

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: [COMPLETED] Simulating challenge - The Ultimate Gardener
« Reply #13 on: May 21, 2012, 03:23:52 am »
+1

gg to michaeljb. Clearly the better bot has won, while I only loses 0.5% in this competition, heads up the result is much clearer.

Otherwise, exactly what he says. Except for the part with the TR.

It was quite funny to tweak the bot against these quite artificial constraints. I mean it's clear where the 18 turns come from, but they are neither important against BM (you can proabably get higher winchances in more turns), nor against WS/Gardens (you lose against it anyway). But they gave you another dimension you have to take care of, instead of just optimizing the winchance.
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1422
  • Shuffle iT Username: michaeljb
  • Respect: +2115
    • View Profile
Re: [COMPLETED] Simulating challenge - The Ultimate Gardener
« Reply #14 on: May 21, 2012, 10:41:40 pm »
0

Thanks, though your bot as Geronimoo posted isn't really set up at all for heads up play--looking too much at having 10 Festivals in the deck, rather than 0 Festivals in the supply. I just went through your bot, and changed those rule checks, as well as a couple checking for 7 or more Gardens in your deck--I made those check for 1 or fewer Gardens in the supply...and looks like your modified bot comes out on top around 65-17.

Code: [Select]
<player name="Garden Stu"
 author="DStu"
 description="2% leftXXXXXXXXmodified by michaeljb, replacaing references to having all the festivals to the festivals being empty, and so on; this allows for heads-up play">
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="UserCreated"/>
  <start_state>
    <hand contents="Copper, Copper, Copper, Copper, Copper"/>
    <discard contents=""/>
    <drawdeck contents="Copper, Copper, Estate, Estate, Estate" shuffle="true"/>
  </start_state>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Militia">
      <condition>
         <left type="countCardsInDeck" attribute="Militia"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Estate"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInSupply" attribute="Festival"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterThan" />
         <right type="countCardsInSupply" attribute="Curse"/>
         <extra_operation type="plus" attribute="7.0" />
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
         <extra_operation type="multiplyWith" attribute="8.0" />
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="40.0" />
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInSupply" attribute="Village"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Market"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countBuysLeft"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Gardens">
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Curse">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Market">
      <condition>
         <left type="countCardsInSupply" attribute="Festival"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Market">
      <condition>
         <left type="countCardsInSupply" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Village">
      <condition>
         <left type="countCardsInSupply" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Village">
      <condition>
         <left type="countCardsInSupply" attribute="Festival"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gardens"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Gardens"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Council_Room">
      <condition>
         <left type="countCardsInDeck" attribute="Council_Room"/>
         <operator type="smallerThan" />
         <right type="countCardsInDeck" attribute="Festival"/>
         <extra_operation type="divideBy" attribute="2.0" />
      </condition>
   </buy>
   <buy name="Festival"/>
   <buy name="Chapel" strategy="aggressiveTrashing">
      <condition>
         <left type="countCardsInDeck" attribute="Chapel"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Festival"/>
         <operator type="greaterOrEqualThan" />
         <right type="countCardsInDeck" attribute="Woodcutter"/>
         <extra_operation type="multiplyWith" attribute="2.0" />
      </condition>
   </buy>
</player>

pseudo-edit (just discovered this after writing up the rest of the post):
Looks like my bot vs my modified version of yours actually results in 3-pile endings where mine tends to have Curses still in the deck...they usually don't get to buying the Gardens haha  ;D

Maybe later I'll add more conditions to yours to make sure it also doesn't empty piles...messing around with simulation stuff is fun. Got any more cool challenges, Geronimoo?
Logged
🚂 Give 18xx games a chance 🚂
Pages: [1]
 

Page created in 0.253 seconds with 21 queries.