Dominion Strategy Forum

Please login or register.

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

Author Topic: Why does my Apprentice strategy suck?  (Read 4448 times)

0 Members and 1 Guest are viewing this topic.

Graystripe77

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • 1.61803398874989...
  • Respect: +94
    • View Profile
    • Dreamkeeperscomic.com
Why does my Apprentice strategy suck?
« on: November 20, 2012, 11:55:17 am »
0

Code: [Select]
<player name="Apprentice"
 author="Graystripe77"
 description="Trashing is fun. Apprentice is probably the best trasher in the game, after Chapel.">
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
 <type name="Province"/>
   <buy name="Province">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Apprentice"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <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">
      <condition>
         <left type="countCardsInDeck" attribute="Apprentice"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Apprentice"/>
   <buy name="Silver"/>
</player>

For some reason, this is CRUSHED by the BMU bot. Help?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #1 on: November 20, 2012, 12:15:06 pm »
0

Quote
When played:

    First, the cards in hand are sorted according to their trash priority number, highest in first place
    Then, it will run through the cards until it finds a card that will result in drawing at least 1 card
    If it didn’t find a card, then it will just trash the first card in hand (eg Curse, but might also be Colony after a chain of actions)
So I guess what happens is that it cleans out the Estates, and afterwards (or already earlier) starts trashing Silvers. Apprentice-Silver nets +1card, so gives the benefit of a Lab, while trashing a Silver. Does not sound like a good plan.
Even if it trashes Apprentice with hight priority (can not find that at the moment), it nevertheless has high probability of trashing Silvers.
Logged

Squidd

  • Golem
  • ****
  • Offline Offline
  • Posts: 188
  • Respect: +604
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #2 on: November 20, 2012, 12:16:23 pm »
0

BM-Apprentice doesn't seem very viable to me -- I agree that Apprentice is a great card, but it's best if you're willing to trash expensive things and then have something worth doing with that huge hand full of cards. This approach falls short on both counts.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #3 on: November 20, 2012, 12:36:44 pm »
+1

BM-Apprentice doesn't seem very viable to me -- I agree that Apprentice is a great card, but it's best if you're willing to trash expensive things and then have something worth doing with that huge hand full of cards. This approach falls short on both counts.

Also this.


I got Apprentice to ~35% in Dominiate with this
Code: [Select]
# Play Big Money including Banks, except buy Wharf with every $5 buy.
{
  name: 'Apprentice'
  author: 'Graystripe77'
  requires: ['Apprentice']
  gainPriority: (state, my) -> [
    "Province"
    "Duchy" if state.gainsToEndGame() <= 4
    "Estate" if state.gainsToEndGame() <= 2
    "Gold"
    "Apprentice"
    "Silver"
  ]
 
  apprenticeTrashPriority: (state, my) -> [
      "Estate" if state.gainsToEndGame() > 3
      "Estate" if my.getTreasureInHand() == 7
      "Apprentice"
      "Silver" if my.getTreasureInHand() == 7
      "Gold" if my.countInDeck("Gold") > 2 && my.getTreasureInHand() < 8
      "Copper" if my.getTreasureInHand == 9
      "Copper" if my.getTreasureInHand() == 7
    ]
 
  actionPriority: (state, my) -> [
      "Apprentice" if my.countInHand("Estate") > 0 & state.gainToEndGame() >= 3
      "Apprentice" if my.getTreasureInHand() < 8 & my.countInHand("Estate") > 0
      "Apprentice" if my.getTreasureInHand() < 8 & my.countInHand("Apprentice") > 1
      "Apprentice" if my.getTreasureInHand() == 4 & my.countInHand("Copper") > 0
      "Apprentice" if my.getTreasureInHand() == 7 & my.countInHand("Copper") > 0
      "Apprentice" if my.getTreasureInHand() > 8 & my.countInHand("Copper") > 0
    ]
}
If someone has more fun in finetuning, go for it. But better is to think of some payload for the engine
« Last Edit: November 20, 2012, 12:41:38 pm by DStu »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #4 on: November 20, 2012, 01:40:00 pm »
+3

Trashing is very difficult for AI. The Goko bots don't do it particularly well and Geronimoo's simulator has some problems too. With an apprentice in a big money deck you will typically trash out the estates but then get choices of gold/apprentice/silver/copper to trash, difficult choices based on the quality of the rest of the deck and the progress through the game. The AI does not attempt to evaluate that and just evaluates the cards in hand, typically resulting in the trashing of a silver for +3 cards. Without an extra buy or apprentices trashing apprentices, the apprentice will be quite poor in big money anyway.

