Dominion Strategy Forum

Dominion => Simulation => Topic started by: WanderingWinder on September 12, 2011, 02:43:02 pm

Title: Project: Optimizing Big Money X
Post by: WanderingWinder on September 12, 2011, 02:43:02 pm
Not sure if this is the best place to put this, but...
Very, very often people will post some sophisticated, complicated strategy on one of the boards, and it will include, some card X as one of its components. They'll post a bot as evidence of how good their strategy is, and they'll say how well it beats some other strategy. Very often this second strategy is either a) not optimized (sometimes not even close) for what it does, or b)totally ignores the simple strategy of Big Money+X (BMX), which will beat that strategy. Now, I don't mean to blame these people, as this is very easy to do, but I would like to 'fix the problem'. One of the big pieces in doing that is this project. What I would like to do is, for every card X that the simulator plays halfway well (so no remodel, etc.) and that will actually improve on straight-up big money just by themselves (so no throne room/king's court), to find the best bot for Big Money plus that card alone, and then post them all alone.
I've been slowly building up this project for a while now, and I was going to wait until I finished, but circumstances have suggested to me that I should just open up what I have now. I'm going to start posting what I have now - I've been going alphabetically through, and I am through Jester (which doesn't really sim well), along with having a couple others from out of order. I would like you guys to post improvements you have on any of the bots, so that I can assure that everybody has the optimal strategy for each BMX config. Most of my work came before # of cards was a parameter on Geronimoo's bot, so there may be a pretty good room for improvement in several of the bots I have.
I'll be posting the bots for every card as I can, updating them into the next post down, starting with the optimization of big money itself.

