Dominion Strategy Forum

Please login or register.

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

Author Topic: Big Money completely revised  (Read 7110 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1044
  • Respect: +830
    • View Profile
    • Geronimoo's Dominion Simulator
Big Money completely revised
« on: January 13, 2012, 05:02:48 am »
+5

Here's a completely different take on the Big Money Ultimate Bot:
Code: [Select]
<player name="Big Money Ultimate ($ tresholds)"
 author="Geronimoo"
 description="The optimized strategy that buys only treasure.">
 <type name="SingleCard"/>
 <type name="BigMoney"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="Province"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Silver"/>
</player>

Instead of using the number of Provinces left in the supply to determine when to start buying Duchies, use the amount of money in a deck to determine when to start on them.

There are 3 stages in this strategy:
-build up the economy to reach for Provinces
-buy Provinces in the meantime building economy further
-go totally green once the economy allows it

This strategy performs slightly worse than the other system, but it's very close. I guess with some more tuning we might even get this to perform better than the other system....??
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4733
  • Respect: +3323
    • View Profile
Re: Big Money completely revised
« Reply #1 on: January 13, 2012, 05:39:26 am »
0

Well, it would make sense to check as many parameters as possible.

When deciding to grab a green or a treasure, some of the following factors may be more or less important:
- Your own total $
- Your opponent's total $ (is he any threat?)
- Your own VP (do we really need the Estate)
- Your opponent's VP (again, is he a threat?)
- How close we are to a reshuffle

If we already have 4 Provinces, it may be a better idea to buy a Gold then a Duchy at some point to try for that massively important 5th Province.

I'll see if I can distill something into the sim.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1044
  • Respect: +830
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Big Money completely revised
« Reply #2 on: January 13, 2012, 05:58:17 am »
+1

I've already found an improvement that I bet WanderingWinder will love: buying Copper in the greening stage:
Code: [Select]
<player name="Big Money Ultimate ($ tresholds)"
 author="Geronimoo"
 description="The optimized strategy that buys only treasure.XXXXThis strategy uses the amount of treasure in the deck to decide wether it's time to go green.">
 <type name="Bot"/>
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Silver"/>
   <buy name="Copper">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
</player>

This performs 1% worse than the other optimized BMU's.
Logged

mnavratil

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 216
  • Respect: +83
    • View Profile
Re: Big Money completely revised
« Reply #3 on: January 13, 2012, 09:39:12 am »
0

Added a slight tweek to favor gold over duchy just before the reshuffle when the game isn't almost over. This brings it almost dead even with big money ultimate (although now we care about buys to end game again). Adding the same line to the BMU bot didn't make any noticeable changes.
Code: [Select]
<player name="Big Money Ultimate ($ tresholds)/Gold B4 reshuffle"
 author="mnavratil"
 description="The optimized strategy that buys only treasure.">
 <type name="UserCreated"/>
 <type name="Bot"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="Province"/>
 <type name="SingleCard"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Gold">
      <condition>
         <left type="countCardsLeftInDrawDeck"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="gainsNeededToEndGame"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Silver"/>
</player>

EDIT: Forgot to add the copper buying in. When I did, the gold rule version performs slighly worse than otherwise. I would prabably just stick with the copper since it is an easier buy rule.
« Last Edit: January 13, 2012, 09:43:52 am by mnavratil »
Logged

HiveMindEmulator

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2222
  • Respect: +2088
    • View Profile
Re: Big Money completely revised
« Reply #4 on: January 13, 2012, 02:37:49 pm »
0

I like the idea of this. I wasn't sure WW's attempts to optimize estate-buying rules was worth the effort, but changing the duchy buy rules would be nice. I think as presented, it's a bit too simple. There should be multiple conditions since the conditions of preferring duchy over silver should be different from the conditions for preferring it over Gold. Cards left in draw deck should also matter in some way. I'll probably spend some time playing with this when I have the time.
Logged

Rabid

  • Jester
  • *****
  • Offline Offline
  • Posts: 826
  • Shuffle iT Username: Rabid
  • Respect: +629
    • View Profile
Re: Big Money completely revised
« Reply #5 on: January 14, 2012, 07:33:24 pm »
+1

I tried fine tuning the above and failed.
But I did have the idea to try using the turn number as a trigger instead.
I think this beats the built in BMU, and the BMU ($ thresholds) by about 47% to 45%
This trigger is obviously going to be really bad against any attacks.

Code: [Select]
<player name="Big Money Ultimate (Turns)"
 author="Rabid"
 description="The optimized strategy that buys only treasure.XXXXThis strategy uses what turn is it to decide when it's time to go green.XXXX">
 <type name="TwoPlayer"/>
 <type name="Optimized"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
 <type name="Province"/>
 <type name="UserCreated"/>
   <buy name="Province">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="13.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="13.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterOrEqualThan" />
         <right type="constant" attribute="11.0"/>
      </condition>
   </buy>
</player>
« Last Edit: January 14, 2012, 07:36:38 pm by Rabid »
Logged
Twitch
1 Day Cup #1:Ednever

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1044
  • Respect: +830
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Big Money completely revised
« Reply #6 on: January 15, 2012, 06:00:36 am »
0

This is really cool, Rabid! Your bot clearly beats the other optimizations. Once attacks come into play you'd expect it to do a lot worse than the other BMU's, but it doesn't (I guess if it's lucky and winning the turn guideline works fine and otherwise it's going to lose no matter how it plays)

What I really like about this is that it's a great guideline for newer players:

Buy Golds over Provinces before turn 6
Start greening completely turn 13
Logged

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #7 on: January 15, 2012, 09:54:47 am »
0

With a pure money deck you can predict the shuffles after turns 4, 6, 9, 12, and 16. Theoretically buying a province on turn 5 is no difference from buying a province on turn 6. I'm guessing the province buying threshold is after turn 6 and the duchy buying threshold is after turn 12. The simplest model turns out to be one of the best but I can guess more can be gained from covering the unusually slow and fast games.
Logged

Rabid

  • Jester
  • *****
  • Offline Offline
  • Posts: 826
  • Shuffle iT Username: Rabid
  • Respect: +629
    • View Profile
Re: Big Money completely revised
« Reply #8 on: January 15, 2012, 11:11:25 am »
0

It could just be variance but sim is favouring delaying prov to T6 by about 0.5%.
I guess this could be the following corner case. Where opening Silver misses the shuffle so you would prefer Gold to prov on turn 5.

1) CCCEE > S
2) CCCCE > S
3) SCCCC > G
4) EEECC >
5) CSGSC > G / Prov