If you think that trashing is difficult AI, playing a warehouse with a bishop (say) in hand creates some intensely difficult AI decisions.
Logged

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #5 on: November 22, 2012, 04:41:50 am »
+1

I got Apprentice to ~35% in Dominiate with this
Code: [Select]
# Play Big Money including Banks, except buy Wharf with every $5 buy.
{
  name: 'Apprentice'
  author: 'Graystripe77'
  requires: ['Apprentice']
  gainPriority: (state, my) -> [
    "Province"
    "Duchy" if state.gainsToEndGame() <= 4
    "Estate" if state.gainsToEndGame() <= 2
    "Gold"
    "Apprentice"
    "Silver"
  ]
 
  apprenticeTrashPriority: (state, my) -> [
      "Estate" if state.gainsToEndGame() > 3
      "Estate" if my.getTreasureInHand() == 7
      "Apprentice"
      "Silver" if my.getTreasureInHand() == 7
      "Gold" if my.countInDeck("Gold") > 2 && my.getTreasureInHand() < 8
      "Copper" if my.getTreasureInHand == 9
      "Copper" if my.getTreasureInHand() == 7
    ]
 
  actionPriority: (state, my) -> [
      "Apprentice" if my.countInHand("Estate") > 0 & state.gainToEndGame() >= 3
      "Apprentice" if my.getTreasureInHand() < 8 & my.countInHand("Estate") > 0
      "Apprentice" if my.getTreasureInHand() < 8 & my.countInHand("Apprentice") > 1
      "Apprentice" if my.getTreasureInHand() == 4 & my.countInHand("Copper") > 0
      "Apprentice" if my.getTreasureInHand() == 7 & my.countInHand("Copper") > 0
      "Apprentice" if my.getTreasureInHand() > 8 & my.countInHand("Copper") > 0
    ]
}
If someone has more fun in finetuning, go for it. But better is to think of some payload for the engine

I suspect you want to include Copper in the trash priority in the same situations that you add Apprentice to the action priority. You also have a couple of typos: `"Copper" if my.getTreasureInHand == 9` is missing parentheses, and `"Apprentice" if my.countInHand("Estate") > 0 & state.gainToEndGame() >= 3` has "gainToEndGame" instead of "gainsToEndGame".
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #6 on: November 22, 2012, 04:51:59 am »
0

Thanks.  I redid this thedaybeforeyesterday, with some more rules and hopefully less errors, but didn't exceed 40%.

But this of course is the disadvantage of writing the code itself and an interpreted and really loosely typed language.  Nobody (except on f.ds) complains about the mistakes you make..
Logged

Qvist

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2400
  • Shuffle iT Username: Qvist
  • Respect: +4085
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #7 on: November 22, 2012, 06:30:13 am »
0

Apprentice + Big Money isn't that good. Apprentice shines if you can trash a Gold and buy/gain a Province and a Gold each turn.
That especially good with Haggler or something like Tunnel/Warehouse and I suspect Market Square is good too. Or if you can trash Border Villages instead of Gold.
But otherwise you run out of fuel way too fast.

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #8 on: November 22, 2012, 09:06:58 am »
0

Or if you can gain the Apprentices from, say, University :)
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3412
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #9 on: November 22, 2012, 09:34:45 am »
0

Apprentice + Big Money isn't that good. Apprentice shines if you can trash a Gold and buy/gain a Province and a Gold each turn.
That especially good with Haggler or something like Tunnel/Warehouse and I suspect Market Square is good too. Or if you can trash Border Villages instead of Gold.
But otherwise you run out of fuel way too fast.
BV + Apprentice is especially fun, because everytime you gain a BV, you can get an Apprentice for free!
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

Graystripe77

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • 1.61803398874989...
  • Respect: +94
    • View Profile
    • Dreamkeeperscomic.com
Re: Why does my Apprentice strategy suck?
« Reply #10 on: November 23, 2012, 07:54:06 pm »
0

#1 Graystripe77: 30 points (5 Provinces); 12 turns
              opening: Silver / Silver
              [16 cards] 2 Apprentices, 5 Coppers, 4 Silvers, 5 Provinces

Maybe that was lucky, but hey.
Logged

h1402686

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +32
    • View Profile
Re: Why does my Apprentice strategy suck?
« Reply #11 on: December 02, 2012, 10:06:58 am »
0

Annotated game 2 features a player who gets to 4 colonies in 15 turns with Apprentice, and then is able to trash and replace a Colony each turn and so run out the Colony pile on turn 18. Perhaps the big hands you can build with Apprentice are more valuable in Colony games.
Logged
Pages: [1]
 

Page created in 0.088 seconds with 20 queries.