Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 4  All

Author Topic: Project: Optimizing Big Money X  (Read 39455 times)

0 Members and 1 Guest are viewing this topic.

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Project: Optimizing Big Money X
« on: September 12, 2011, 02:43:02 pm »
+3

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.

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #1 on: September 12, 2011, 02:43:26 pm »
0

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)

« Last Edit: September 15, 2011, 11:14:36 am by WanderingWinder »
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #2 on: September 12, 2011, 02:43:48 pm »
0

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>

tko

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 129
  • Respect: +1
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #3 on: September 12, 2011, 03:30:16 pm »
0

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>
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5477
  • Respect: +2860
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #4 on: September 12, 2011, 03:39:18 pm »
0

bots? interesting stuff.

Is the syntax intuitive enough that I could copypasta one?
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Project: Optimizing Big Money X
« Reply #5 on: September 12, 2011, 03:40:11 pm »
0

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.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #6 on: September 12, 2011, 04:07:08 pm »
0

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.

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #7 on: September 12, 2011, 04:13:09 pm »
0

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.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #8 on: September 12, 2011, 04:50:48 pm »
0

Not sure if this is the best place to put this, but...

Just a quick aside:  Do we need a "Simulating" forum?  Rob, theory?
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2833
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3879
    • View Profile
    • My Dominion Videos
Re: Project: Optimizing Big Money X
« Reply #9 on: September 13, 2011, 02:01:00 pm »
0

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
Logged
Visit my blog for links to a whole bunch of Dominion content I've made.

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #10 on: September 13, 2011, 02:09:30 pm »
0

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)

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #11 on: September 13, 2011, 06:22:05 pm »
0

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.
Logged

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
  • Respect: +6121
    • View Profile
    • Dominion Strategy
Re: Project: Optimizing Big Money X
« Reply #12 on: September 13, 2011, 06:48:28 pm »
0

I think I moved most of the ones I spotted.  PM me if there's any more I should move over.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #13 on: September 13, 2011, 07:19:42 pm »
0

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
      ]
}

« Last Edit: September 13, 2011, 07:27:26 pm by rspeer »
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #14 on: September 14, 2011, 05:49:36 am »
0

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>
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3412
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #15 on: September 14, 2011, 05:54:13 am »
0

Buys 1 Bridge.
« Last Edit: September 14, 2011, 06:20:13 am by Davio »
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +676
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #16 on: September 14, 2011, 07:18:07 am »
0

Buys 1 Bridge.

... If the current number of Bridges in your deck is 0/8 (a.k.a. 0).
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5477
  • Respect: +2860
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #17 on: September 14, 2011, 11:58:45 am »
0

isn't that optimal for big money though?
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #18 on: September 14, 2011, 12:41:57 pm »
0

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.

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #19 on: September 14, 2011, 01:01:39 pm »
0

...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?

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Project: Optimizing Big Money X
« Reply #20 on: September 14, 2011, 01:08:44 pm »
0

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.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #21 on: September 14, 2011, 01:10:50 pm »
0

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.
« Last Edit: September 14, 2011, 01:13:41 pm by WanderingWinder »
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Project: Optimizing Big Money X
« Reply #22 on: September 14, 2011, 01:20:18 pm »
0

Just send the file to me and I'll put them in the simulator replacing the computer generated _Cardname strategies.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Project: Optimizing Big Money X
« Reply #23 on: September 15, 2011, 05:01:49 am »
0

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
  ]
}
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Project: Optimizing Big Money X
« Reply #24 on: September 15, 2011, 11:13:49 am »
0

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.
Pages: [1] 2 3 4  All
 

Page created in 0.097 seconds with 21 queries.