My guess would be the greatest improvements could be make if you took into account start player advantage and 5/2 vs 4/3 starts.

Logged
Twitch
1 Day Cup #1:Ednever

Biderman

  • Coppersmith
  • ****
  • Offline Offline
  • Posts: 47
  • Respect: +8
    • View Profile
Re: Big Money completely revised
« Reply #9 on: January 15, 2012, 12:34:43 pm »
0

How would you change it given a 5/2 start?
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4355
    • View Profile
    • WanderingWinder YouTube Page
Re: Big Money completely revised
« Reply #10 on: January 15, 2012, 12:57:06 pm »
0

I'm highly suspicious of the turn thing. I can't imagine it isn't working just because it's a good approximation of a combination of the various factors you want to think about - where in the deck you are (reshuffle), how good your economy is, how late is late enough, etc. etc. I can't imagine it will translate very well to other things, and I can't imagine it would beat a well-tuned bot that accurately combines those other factors. Mind you, it is certainly a lot simpler than those bots.

Here's the best optimization of the money-based concept which I was able to come up with:
Code: [Select]
<player name="Big Money Ultimate ($ threshholds) WW"
 author="WanderingWinder"
 description="The optimized strategy that buys only treasure.XXXXThis strategy uses the amount of treasure in the deck to decide wether it's time to go green.">
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="UserCreated"/>
 <type name="Optimized"/>
 <type name="Province"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
   <buy name="Province">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="18.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="29.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="24.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="26.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="minus" attribute="4.0" />
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
</player>

Rabid

  • Jester
  • *****
  • Offline Offline
  • Posts: 826
  • Shuffle iT Username: Rabid
  • Respect: +629
    • View Profile
Re: Big Money completely revised
« Reply #11 on: January 15, 2012, 01:19:05 pm »
0

I wanted to use number of shuffles as the trigger, but as that wasn't available number of turns in a BM mirror is a very close approximation.
Instinct says that turns is not a good trigger to use in more complex strategies.

The interesting thing to look at is the VP per turn graphs for BMU vs BMU(turns)
They are very different so probably the cause of the improvement?
Logged
Twitch
1 Day Cup #1:Ednever

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #12 on: January 15, 2012, 02:13:07 pm »
+1

Quote
How would you change it given a 5/2 start?

The shuffle turns won't change unless you get another 2 spending hand. Thanks for asking though since I checked my 6-9-12 script below and it buys duchies too early  for 5/2.