As a couple of notes, I'd like to have the potion-cost cards with only the basics plus potion, and I'd eventually like to have a second set of strategies for games with colonies (in the third post), but this is not my personal priority at this point. You guys feel free to start posting them though.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 12, 2011, 02:43:26 pm
Big Money:
Code: [Select]
<player name="Big Money">
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="6.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Adventurer (Wins ~47-44 over BM):
Bazaar (~51-40)
Bridge (~57-37)
Bureaucrat (~60-32)
Caravan (~49-42)
Chancellor (~52-40)
Coppersmith loses to BM
Council Room(~69-25)
Counting House loses ever-so-slightly
Courtyard (~72-20)
Cutpurse (~66-26)
Envoy (~72-21)
Explorer (~65-27) (I suspect I'm decently far from optimal here, could probably squeeze another 2-3 %)
Festival (~52-41)
Fortune Teller(~65-28)
Ghost Ship (~94-4)
Goons (~88-11)
Grand Market (~49-43)
Great Hall (~50-43)
Harem (~61-34)
Harvest (~59-32)
Haven (~48-43)
Herbalist (~48-43)
Hoard (~60-33)
Horse Traders (~46-46, wins by about half a percent)
Hunting Party (~58-33)
Ironworks slightly loses, probably 'cause I don't know how to optimize it to the sim's play rules
Island (~71-25)
Jester (~71-24)
Masquerade (~75-21)
Monument (~81-16)
Rabble (~74-19)
Wharf (~83-13)

Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 12, 2011, 02:43:48 pm
Big Money Colony:
Code: [Select]
<player name="BM Col">
   <buy name="Colony">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Platinum"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Title: Re: Project: Optimizing Big Money X
Post by: tko on September 12, 2011, 03:30:16 pm
Here's my attempt at Big Money Monument:
Code: [Select]
<player name="Big Money Monument">
   <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="Monument">
      <condition>
         <left type="countCardsInDeck" attribute="Monument"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: popsofctown on September 12, 2011, 03:39:18 pm
bots? interesting stuff.

Is the syntax intuitive enough that I could copypasta one?
Title: Re: Project: Optimizing Big Money X
Post by: rrenaud on September 12, 2011, 03:40:11 pm
1.  omg please put this in a 'strategy database' rather than (or in addition to) a bunch of forum posts.  Though I guess these will eventually just get merged into Geronimoo's simulator itself.
2.  actually put numbers in the posts against some reasonable baseline.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 12, 2011, 04:07:08 pm
1.  omg please put this in a 'strategy database' rather than (or in addition to) a bunch of forum posts.  Though I guess these will eventually just get merged into Geronimoo's simulator itself.
2.  actually put numbers in the posts against some reasonable baseline.
1. I've never been good with databases. If somebody shows me how to do this, I gladly will.
2. 'some reasonable baseline' would probably be straight big money, I'm guessing. I can approximately do this, I guess, though I'm not sure how useful it would be.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 12, 2011, 04:13:09 pm
As a note, most of these strategies can probably be improved by appending a total money in deck condition to the province buy rather than the having-at-least-a-gold condition they currently have.
Title: Re: Project: Optimizing Big Money X
Post by: Kirian on September 12, 2011, 04:50:48 pm
Not sure if this is the best place to put this, but...

Just a quick aside:  Do we need a "Simulating" forum?  Rob, theory?
Title: Re: Project: Optimizing Big Money X
Post by: AdamH on September 13, 2011, 02:01:00 pm
I've done a little work like this on a couple of cards from the base set. What metric are you using here? In doing my simulations I'm often faced with the question of "what situation should I test my new strategy against?"

I have a few choices:
1. 2-player game: my strategy vs. BMU
2. 1-player game: how many turns does it take to buy 4 provinces (disregarding smaller green cards)?
3. 1-player game: how many turns does it take to buy 4 provinces, somehow taking into account smaller green card purchases?
4. 2-player game: my strategy vs. the best strategy I've come up with so far
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 13, 2011, 02:09:30 pm
I've done a little work like this on a couple of cards from the base set. What metric are you using here? In doing my simulations I'm often faced with the question of "what situation should I test my new strategy against?"

I have a few choices:
1. 2-player game: my strategy vs. BMU
2. 1-player game: how many turns does it take to buy 4 provinces (disregarding smaller green cards)?
3. 1-player game: how many turns does it take to buy 4 provinces, somehow taking into account smaller green card purchases?
4. 2-player game: my strategy vs. the best strategy I've come up with so far
4, limited to only using that card and the basics (copper, curse, estate, silver, gold, duchy, province, possibly potion, colony, platinum)
Title: Re: Project: Optimizing Big Money X
Post by: rspeer on September 13, 2011, 06:22:05 pm
Just a quick aside:  Do we need a "Simulating" forum?  Rob, theory?

I think we do. We already seem to be taking over every thread in here.
Title: Re: Project: Optimizing Big Money X
Post by: theory on September 13, 2011, 06:48:28 pm
I think I moved most of the ones I spotted.  PM me if there's any more I should move over.
Title: Re: Project: Optimizing Big Money X
Post by: rspeer on September 13, 2011, 07:19:42 pm
Big Money Colony:
Code: [Select]
<player name="BM Col">
   <buy name="Colony">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Platinum"/>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Colony"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>


These are really useful and I'm working on adding their equivalents to Dominiate.

I notice that by merging my existing Big Money strategy in Dominiate with WanderingWinder's Big Money Colony, I can make a strategy that actually beats it 51.4%-48.6%, and would probably have more of a difference against other strategies. The difference is it takes into account how close the end of the game is, regardless of whether it's ending on Colonies, on Provinces, or on three piles.

I don't know how if there's a good way to express this in Geronimoo's syntax, but I think there is a way -- it might have to be a conjunction of properties such as "empty piles in supply" and "cards in smallest supply pile" with the number of Provinces and Colonies remaining. In my syntax it looks like this:

Code: [Select]
{
  name: 'Big Money'
  gainPriority: (state) -> [
        "Colony" if state.current.getTotalMoney() > 32
        "Province" if state.gainsToEndGame() <= 6
        "Duchy" if state.gainsToEndGame() <= 5
        "Estate" if state.gainsToEndGame() <= 2
        "Platinum"
        "Province" if state.gainsToEndGame() <= 7
        "Gold"
        "Duchy" if state.gainsToEndGame() <= 6
        "Silver"
        "Copper" if state.gainsToEndGame() <= 2
      ]
}

Title: Re: Project: Optimizing Big Money X
Post by: rspeer on September 14, 2011, 05:49:36 am
WanderingWinder and tko's strategies are now up on Dominiate, and the new Big Money on there is the merged one I described: http://rspeer.github.com/dominiate/play.html

I may have gotten Bridge wrong. What does this do?

Code: [Select]
   <buy name="Bridge">
      <condition>
         <left type="countCardsInDeck" attribute="Bridge"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
         <extra_operation type="divideBy" attribute="8.0" />
      </condition>
   </buy>
Title: Re: Project: Optimizing Big Money X
Post by: Davio on September 14, 2011, 05:54:13 am
Buys 1 Bridge.
Title: Re: Project: Optimizing Big Money X
Post by: Thisisnotasmile on September 14, 2011, 07:18:07 am
Buys 1 Bridge.

... If the current number of Bridges in your deck is 0/8 (a.k.a. 0).
Title: Re: Project: Optimizing Big Money X
Post by: popsofctown on September 14, 2011, 11:58:45 am
isn't that optimal for big money though?
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 14, 2011, 12:41:57 pm
Buys 1 Bridge.

... If the current number of Bridges in your deck is 0/8 (a.k.a. 0).
Yup. The 8 is there from when I was playing around with some other parameters in my attempts at optimization.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 14, 2011, 01:01:39 pm
...And I've already run out of space in post 2. Is there anyone who can suggest to me a more compressed way of getting the data up... somewhere?
Title: Re: Project: Optimizing Big Money X
Post by: rrenaud on September 14, 2011, 01:08:44 pm
I'd suggest a google docs spreadsheet, but it will be hard to view the strategies themselves.  I really think this would be something that you could do very well with a 50 line google app engine program of php script.  That is, if you can't find an existing tool that you let you show a 20 line body of text with an associated owner, card, and marginal advantage over baseline.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 14, 2011, 01:10:50 pm
I just realized that I should be able to attach the file that holds all my players in it to a post, and then people can just download that. Very compressed indeed, but I don't have the time to prune my file down to the BM+X at the moment, so I'll try to do that probably sometime this evening.

Edit: at which point I'll pare the second post down to just having the straight-up BM bot and then the win percentages of the various cards I've optimized against BM.
Title: Re: Project: Optimizing Big Money X
Post by: Geronimoo on September 14, 2011, 01:20:18 pm
Just send the file to me and I'll put them in the simulator replacing the computer generated _Cardname strategies.
Title: Re: Project: Optimizing Big Money X
Post by: rspeer on September 15, 2011, 05:01:49 am
Here's Optimized BM + Nobles, which beats my Big Money 70-30 and seems to play dead even against BM + Smithy.

Code: [Select]
{
  name: 'BigNobles'
  gainPriority: (state, my) -> [
    "Province" 
    "Duchy" if state.gainsToEndGame() <= 4
    "Estate" if state.gainsToEndGame() <= 2
    "Nobles" if my.countInDeck("Nobles") < 1
    "Nobles" if state.gainsToEndGame() <= 6
    "Gold"
    "Silver"
    "Copper" if state.gainsToEndGame() <= 2
  ]
}
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on September 15, 2011, 11:13:49 am
The monument bot I had beats tko's consistently by about 1%. I've updated the second post to attach a file with all my single card players in it, and I've also given a copy to Geronimoo directly. Let me know if you guys can beat anything I have (probably yes).
I'm going to try to parse rspeer's code into Geronimoo's sim and then see if I can beat it, when I get the chance.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on September 15, 2011, 08:31:33 pm
I don't know if this counts, because it doesn't *always* buy a coppersmith, but it edges out big money since coppersmith/nothing beats silver/nothing on a 5/2.

Code: [Select]
<player name="5/2 Coppersmith">
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="6.0"/>
      </condition>
   </buy>
   <buy name="Coppersmith">
      <condition>
         <left type="countAllCardsInDeck"/>
         <operator type="equalTo" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: rspeer on September 20, 2011, 06:21:45 pm
I think the 5/2 Coppersmith definitely counts for OBM Coppersmith, particularly because anything else would presumably do worse and therefore be non-optimal. I've added it to Dominiate.

While we're on unpopular cards, here's my OBM Chancellor. I've included the rule of when to use the Chancellor to reshuffle, and also made it the default Chancellor rule, so that a bot that uses Chancellor well doesn't actually have to have this card-counting code in it.

Code: [Select]
{
  name: 'BM+Chancellor2'
  author: 'rspeer'
  gainPriority: (state, my) -> [
    "Province" if my.getTotalMoney() > 18 \
               or state.gainsToEndGame() <= 7
    "Duchy" if state.gainsToEndGame() <= 4
    "Estate" if state.gainsToEndGame() <= 2
    "Gold"
    "Duchy" if state.gainsToEndGame() <= 7
    "Chancellor" if my.countInDeck("Chancellor") < 1
    "Silver"
  ]

  # Here, we decide to reshuffle (returning a reshuffleValue over 0) when most
  # of the non-Action, non-Treasure cards are in the draw pile, or when there
  # are no such cards in the deck.
  reshuffleValue: (state, choice, my) ->
    junkToDraw = 0
    totalJunk = 0
    for card in my.draw
      if not (card.isAction or card.isTreasure)
        junkToDraw++
    for card in my.getDeck()
      if not (card.isAction or card.isTreasure)
        totalJunk++
    return 1 if (totalJunk == 0)
    proportion = junkToDraw/totalJunk
    return (proportion - 0.5)
}

I implemented a version that borrows Geronimoo's simulator's rule, which is to always reshuffle: reshuffleValue: (state, choice, my) -> 1. OBM Chancellor unsuprisingly beats it 51.8 - 49.2%. Of course, as this simulation is taking place inside Dominiate, where things like the anti-suicide rule don't exist yet, the Straw Man Anti-Defamation League has lodged a complaint against my research methods.

EDITED: Buying Duchies for 5 as soon as the Province race begins (gainsToEndGame <= 7) turns out to work for OBM Chancellor, as it can often skip them.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on October 01, 2011, 02:05:16 am
So I finally took the time to download the .xml and look at some of the bots... A few things I noticed:

Herbalist bot buys havens. Either this is a typo, or that needs to be redone.

Island bot has a strange condition:
Code: [Select]
   <buy name="Island">
      <condition>
         <left type="countCardsInDeck" attribute="Island"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Victory"/>
         <extra_operation type="multiplyWith" attribute="2.0" />
      </condition>
   </buy>
I would think this amounts to simply buying island unconditionally. This is probably the best strategy when racing for islands, but if you're just trying to beat big money more often, you can do better by buying islands slower. e.g. if you make it divideBy 2, it improves to 75-22 vs BM.

And explorer can definitely be improved (slightly) by adding a province buy condition:
Code: [Select]
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Explorer"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
so that it starts buying provinces when you have a gold OR explorer.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on October 01, 2011, 10:03:18 am
Typos, yes. It was supposed to be divide, and herbalist buying havens... well, I apparently wasn't so thorough; I use one bot as the basis for another and change the card names. Must have missed some. Glad you're catching me!
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on October 03, 2011, 07:26:39 pm
This courtyard bot crushes the posted one and beats big money ~83-13. The basic idea is just that a second courtyard should be preferred to silver once you have a couple silvers.

Code: [Select]
<player name="Courtyard">
   <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="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="8.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
</player>

Venture is a bit hard to optimize since you can't really use complicated expressions, and the value of a venture depends both on the number of ventures and the value of non-venture treasures. (The expected value of a venture is something like 1+(N-1)/(N-V-1)+(T-V)/(N-V), where N = # treasures, T = total $, V = # ventures, so presumably buy rules should depend on some complicated, perhaps nonlinear, function of these values. Since that's not possible, I came up with this bot, which seems to work out ok, beating big money 60-33. It checks 2 conditions to choose venture over gold:
1. A lot of ventures (increases the second term, which corresponds to length of venture chain).
2. A lot of total $ (increases the third term, which corresponds to value of the chain-terminating treasure).

Code: [Select]
<player name="Venture">
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="Venture">
      <condition>
         <left type="countCardsInDeck" attribute="Venture"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Venture">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="21.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Venture"/>
   <buy name="Silver"/>
</player>

This young witch bot is a simple one. It's hard to finely tune something that already wins by such a huge margin (since you'd need way too many samples to detect meaningful change). It beats BM ~98-1.