Quote
I can't imagine it isn't working just because it's a good approximation of a combination of the various factors you want to think about - where in the deck you are (reshuffle), how good your economy is, how late is late enough, etc. etc.

It'll be straightforward enough. The gold vs province decision here affects the first green card you buy. It's based on future spending and it comes down to "How many more times will I draw this card I'm buying?". I'd hazard a guess that the previous condition, total treasure in deck > 18, is a slightly inaccurate tally of 6 turns buying silver/gold.

I'll put this script forward as the next generation of Rabid's script. Buy provinces after the turn 6 shuffle. Buy duchies ahead of silver after the turn 9 shuffle. Always buy duchies and estates after the turn 12 shuffle. Buying early estates with a 2 coin hand seems to make little or no difference.

Code: [Select]
<player name="4/3 Big Money Ultimate ( 6-9-12)"
 author="DG"
 description="Buy provinces after the second reshuffle (turn 6)XXXXBuy duchies ahead of silver after the third reshuffle (turn 9)XXXXBuy duchies and estates after the fourth reshuffle (turn 12)XXXX">
 <type name="Optimized"/>
 <type name="Province"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="TwoPlayer"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
   <buy name="Province">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
« Last Edit: January 15, 2012, 02:54:59 pm by DG »
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4355
    • View Profile
    • WanderingWinder YouTube Page
Re: Big Money completely revised
« Reply #13 on: January 15, 2012, 03:25:51 pm »
+1

Using a combination of the original 'how many are left' method as well as the 'how much money is there in the deck' method from this thread, I came up with this:
Code: [Select]
<player name="Better Money Ultimate "
 author="WanderingWinder"
 description="The optimized strategy that buys only treasure.">
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="Optimized"/>
 <type name="SingleCard"/>
 <type name="Bot"/>
   <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="6.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="30.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="27.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.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="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="24.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="23.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
</player>

The duchy buying has thus been optimized.
The estates have not. Not sure how much that will help, but the estates are much more difficult and complicated. I also expect that position in the reshuffle is more important in when to buy estates as compared to the other stuff.

Oh yeah, this beats Rabid's by a few percentage points.

Rabid

  • Jester
  • *****
  • Offline Offline
  • Posts: 826
  • Shuffle iT Username: Rabid
  • Respect: +629
    • View Profile
Re: Big Money completely revised
« Reply #14 on: January 15, 2012, 03:51:12 pm »
0

Nice improvements.
I think the really useful thing to note here is that we have just improved such a basic strategy by 5%.
Would you get similar swings with optimised Greening on more complex strategies?
Also I assume green optimisation is match up dependent?

Logged
Twitch
1 Day Cup #1:Ednever

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4355
    • View Profile
    • WanderingWinder YouTube Page
Re: Big Money completely revised
« Reply #15 on: January 15, 2012, 04:02:22 pm »
0

Icidentally, with these optimizations, BM beats such things as... Chapel/Money! Of course, I'm sure sure that if it were optimized, it could win, but... that just goes to show you how bad Chapel actually is for BM......

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #16 on: January 15, 2012, 09:11:01 pm »
0

Has anyone considered the cards in play? If you've got 10$ to spend on turn 5 it might suggest that turn 6 is going to be quite poor.

I've also started looking at a 5/2 start compared to 4/3 and the 5/2 starts are considerably worse. If I start from the 4/3 model -  turn 6 province, turn 9 duchy over silver, turn 12 duchy+estate model; the 5/2 is improved by buying no duchies until turn 12 or is hardly worse for buying no provinces until turn 9! Has anyone else considered separate scripts for 4/3 and 5/2?
« Last Edit: January 15, 2012, 09:13:13 pm by DG »
Logged

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #17 on: January 17, 2012, 10:16:04 am »
+1

I think I've found the PPR. Buy a duchy if there are two provinces in the supply and you are 1 or 2 two points behind the opponent. It works in the narrow point range where a deficit is turned into an advantage. It could be a bigger or smaller range perhaps. Someone with a faster PC could undertake the hunt for for it. (Persuade yourself that this is as important as finding the higgs-boson).

This PPR rule gives a massive 0.5% advantage for big money but a fair 1.5% for a jack-of-all-trades deck.
Logged

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #18 on: January 17, 2012, 10:22:12 pm »
+1

I've had a further look at the PPR rule. It is pretty much as stated on the strategy site " If you are trailing, do not buy the second-to-last Province if you can instead purchase lesser Victory card(s) to take the lead." It you buy a lesser victory card to tie the scores as second player then you do create more tied results but also win less games yourself. The speed/quality of the deck affects the size of the advantage in a mirror game :

Long attack game (witch, militia) 0.4%
Pure money 0.5%
Smithy+treasure 0.8%
Jack of all trades 1.2%
Jack of all trades + fishing village 1.8%
My strongest non-attack script 3.5%

edit - I improved my strongest non-attack script - ppr now gives it 5% advanatage
« Last Edit: January 18, 2012, 10:28:36 pm by DG »
Logged

DG

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3991
  • Respect: +2541
    • View Profile
Re: Big Money completely revised
« Reply #19 on: February 07, 2012, 10:19:42 am »
0

Colony based big money script again based on turns.

Code: [Select]
<player name="4/3 Colony BMU (9-12-16)"
 author="DG"
 description="Buy colonies after the third reshuffle (turn 9)XXXXBuy provinces after the fourth reshuffle (turn 12)XXXXBuy duchies and estates after the fifth reshuffle (turn 16)XXXX">
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="UserCreated"/>
 <type name="Province"/>
 <type name="Bot"/>
   <buy name="Colony">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="16.0"/>
      </condition>
   </buy>
   <buy name="Platinum"/>
   <buy name="Province">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Logged

Cheese

  • Swindler
  • ***
  • Offline Offline
  • Posts: 16
  • Respect: +23
    • View Profile
Re: Big Money completely revised
« Reply #20 on: February 28, 2012, 06:15:59 pm »
0

Certainly there are nuances, and the ultimate player would incorporate many variables. But by FAR the most important consideration when buying money vs green has got be "How many more times do I expect to see this card?"

The gold vs province decision here affects the first green card you buy. It's based on future spending and it comes down to "How many more times will I draw this card I'm buying?". I'd hazard a guess that the previous condition, total treasure in deck > 18, is a slightly inaccurate tally of 6 turns buying silver/gold.

Precisely. Total treasure in deck > 18 means either 6 silvers or 3 silvers and 2 golds. Therefore to get a province on turn 6 by this criterion, you'd have to not only buy gold on turn 3 or 4, but also buy gold on turn 5, and THEN draw $8 for a province on turn 6. That would almost never happen. On the flip side, it's almost trivial that you will have bought at least $12 in money by turn 7 on a 4/3 split. So it turns out that "More than $18" is almost identical to "Wait until turn 7".

The interesting thing to look at is the VP per turn graphs for BMU vs BMU(turns)
They are very different so probably the cause of the improvement?

See, this is a really good idea. If you look at the VP graphs for these strategies, you see that the two strategies are, as discussed above, basically identical until after the turn 9 reshuffle. Any noticeable differences can only be due to behavior starting at turns 10-11-12. At this point, the threshold strategy VP graph slopes upward hard on turns 10-11-12, while the turns strategy is obviously about consistent on turns 10-11-12. I think it is dubious that you could get significant information on turns 10 or 11 that would strongly affect your decision on turn 12, UNLESS you see the province stack start to empty.


So maybe the turns bot needs to be fixed to green harder when the province pile depletes. Here's a bot that consistently beats the optimized threshold bot by a small margin and is far easier to understand. It was winning even before I added PPR. It should probably play 5/2 starts differently than it does.

Code: [Select]
<player name="Big Money Turns (with Endgame and PPR)"
 author="Cheese"
 description="A Big Money strategy that uses the turn number to dictate buys. It also adjusts for when a game is nearly over.">
 <type name="Province"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
 <type name="SingleCard"/>
 <type name="Optimized"/>
 <type name="UserCreated"/>
 <type name="Bot"/>
   <buy name="Province">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="1.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
         <extra_operation type="minus" attribute="6.0" />
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="greaterOrEqualThan" />
         <right type="countMAXOpponentVP"/>
      </condition>
   </buy>
   <buy name="Province">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="equalTo" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countVP"/>
         <operator type="smallerOrEqualThan" />
         <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="3.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.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="Estate">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="12.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Duchy">
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="9.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Turns is probably the best basic indicator of "How many times do I expect to see this card?" But, the other two main factors would be the economies of your deck AND that of your opponent. It would be interesting to something working on all three, or at least an economy-based bot that considered both your economy and your opponent's...
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4355
    • View Profile
    • WanderingWinder YouTube Page
Re: Big Money completely revised
« Reply #21 on: February 28, 2012, 06:58:03 pm »
0