Code: [Select]
<player name="Young Witch">
   <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="6.0"/>
      </condition>
   </buy>
   <buy name="Young_Witch" bane="Goop">
      <condition>
         <left type="countCardsInDeck" attribute="Young_Witch"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on October 03, 2011, 08:00:25 pm
Young Witch is a case I wouldn't have done probably, because it's so obviously strong if there's no way to check it (think how strong sea hag is, but this is better), and since you're never letting them have the bane... the data is useless.
Title: Re: Project: Optimizing Big Money X
Post by: DG on October 04, 2011, 09:17:37 am
Improved hunting parties + treasure.
Code: [Select]
<player name="DG Hunting Party" author="DG" description="The optimized Hunting Party strategy that buys no other actions.">
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
 <type name="Optimized"/>
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
   <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="2.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="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Hunting_Party"/>
   <buy name="Gold"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on October 04, 2011, 10:09:03 pm
Vault just buys as many vaults as possible, since you don't really care about collisions, and starts buying duchies/estates slightly earlier than BM, since the vaults give a little resilience to the green. This bot beats BM 75-20.

Code: [Select]
<player name="Vault" author="HiveMindEmulator" description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
   <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="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Vault"/>
   <buy name="Silver"/>
</player>

Treasury has to be careful about buying early duchies if they force discards of treasuries. I would think there there might be some conditions on countInPlay treasury, but the best bot I found doesn't have any... it beats BM 59-33.
 
Code: [Select]
<player name="Treasury" author="HiveMindEmulator" description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
   <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="Treasury"/>
   <buy name="Silver"/>
</player>

This smithy bot is pretty straightforward and beats BM 71-22.

Code: [Select]
<player name="Smithy" author="HiveMindEmulator" description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="15.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="6.0"/>
      </condition>
   </buy>
   <buy name="Smithy">
      <condition>
         <left type="countCardsInDeck" attribute="Smithy"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="11.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on October 07, 2011, 06:56:45 pm
This moat bot beats BM ~56-36.

Code: [Select]
<player name="Moat" author="HivemMindEmulator" description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.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="6.0"/>
      </condition>
   </buy>
   <buy name="Moat">
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="10.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Moat"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Moat">
      <condition>
         <left type="countCardsInDeck" attribute="Moat"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
</player>

Shanty town is very similar to moat since in a deck with only 1-2 action cards, it's usually just a $3 moat. The inability to buy it on a 5/2 makes it slightly worse, and this bot only beats BM ~52-39.

Code: [Select]
<player name="Shanty Town" author="HivemMindEmulator" description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="17.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="6.0"/>
      </condition>
   </buy>
   <buy name="Shanty_Town">
      <condition>
         <left type="countCardsInDeck" attribute="Shanty_Town"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="14.0" />
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on November 16, 2011, 02:36:47 pm
Okay, somebody's post on Oracle got me intrigued, especially since I thought, contrary to most people, I think, that it was going to be a pretty darn good BM enabler. And so after optimizing it this morning, lo and behold: it's pretty darn good; I don't have an optimized version of Smithy BM on my hands, but I think this is a touch better. It loses to envoy and courtyard optimizations ~41-49. There might be a small room for improvement a) to counter more typical strategies (I optimized it for play against other Oracle strategies) or b) by adding buy rules for the 4th(!) oracle, which I think might add .1%-.2%. Here it is:

Code: [Select]
<player name="Oracle" author="WW" description="The optimized Oracle but that buys no other actions.">
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="Generated"/>
 <type name="BigMoney"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="6.0"/>
      </condition>
   </buy>
   <buy name="Oracle">
      <condition>
         <left type="countCardsInDeck" attribute="Oracle"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Oracle">
      <condition>
         <left type="countCardsInDeck" attribute="Oracle"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Oracle">
      <condition>
         <left type="countCardsInDeck" attribute="Oracle"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="13.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on November 21, 2011, 08:43:54 pm
Cache (beats BM ~57-33)
Code: [Select]
<player name="Cache" author="WanderingWinder" description="The optimized Cache strategy that buys no other actions.">
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="SingleCard"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="13.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"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Cache"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Cache"/>
   <buy name="Silver"/>
</player>
Cartographer (Beats BM ~56-35)
Code: [Select]
<player name="Cartographer" author="WanderingWinder" description="The optimized Cartographer strategy that buys no other actions.">
 <type name="Bot"/>
 <type name="BigMoney"/>
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="SingleCard"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="13.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="6.0"/>
      </condition>
   </buy>
   <buy name="Cartographer">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on November 22, 2011, 02:10:34 pm
HiveMindEmulator's Courtyard bot:
Code: [Select]
<player name="Courtyard" author="HiveMindEmulator" description="The optimized Courtyard bot that buys no other actions">
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="Competitive"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
   <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="Silver">
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="8.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Courtyard">
      <condition>
         <left type="countCardsInDeck" attribute="Courtyard"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
</player>
Embassy (Beats BM ~72-22)
Code: [Select]
<player name="Embassy" author="WanderingWinder" description="The optimized Embassy strategy that buys no other actions.">
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="14.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="Embassy">
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: kn1tt3r on December 07, 2011, 03:20:35 am
Maybe not the right thread for this, but it probably isn't worth one of its own... I was quite surprised that the Saboteur bot beats Mountebank by quite a margin. It's different for Witch, but maybe Saboteur isn't that bad after all, even as a single card - especially against non-drawing strategies.
Title: Re: Project: Optimizing Big Money X
Post by: Geronimoo on December 07, 2011, 08:02:14 am
Maybe not the right thread for this, but it probably isn't worth one of its own... I was quite surprised that the Saboteur bot beats Mountebank by quite a margin. It's different for Witch, but maybe Saboteur isn't that bad after all, even as a single card - especially against non-drawing strategies.
I have no idea which bot you're talking about, but a simple Saboteur bot gets demolished by Mountebank.
Title: Re: Project: Optimizing Big Money X
Post by: kn1tt3r on December 07, 2011, 01:40:37 pm
Maybe not the right thread for this, but it probably isn't worth one of its own... I was quite surprised that the Saboteur bot beats Mountebank by quite a margin. It's different for Witch, but maybe Saboteur isn't that bad after all, even as a single card - especially against non-drawing strategies.
I have no idea which bot you're talking about, but a simple Saboteur bot gets demolished by Mountebank.
I'm no great simulation expert, but I've just chosen the implemented "Saboteur" and "Mountebank" bots, and Sab wins 70% of the time. But maybe I've done sth wrong...

See screenshot:
http://img703.imageshack.us/img703/7915/simuz.jpg
Title: Re: Project: Optimizing Big Money X
Post by: Deadlock39 on December 07, 2011, 02:20:24 pm
It looks like there is probably an interaction between those two bots that is screwing up the buy priorities of Mountebank.  You can see in the graphs that the Mountebank player is generating significantly more money per turn, but is gaining less VPs per turn.  Also, it shows 94% three pile endings, which seems strange.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on December 07, 2011, 02:27:02 pm
Maybe not the right thread for this, but it probably isn't worth one of its own... I was quite surprised that the Saboteur bot beats Mountebank by quite a margin. It's different for Witch, but maybe Saboteur isn't that bad after all, even as a single card - especially against non-drawing strategies.
I have no idea which bot you're talking about, but a simple Saboteur bot gets demolished by Mountebank.
I'm no great simulation expert, but I've just chosen the implemented "Saboteur" and "Mountebank" bots, and Sab wins 70% of the time. But maybe I've done sth wrong...