There are a number of reasons I absolutely hate using the turns method. It's a terrible indicator of anything except in the first handful of turns, or if you know, like you do in the simulator, exactly what your opponent is doing. This is why my bot was doing better in almost every matchup than yours was, except the head-to-head.
However, the only real reason your thing is doing better is the PPR. I just stuck the PPR in mine, and it beats yours (extremely narrowly). Well, I expect the other reason yours has any kind of advantage is that it knows where it is in the reshuffle better because there's absolutely no interaction between it and the opponent whatsoever. Throw that interaction in, and your bot falls apart. Which means you can't learn almost anything from it that you can apply to a more useful situation.
Anyway, here's the bot that slightly beats yours:
Code: [Select]
<player name="Betterer Money Ultimate "
 author="WanderingWinder"
 description="The optimized strategy that buys only treasure.">
 <type name="Province"/>
 <type name="SingleCard"/>
 <type name="Optimized"/>
 <type name="TwoPlayer"/>
 <type name="Bot"/>
 <type name="UserCreated"/>
 <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="18.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="30.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="4.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="27.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.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="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="28.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="24.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
      <condition>
         <left type="getTotalMoney"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="23.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="Silver"/>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="3.0"/>
      </condition>
   </buy>
   <buy name="Copper">
      <condition>
         <left type="getTotalMoney"/>
         <operator type="smallerThan" />
         <right type="countAllCardsInDeck"/>
         <extra_operation type="minus" attribute="1.0" />
      </condition>
      <condition>
         <left type="countTurns"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="6.0"/>
      </condition>
   </buy>
</player>

Cheese

  • Swindler
  • ***
  • Offline Offline
  • Posts: 16
  • Respect: +23
    • View Profile
Re: Big Money completely revised
« Reply #22 on: February 28, 2012, 09:55:17 pm »
0

Yeah, I guess the PPR was the kicker. I see what you mean about interaction-based matchups (attacks etc.). The number of turns or even number of reshuffles won't be an indicator that is resilient to said matchups. I can see how a threshold-based approach would be more resilient.

Doing a pure threshold-based approach has some weird consequences, however, where significantly different decisions get made on, say the second turn before the 4th reshuffle versus the final turn before the 4th reshuffle. Unless the game state changes significantly between those turns (i.e. one of the last few provinces gets bought), we wouldn't want that. It's also basically inscrutable.

I guess the question becomes whether our goal is...
  • To make the very best possible all-purpose BM bot, which I would expect would base itself on your economy, your opponent's economy, endgame adjustments, and some sort of calibrator that treats every turn on a given pass through the deck as roughly equal
  • Or, to make a bot that illustrates a basic principle for learning. For this goal, the fewer rules and the fewer numbers, the better.

I suppose I can see value in both goals, each of which would lead to very different methodologies.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4355
    • View Profile
    • WanderingWinder YouTube Page
Re: Big Money completely revised
« Reply #23 on: February 28, 2012, 10:55:27 pm »
0

Yeah, I guess the PPR was the kicker. I see what you mean about interaction-based matchups (attacks etc.). The number of turns or even number of reshuffles won't be an indicator that is resilient to said matchups. I can see how a threshold-based approach would be more resilient.

Doing a pure threshold-based approach has some weird consequences, however, where significantly different decisions get made on, say the second turn before the 4th reshuffle versus the final turn before the 4th reshuffle. Unless the game state changes significantly between those turns (i.e. one of the last few provinces gets bought), we wouldn't want that. It's also basically inscrutable.

I guess the question becomes whether our goal is...
  • To make the very best possible all-purpose BM bot, which I would expect would base itself on your economy, your opponent's economy, endgame adjustments, and some sort of calibrator that treats every turn on a given pass through the deck as roughly equal
  • Or, to make a bot that illustrates a basic principle for learning. For this goal, the fewer rules and the fewer numbers, the better.

I suppose I can see value in both goals, each of which would lead to very different methodologies.

I think you can do both your goals to some extent.
I find it weird that you think the threshhold based approach has weirder consequences than the turn-based one; I guess we think differently.
As for the specific concerns you have - absolutely. You should also have considerations every step of the way for where you are in the reshuffle. In fact, I might go try and make one that's heavily where-in-the-reshuffle dependent, and see how it does....

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4733
  • Respect: +3323
    • View Profile
Re: Big Money completely revised
« Reply #24 on: February 29, 2012, 08:43:50 am »
0

Will the eventual winning bot be programmed into the next version of the simulator?

I would love to have a very competitive BMU bot to use as a starting point or as an excellent basic sparring partner.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea
Pages: [1] 2  All
 

Page created in 0.213 seconds with 21 queries.