See screenshot:
http://img703.imageshack.us/img703/7915/simuz.jpg
You must have accidentally modified the bots. I have the mountebank bot crushing the sab bot...
Title: Re: Project: Optimizing Big Money X
Post by: kn1tt3r on December 07, 2011, 02:37:54 pm
Maybe not the right thread for this, but it probably isn't worth one of its own... I was quite surprised that the Saboteur bot beats Mountebank by quite a margin. It's different for Witch, but maybe Saboteur isn't that bad after all, even as a single card - especially against non-drawing strategies.
I have no idea which bot you're talking about, but a simple Saboteur bot gets demolished by Mountebank.
I'm no great simulation expert, but I've just chosen the implemented "Saboteur" and "Mountebank" bots, and Sab wins 70% of the time. But maybe I've done sth wrong...

See screenshot:
http://img703.imageshack.us/img703/7915/simuz.jpg
You must have accidentally modified the bots. I have the mountebank bot crushing the sab bot...

Hm... I've just checked them... on first sight they look fine:


Code: [Select]
<player name="Saboteur" author="Geronimoo" description="Although hated by a lot of players, the attack of this card is rather weak.">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Casual"/>
 <type name="Attacking"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
   <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="Saboteur">
      <condition>
         <left type="countCardsInDeck" attribute="Saboteur"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Code: [Select]
<player name="Mountebank" author="Geronimoo" description="Mountebank might be the strongest attack. It's a better buy than Gold (so it will be bought with $6)">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Attacking"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Competitive"/>
 <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="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="Mountebank">
      <condition>
         <left type="countCardsInDeck" attribute="Mountebank"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Mountebank">
      <condition>
         <left type="countCardsInDeck" attribute="Mountebank"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: rod- on December 07, 2011, 02:57:28 pm
94% 3 pile endings seems highly suspect.  maybe the mountebank bot keeps taking estates after getting hit with sab, screwing itself over? 
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on December 07, 2011, 03:04:33 pm
Maybe it's because it's taking mountebank over gold too much because its Mountebanks are getting knocked out, even doing this after there are a bunch of curses gone?
Title: Re: Project: Optimizing Big Money X
Post by: DG on December 07, 2011, 04:22:44 pm
The mountebank bot only buys provinces if it has gold, but it never buys gold since it buys mountebanks instead. Once 3 provinces are gone it always buys duchies ahead of gold and can never buy a province again if the gold is sabotaged.
Title: Re: Project: Optimizing Big Money X
Post by: Geronimoo on December 07, 2011, 05:06:17 pm
I guess he's just running an outdated version (the one with the big bug). Click here (http://users.telenet.be/jeroenaga/dominion.jnlp) if you're not sure you have the good version (clicking the icon on your desktop won't automatically look for updates)
Title: Re: Project: Optimizing Big Money X
Post by: kn1tt3r on December 08, 2011, 02:50:34 pm
I guess he's just running an outdated version (the one with the big bug). Click here (http://users.telenet.be/jeroenaga/dominion.jnlp) if you're not sure you have the good version (clicking the icon on your desktop won't automatically look for updates)
That was the problem. Ty.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on January 02, 2012, 06:53:31 pm
Getting an Embassy before the first Gold slightly improves the Embassy bot. It still beats BMU 72-22, but beats the existing Embassy bot 48-43 heads-up.
Code: [Select]
<player name="Embassy"
 author="HiveMindEmulator"
 description="The optimized Embassy strategy that buys no other actions.">
 <type name="BigMoney"/>
 <type name="Optimized"/>
 <type name="Bot"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="14.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="Embassy">
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.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="Embassy">
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 19, 2012, 07:58:35 pm
Improved scripts for witch and Ill-Gotten Gains:
Code: [Select]
<player name="Witch by WW"
 author="WanderingWinder"
 description="Witch is probably the strongest attack card in the game.">
 <type name="UserCreated"/>
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Attacking"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="20.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="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.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="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="30.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInSupply" attribute="Witch"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="26.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
</player>

Code: [Select]
<player name="IGG Rush"
 author="WanderingWinder"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="UserCreated"/>
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Ill_Gotten_Gains"/>
   <buy name="Duchy"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>

Title: Re: Project: Optimizing Big Money X
Post by: DStu on January 20, 2012, 03:43:40 am
Small improvement for Familiar, not at all fitting the theme "optimize BM", but however
Code: [Select]
<player name="Familiar_impr"
 author="Geronimoo"
 description="Familiar is often one of the defining cards on a board.">
 <type name="Attacking"/>
 <type name="Province"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
   <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="countCardsInDeck" attribute="Familiar"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.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="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: Fabian on January 20, 2012, 07:33:30 am
WW, Witch bot is posted twice.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 20, 2012, 08:55:49 am
WW, Witch bot is posted twice.
Thanks for the heads-up. Now fixed
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 21, 2012, 09:31:41 am
Small improvement for Mountebank:
Code: [Select]
<player name="Mountebank by WW"
 author="Geronimoo"
 description="Mountebank might be the strongest attack. It's a better buy than Gold (so it will be bought with $6)">
 <type name="UserCreated"/>
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Attacking"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="22.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Mountebank">
      <condition>
         <left type="countCardsInDeck" attribute="Mountebank"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Mountebank">
      <condition>
         <left type="countCardsInDeck" attribute="Mountebank"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Mountebank">
      <condition>
         <left type="countCardsInDeck" attribute="Mountebank"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 22, 2012, 01:26:45 pm
Small improvement for Smithy:
Code: [Select]
<player name="SmithyWW"
 author="HiveMindEmulator"
 description="The optimized strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="15.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="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Smithy">
      <condition>
         <left type="countCardsInDeck" attribute="Smithy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Smithy">
      <condition>
         <left type="countCardsInDeck" attribute="Smithy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="11.0"/>
      </condition>
   </buy>
   <buy name="Smithy">
      <condition>
         <left type="countCardsInDeck" attribute="Smithy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardTypeInDeck" attribute="Treasure"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="23.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>

And a merchant ship bot:
Code: [Select]
<player name="Merchant Ship WW"
 author="WanderingWinder"
 description="The optimized Merchant Ship bot which buys no other actions">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="BigMoney"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="13.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Merchant_Ship"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.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="Merchant_Ship">
      <condition>
         <left type="countCardsInDeck" attribute="Merchant_Ship"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.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="Merchant_Ship">
      <condition>
         <left type="countCardsInDeck" attribute="Merchant_Ship"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.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="Merchant_Ship">
      <condition>
         <left type="countCardsInDeck" attribute="Merchant_Ship"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 27, 2012, 07:05:07 pm
Mandarin. Wins 57-33 against BMU, ahead of such favourites as Lab(!)
Code: [Select]
<player name="Mandarin"
 author="WanderingWinder"
 description="The optimized Mandarin bot that buys no other actions.">
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="15.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="4.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="6.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="6.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: DG on January 27, 2012, 09:15:35 pm
Are you sure the Mandarin needs to be that complicated? This just takes a little more treasure before greening and never buys more mandarins if there is more than one copper in play. I'm actually surprised that it beats big money on a 4/3 split.

Code: [Select]
<player name="Mandarin (DG)"
 author="DG"
 description="Fairly simple Mandarin deck">
 <type name="Optimized"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="19.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"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on January 28, 2012, 03:09:01 pm
Are you sure the Mandarin needs to be that complicated? This just takes a little more treasure before greening and never buys more mandarins if there is more than one copper in play. I'm actually surprised that it beats big money on a 4/3 split.

Code: [Select]
<player name="Mandarin (DG)"
 author="DG"
 description="Fairly simple Mandarin deck">
 <type name="Optimized"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="19.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"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
No, you're right. The 'complicated' stuff at the top has to help, but won't come up very often at all. Putting it out in more situations than 'no duchies, not too far behind' will probably help more, but it's a bit of work identifying those situations. But buying Mandarins slightly more aggressively than yours does help. Here's a non-optimized but improved version:

Code: [Select]
<player name="Mandarin"
 author="WanderingWinder"
 description="The optimized Mandarin bot that buys no other actions.">
 <type name="Province"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.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="6.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="7.0" />
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="6.0" />
      </condition>
   </buy>
   <buy name="Mandarin">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Mandarin"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="divideBy" attribute="9.0" />
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: DG on January 28, 2012, 08:02:09 pm
Your version was still weaker than mine on a 5/2 opening though. Change your script to buy one mandarin on turns 1-2 instead of two mandarins on turns 1-3 and it does become the stronger one.

You might want to consider extra conditions where there's only one province in the supply or there's only one duchy in the supply, if you want to tease out those exact endgame treasure strategies.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on February 06, 2012, 12:19:03 pm
Significant improvement on the Hoard bot:
Code: [Select]
<player name="Hoard2"
 author="WanderingWinder"
 description="The optimized Hoard strategy that buys no actions.">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="19.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <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="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.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="Hoard">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on February 06, 2012, 04:47:58 pm
^You can do a bit better if you add
Code: [Select]
   <buy name="Estate">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
above silver.
Title: Re: Project: Optimizing Big Money X
Post by: DG on February 06, 2012, 07:06:56 pm
This is basically the WW hoard bot with a few adjustments - Extra condition to cover edge cases buying duchies and provinces based on number of hoards in the deck. Buys estates earlier. Includes the line suggested by HiveMindEmulator.

Code: [Select]
<player name="Hoard optimized "
 author="DG"
 description="Small tinkering to the optimzed script created by WanderingWinder">
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="Bot"/>
 <type name="SingleCard"/>
 <type name="Optimized"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="19.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <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="Duchy">
      <condition>
         <left type="countCardsInDeck" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Hoard">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInPlay" attribute="Hoard"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: Loschmidt on February 06, 2012, 09:07:57 pm
Hey guys. I've recently got on the simulating bandwagon and i'm already addicted. And I think this is a brilliant idea. So here is my first contribution.

Code: [Select]
<player name="Workshop"
 author="Loschmidt"
 description="Optimised workshop bot.">
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
   <buy name="Gold">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="17.0"/>
      </condition>
   </buy>
   <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="3.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Workshop">
      <condition>
         <left type="countCardsInDeck" attribute="Workshop"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
</player>

Its the best I can get out of a Workshop bot. Its based on WW BMU bot, the only differences are the Workshop and it starts to green a fraction earlier. Its losing to BMU at about 43%, if someone can make any improvements i'd like to know :D
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on February 06, 2012, 09:20:56 pm
Hey guys. I've recently got on the simulating bandwagon and i'm already addicted. And I think this is a brilliant idea. So here is my first contribution.

Code: [Select]
<player name="Workshop"
 author="Loschmidt"
 description="Optimised workshop bot.">
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
   <buy name="Gold">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="17.0"/>
      </condition>
   </buy>
   <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="3.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Workshop">
      <condition>
         <left type="countCardsInDeck" attribute="Workshop"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
</player>

Its the best I can get out of a Workshop bot. Its based on WW BMU bot, the only differences are the Workshop and it starts to green a fraction earlier. Its losing to BMU at about 43%, if someone can make any improvements i'd like to know :D
Here's an improvement: don't buy workshop :)
No, seriously, there's no point if there isn't a better target than silver.
Title: Re: Project: Optimizing Big Money X
Post by: Loschmidt on February 06, 2012, 09:57:36 pm
Quote
Here's an improvement: don't buy workshop :)
No, seriously, there's no point if there isn't a better target than silver.

Well yeah, I get that. I'm not seriously proposing this as a strategy :P I just thought it would be good to be thorough have every single card bot coded. And if you were working alphabetically down i'm working alphabetically up.

Speaking of that here's woodcutter. A pretty straightforward one. Almost exactly 50%

Code: [Select]
<player name="Woodcutter"
 author="Loschmidt"
 description="Woodcutter optimised">
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="3.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="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Woodcutter"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="17.0"/>
      </condition>
   </buy>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: Loschmidt on February 06, 2012, 10:16:57 pm
Library

Code: [Select]
<player name="Library"
 author="Loschmidt"
 description="Library only bot optimised">
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.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="Library">
      <condition>
         <left type="countCardsInDeck" attribute="Library"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Library">
      <condition>
         <left type="countCardsInDeck" attribute="Library"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on February 06, 2012, 10:52:34 pm
Quote
Here's an improvement: don't buy workshop :)
No, seriously, there's no point if there isn't a better target than silver.

Well yeah, I get that. I'm not seriously proposing this as a strategy :P I just thought it would be good to be thorough have every single card bot coded. And if you were working alphabetically down i'm working alphabetically up.

Speaking of that here's woodcutter. A pretty straightforward one. Almost exactly 50%

Code: [Select]
<player name="Woodcutter"
 author="Loschmidt"
 description="Woodcutter optimised">
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.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="3.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="Woodcutter">
      <condition>
         <left type="countCardsInDeck" attribute="Woodcutter"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="17.0"/>
      </condition>
   </buy>
</player>
The point is to have the optimal one-card strategy for each card. For a LOT of cards, that's BMU. Of course, many of those cards are really good, just you need other cards with them.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on February 07, 2012, 01:14:56 am
This is basically the WW hoard bot with a few adjustments - Extra condition to cover edge cases buying duchies and provinces based on number of hoards in the deck. Buys estates earlier. Includes the line suggested by HiveMindEmulator.
This is really interesting. It's kind of surprising how early you want to be in full-on green mode, though I guess it makes sense given that your deck can produce tons of Gold.
Title: Re: Project: Optimizing Big Money X
Post by: DG on February 07, 2012, 09:01:36 am
Quote
Speaking of that here's woodcutter. A pretty straightforward one. Almost exactly 50%

If you use the big money scripts with turn based decisions based on the shuffles (turns 6, 9, 12), then the script can make use of the extra buy earlier. After a reshuffle on turn 12 it would buy a duchy and estate for 7 on turn 13 with a woodcutter based on the premise that those cards are unlikely to be drawn again. If you apply the PPR to both decks as well then the woodcutter gains another small advantage to push the win rate to 51-41. However both the PPR and turns rule are probably best left out of a multi purpose baseline script.

The extra buy is only useful if you plan to make use of it.
Title: Re: Project: Optimizing Big Money X
Post by: blueblimp on February 16, 2012, 11:49:22 pm
Improved scripts for witch and Ill-Gotten Gains:
Code: [Select]
<player name="Witch by WW"
 author="WanderingWinder"
 description="Witch is probably the strongest attack card in the game.">
 <type name="UserCreated"/>
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="Attacking"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="20.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="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="32.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.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="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="30.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInSupply" attribute="Witch"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="26.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
</player>

Code: [Select]
<player name="IGG Rush"
 author="WanderingWinder"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="UserCreated"/>
 <type name="Competitive"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Ill_Gotten_Gains"/>
   <buy name="Duchy"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>


I've improved and simplified the IGG bot. It gets a a 57.7/38.7 win-rate vs WW's bot. Some notes first.

I tried deleting the copper-buy-rule and found that it didn't make the bot any worse. Stats (error intervals are with 99% confidence):
  Win: 47.4% +/- 0.4%
  Loss: 47.1% +/- 0.4%
  Tie: 5.4% +/- 0.2%
So it's definitely not worse, and maybe a tiny hair better.

I tried removing the after-silver estate rule, but that made the bot a lot worse. However, moving that estate rule above silver (and deleting the estate rule that was already there and is now redundant) makes the bot significantly better:
  Win: 52.7% +/- 0.4%
  Loss: 42.8% +/- 0.4%
  Tie: 4.5% +/- 0.2%
That's a pretty big difference!

I tried deleting the early-duchy rule, but doing that brings the winrate back down a bit:
  Win: 50.4% +/- 0.4%
  Loss: 44.9% +/- 0.4%
  Tie: 4.7% +/- 0.2%
I tweaked this around a bit and found though that "curse <= 1" performs best, giving a 49.971/45.75 advantage against "curse <= 2".

Finally, I set about tweaking when to start buying estates. Originally this was "#gains <= 4". I found that against this rule, I could get a 51.814/44.415 advantage with "#gains <= 6", and against WW's bot it gets 56.573/39.726, quite good. Unfortunately this causes a slight decrease in performance against BMU, because BMU is going for different piles. So I re-tweaked to "#duchies <= 5" (which should be roughly equivalent in the mirror if early duchies are taken with "curse <= 1"), and this restored performance against BMU and actually does better in the mirror for some reason.

Final bot:
Code: [Select]
<player name="IGG Rush Final"
 author="blueblimp"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="BigMoney"/>
 <type name="UserCreated"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
 <type name="Province"/>
 <type name="Bot"/>
 <type name="Competitive"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Ill_Gotten_Gains"/>
   <buy name="Duchy"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Performance against WW bot:
  Win: 57.7% +/- 0.4%
  Loss: 38.7% +/- 0.4%
  Tie: 3.6% +/- 0.2%

Performance against BMU:
  Win: 95.3% +/- 0.2%
  Loss: 4.2% +/- 0.2%
  Tie: 0.5% +/- 0.1%

WW bot's performance against BMU, for comparison:
  Win: 95.1% +/- 0.2%
  Loss: 4.5% +/- 0.2%
  Tie: 0.4% +/- 0.1%
Title: Re: Project: Optimizing Big Money X
Post by: DG on February 17, 2012, 09:31:55 am
I wouldn't worry about optimizing igg against pure money as (1) it wins so strongly already and (2) pure money certainly isn't optimized for playing against curse givers. Buying estates and copper with bad hands should still be in the igg script somewhere but unfortunately the timing and benefit is largely masked by the variance. You can also gain 1% by not buying the final igg when you would immediately empty three piles and lose on points.
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on February 17, 2012, 09:43:26 am
...
Very very nice. I made a couple more slight improvements below. I'm pretty sure tweaking when the copper buys happen can help still, but... it's extremely extremely marginal.

Code: [Select]
<player name="IGG Rush"
 author="WanderingWinder"
 description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
 <type name="TwoPlayer"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="Competitive"/>
 <type name="BigMoney"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Ill_Gotten_Gains">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Ill_Gotten_Gains"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Curse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Ill_Gotten_Gains"/>
   <buy name="Duchy"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Duchy"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
</player>
This gets a 49.107-47.112-3.781 over yours.
The main difference is that I buy estates even earlier.

I think the biggest gain left is from working in reshuffle-based stuff.
Title: Re: Project: Optimizing Big Money X
Post by: blueblimp on February 17, 2012, 02:41:24 pm
I wouldn't worry about optimizing igg against pure money as (1) it wins so strongly already and (2) pure money certainly isn't optimized for playing against curse givers. Buying estates and copper with bad hands should still be in the igg script somewhere but unfortunately the timing and benefit is largely masked by the variance. You can also gain 1% by not buying the final igg when you would immediately empty three piles and lose on points.

I was meaning to use BMU as a stand-in for "whatever province strategy", although (as you point out) it does so badly that maybe it's a bad comparison. It might be better to compare against doublejack (using the bot included with the simulator), which is pretty good against IGG, but not overwhelmingly so.

WW's old IGG vs doublejack:
  Win: 40.1% +/- 0.4%
  Loss: 58.1% +/- 0.4%
  Tie: 1.8% +/- 0.1%

My IGG vs doublejack:
  Win: 41.4% +/- 0.4%
  Loss: 56.6% +/- 0.4%
  Tie: 2.0% +/- 0.1%

WW's new IGG vs doublejack:
  Win: 37.4% +/- 0.4%
  Loss: 60.9% +/- 0.4%
  Tie: 1.7% +/- 0.1%

WW's new IGG vs my IGG:
  Win: 49.0% +/- 0.4%
  Loss: 47.3% +/- 0.4%
  Tie: 3.7% +/- 0.2%


So we have a problem here where it's not clear what it means to be "optimized". WW's new bot is a bit better in the mirror than my bot, but a bit worse against doublejack.
Title: Re: Project: Optimizing Big Money X
Post by: DG on February 17, 2012, 04:25:38 pm
Quote
So we have a problem here where it's not clear what it means to be "optimized". WW's new bot is a bit better in the mirror than my bot, but a bit worse against doublejack.

There isn't a perfect definition so I wouldn't worry too much. A big money optimized to play against iggs would probably contest a duchy rush itself and would probably even buy iggs. There's very little reason not to.
Title: Re: Project: Optimizing Big Money X
Post by: Cheese on March 05, 2012, 08:04:31 pm
Excellent project! The compiled XML is dated in September 2011, is there a newer state of things available somewhere?

Also, I checked about 10 sample games of the Ironworks bot and...it didn't buy a single Ironworks. Even fiddling with the buy rules a smidge, I couldn't get the bot to purchase an Ironworks. Simulator bug?
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on April 12, 2012, 11:40:11 pm
Improvements for a few bots:

Warehouse:
Code: [Select]
<player name="WarehouseWW"
 author="WanderingWinder"
 description="The optimized Warehouse bot that buys no other actions">
 <type name="TwoPlayer"/>
 <type name="Generated"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="SingleCard"/>
 <type name="Province"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.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="6.0"/>
      </condition>
   </buy>
   <buy name="Warehouse">
      <condition>
         <left type="countCardsInDeck" attribute="Warehouse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="11.0"/>
      </condition>
   </buy>
   <buy name="Warehouse">
      <condition>
         <left type="countCardsInDeck" attribute="Warehouse"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
</player>

Embassy:
Code: [Select]
<player name="EmbassyWW"
 author="WanderingWinder"
 description="The optimized Embassy strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="Province"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="13.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <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="15.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="Embassy">
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.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="Embassy">
      <condition>
         <left type="countCardsInDeck" attribute="Embassy"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="7.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Well, I should add some buy estates sooner with exactly $2 clauses at the end. Oh well.


And, most importantly, Wharf:
Code: [Select]
<player name="WharfWW"
 author="WanderingWinder"
 description="The optimized Wharf strategy that buys no other actions.">
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="3.0" />
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.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="Wharf">
      <condition>
         <left type="countCardsInDeck" attribute="Wharf"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="8.0" />
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Wharf">
      <condition>
         <left type="countCardsInDeck" attribute="Wharf"/>
         <operator type="smallerThan" />
         <right type="countCardTypeInDeck" attribute="Treasure"/>
         <extra_operation type="divideBy" attribute="4.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
   </buy>
</player>
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on May 20, 2012, 07:59:05 pm
For those who want it, here's an XML of all the latest single-card optimizations I have.
Title: Re: Project: Optimizing Big Money X
Post by: rrenaud on May 20, 2012, 11:24:04 pm
I encourage you to use github for this kind of stuff.  Really, those strategy files are basically code, and real source control is nice to be able to see diffs, track history, etc.

Of course, keep using the forum if you like prefer it.
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on May 21, 2012, 11:33:45 am
Is there a way to load the whole .xml file into the simulator at once, or do you have to paste each bot in as you want to use it?
Title: Re: Project: Optimizing Big Money X
Post by: WanderingWinder on May 21, 2012, 11:38:41 am
I think you can just save the file to your computer, then load it via the 'load players' in the simulator, and it should grab them all...
Title: Re: Project: Optimizing Big Money X
Post by: HiveMindEmulator on May 21, 2012, 11:40:33 am
ah, yeah, I didn't even notice there is a "file" menu at the top. alternatively, if you select it all and paste in in one player it also works...