Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 9 10 [11] 12 13  All

Author Topic: Dominiate: a Dominion simulator that runs on the Web  (Read 247817 times)

0 Members and 2 Guests are viewing this topic.

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #250 on: December 17, 2013, 09:20:15 am »
+1

I'm working on a BM Masquerade bot and trying to get it to not trash copper if it would be able to buy a Province that turn. I tried to add conditions to the trash priorities but it's not working. Here's the bot.

Code: [Select]
{
  name: 'BM Masquerade'
  requires: ['Masquerade']
  gainPriority: (state, my) ->
    [
      "Province" if my.getTotalMoney() > 15
      "Duchy" if state.gainsToEndGame() <= 5
      "Estate" if state.gainsToEndGame() <= 2
      "Gold"
      "Masquerade" if my.countInDeck("Masquerade") < 1
      "Silver"
    ]
   
  trashPriority: (state, my) -> [
      "Curse"
      "Estate" if state.gainsToEndGame() > 4
      "Copper" if my.getTotalMoney() > 4 \
               and my.getTreasureInHand() != 8 \
               and my.getTreasureInHand() != 6
      "Potion" if my.turnsTaken >= 10
      "Estate" if state.gainsToEndGame() > 2
    ]
}

It's not working, though. I still get situations like this...

Code: [Select]
== BM Masquerade's turn 10 ==
BM Masquerade plays Masquerade.
BM Masquerade draws 2 cards: [Gold, Copper].
BM Masquerade passes Copper.
BigSmithy passes Copper.
BM Masquerade trashes Copper.
BM Masquerade plays Copper.
BM Masquerade plays Copper.
BM Masquerade plays Silver.
BM Masquerade plays Gold.
Coins: 7, Potions: 0, Buys: 1
BM Masquerade buys Duchy.
BM Masquerade draws 5 cards: [Gold, Copper, Gold, Silver, Copper].

I've also tried the method getAvailableMoney() but that doesn't work either. Is it possible that the methods don't see the copper that has been passed to the Masquerade player? Or is there something wrong with the way I have defined the conditions.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #251 on: December 18, 2013, 04:56:33 am »
0

Is it possible that the methods don't see the copper that has been passed to the Masquerade player?
Just had a look pn the code of Masquerade, and the passed Copper should be in your hand when you choose to trash, so it should be seen...
Logged

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #252 on: December 18, 2013, 06:55:20 am »
0

Is it possible that the methods don't see the copper that has been passed to the Masquerade player?
Just had a look pn the code of Masquerade, and the passed Copper should be in your hand when you choose to trash, so it should be seen...

Is trashPriority not the appropriate way to handle these decisions then? Some cards have their own unique priority list for choices but I didn't see anything for Masquerade.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #253 on: December 18, 2013, 07:11:38 am »
+1

Ok, got it.

First, trashPriority is the right way to do it. You have to change it to
Code: [Select]
trashPriority: (state, my) -> [
      "Curse"
      "Estate" if state.gainsToEndGame() > 4
      "Copper" if my.getTotalMoney() > 4 \
               and my.getTreasureInHand() != 8 \
               and my.getTreasureInHand() != 6
      "Potion" if my.turnsTaken >= 10
      "Estate" if state.gainsToEndGame() > 2
     null
in order to get it to do what you want.  I would consider this maybe as a bug as it took me half an hour to find out, despite already knowing it.

What is happening is: trashPriority is used both when you are forced to trash and when you are allowed to trash.  Additionally, trashPriority is not the only function used to find out what you want/need to trash, but only the first one, there is trashValue as a fallback.  In your case, trashPriority returns no valid choice, therefore thrashValue is used.  trashValue always returns a choice, which is good as it is for the cases where you need to trash.  Therefore, you have to return some valid choice in trashPriority, null is a valid choice an indicates that you don't want to trash if none of your proposals fits.

I think that this maybe should be the default, because usually you list everything you want to trash and are kind of surprised if something else get trashed, and putting the null at the end of the list is something you often forget. So maybe we should put the null there automaticall and give an option for getting rid of it?
Logged

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #254 on: December 18, 2013, 08:29:54 am »
0

Ok, got it.

Excellent. Thanks for looking into that. I was wondering about the null choice but thought it was handled behind the scenes. Still got some optimization to do. This code only looks for potential Gold and Province buys but it should also look for Duchy buys at later points in the game.

The other thing I noticed about Masquerade, if I'm reading the code correctly, is that it also uses the trash priority and trash value functions to choose which card to pass. It seemed strange to me that there wasn't a separate priority list. The best card to trash is not always the best card to pass.
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #255 on: December 18, 2013, 10:14:49 am »
0

In your case, trashPriority returns no valid choice, therefore thrashValue is used.  trashValue always returns a choice, which is good as it is for the cases where you need to trash.  Therefore, you have to return some valid choice in trashPriority, null is a valid choice an indicates that you don't want to trash if none of your proposals fits.

I haven't looked at the actual code so it may not be an issue, but from your description I deduce that trashValue is called only when trashPriority does not return a valid choice, and since null is apparently a valid choice, it would allow you to trash nothing even if trashing is mandatory.
Logged

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #256 on: December 18, 2013, 11:38:24 am »
0

I started to code all sorts of different scenarios where you wouldn't want to trash a copper (like when you have $5 for a Duchy, but only late in the game when you're in Duchy mode) and it was getting really complicated. Then I found coinLossMargin and reduced many lines of code to a single expression. This significantly improves the BM Masquerade bot on Dominiate (buy rules were taken from Geronimoo's BM Masquerade bot).

Code: [Select]
# Big Money Masquerade bot.
#
# The bot plays a typical BM strategy with some intelligence on when to trash coppers.
# Basically, if there is an important buy available that needs every copper in hand,
# it passes on the trash ability.
{
  name: 'BM Masquerade'
  requires: ['Masquerade']
  author: 'vandergus'
  gainPriority: (state, my) ->
    [
      "Province"
      "Duchy" if state.countInSupply("Province") <= 4
      "Estate" if state.countInSupply("Province") <= 2
      "Gold"
      "Duchy" if state.countInSupply("Province") <= 5
      "Masquerade" if my.countInDeck("Masquerade") < 1
      "Silver"
    ]
   
  trashPriority: (state, my) -> [
      "Curse"
      "Estate" if state.gainsToEndGame() > 4
      "Copper" if this.coinLossMargin(state) > 0
      "Potion" if my.turnsTaken >= 10
      "Estate" if state.gainsToEndGame() > 2
      null
    ]
}

The only questionable play I saw in the logs was something like this.

Code: [Select]
== BM Masquerade's turn 11 ==
BM Masquerade plays Masquerade.
BM Masquerade draws 2 cards: [Estate, Province].
BM Masquerade passes Copper.
DoubleJack passes Copper.
BM Masquerade plays Gold.
BM Masquerade plays Gold.
BM Masquerade plays Copper.
BM Masquerade plays Copper.
Buying Province will cause BM Masquerade to lose the game
Coins: 8, Potions: 0, Buys: 1
BM Masquerade buys Duchy.
BM Masquerade draws 5 cards: [Copper, Gold, Gold, Copper, Silver].

The bot wanted to buy a Province so it didn't trash the 8th coin. But then ended up buying a Duchy instead because a Province would've ended in a loss. This seems like a rather small corner case.

Not sure about the null choice turning mandatory trashes into optional trashes. But in the above case, the Masquerade bot still passes a copper when, according to the trash priority list, it wouldn't if it didn't have to.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #257 on: December 18, 2013, 04:37:37 pm »
0

In your case, trashPriority returns no valid choice, therefore thrashValue is used.  trashValue always returns a choice, which is good as it is for the cases where you need to trash.  Therefore, you have to return some valid choice in trashPriority, null is a valid choice an indicates that you don't want to trash if none of your proposals fits.

I haven't looked at the actual code so it may not be an issue, but from your description I deduce that trashValue is called only when trashPriority does not return a valid choice, and since null is apparently a valid choice, it would allow you to trash nothing even if trashing is mandatory.
No, null is added to the se to valid choices by the function called for optional trashing, it should not be valid for mandatory trashing.

edit @vandergus: I think what you want is to see if trashing changes what your buy, not sure if there is a build-in function to do so. It's done a dozen times though, I always wanted to write a function for this, but I don't know if I did.  Look at  (iirc) Ill-gotten gains or Plaza.  If there exists a function, it should be used at Plaza, otherwise use hypothetical states to find out.

edit2: wantsToplaySpoils is also quite good to look at on how to use hypothetical states...
« Last Edit: December 18, 2013, 04:55:47 pm by DStu »
Logged

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #258 on: December 18, 2013, 07:40:53 pm »
0

In your case, trashPriority returns no valid choice, therefore thrashValue is used.  trashValue always returns a choice, which is good as it is for the cases where you need to trash.  Therefore, you have to return some valid choice in trashPriority, null is a valid choice an indicates that you don't want to trash if none of your proposals fits.

I haven't looked at the actual code so it may not be an issue, but from your description I deduce that trashValue is called only when trashPriority does not return a valid choice, and since null is apparently a valid choice, it would allow you to trash nothing even if trashing is mandatory.
edit @vandergus: I think what you want is to see if trashing changes what your buy, not sure if there is a build-in function to do so. It's done a dozen times though, I always wanted to write a function for this, but I don't know if I did.  Look at  (iirc) Ill-gotten gains or Plaza.  If there exists a function, it should be used at Plaza, otherwise use hypothetical states to find out.

edit2: wantsToplaySpoils is also quite good to look at on how to use hypothetical states...

That's kind of what coinLossMargin does. Not directly but indirectly. The problem is that it doesn't seem to account for buys that would lose the game. Which is weird because coinLossMargin calls getSingleBuyDecision which uses checkSuicide. So if you have $8 but a Province would lose you the game, getSingleBuyDecision should return Duchy, which in turn should give a coinLossMargin of $3, allowing a trash. I guess I need to run this in debug mode to figure out where I'm not getting the expected value. Not sure if I have the tools to do that on my computer.

I don't think Dominiator has Spoils or Plaza. I couldn't ctrl-f them in cards.coffee.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #259 on: December 19, 2013, 02:41:02 am »
0

Logged

vandergus

  • Swindler
  • ***
  • Offline Offline
  • Posts: 17
  • Respect: +4
    • View Profile
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #261 on: March 02, 2014, 01:09:10 pm »
0

Pull request for Hunting Grounds.
Fixed a bug with Saboteur that didn't trigger onTrashEffects
Gave a standard method to basicAI for wantsToJM


I suspect that there are some more cards that trash but don't trigger onTrashEffects, as sometimes no standard method is used to trash, but the card is just moved to the trash by hand.  Sawn this for Mint and Rebuild, I think it is the case when cards are trashed from non-standard locations, as in this cases I have not seen a genric trash method that does the job. Esp. Mint/Feodum would be important...
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #262 on: April 06, 2014, 12:41:47 pm »
+2

I've noticed that JoaT is implemented suboptimally: Jack discards an Estate or Curse when it has none in hand, instead it should usually draw and trash it (at least in the early game):

Quote
== DoubleJack's turn 6 ==
DoubleJack plays Jack of All Trades.
DoubleJack gains Silver.
DoubleJack reveals and discards Estate.
DoubleJack draws 1 cards: [Copper].
DoubleJack plays Copper.
DoubleJack plays Copper.
DoubleJack plays Copper.
DoubleJack plays Silver.
Coins: 5, Potions: 0, Buys: 1
Coin Tokens left: 0
DoubleJack buys Silver.
(DoubleJack shuffles.)
DoubleJack draws 5 cards: [Copper, Copper, Copper, Gold, Silver].

This is especially bad behaviour in games against Cursers; no wonder DoubleJack currently loses to Witch and Mountebank...
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #263 on: April 06, 2014, 03:56:05 pm »
+3

I've noticed that JoaT is implemented suboptimally: Jack discards an Estate or Curse when it has none in hand, instead it should usually draw and trash it (at least in the early game):

I've now tried a more reasonable discard strategy by adding

Quote
 
discardPriority: (state, my) -> [
    "Estate" if my.countInHand("Estate")+ my.countInHand("Curse")  > 0 \
    or state.countInSupply("Province") < 6 or my.coins=7
    "Curse" if my.countInHand("Estate")+ my.countInHand("Curse")  > 0 \
    or state.countInSupply("Province") < 3 or my.coins=7
    "Copper"
    "Province"
    "Duchy"
    "Jack of All Trades"
    null
 ]

to the DoubleJack bot. The improvement is astonishing: The win rate against BankWharf increases from 36% to 55%, it now wins 53-47 against DoubleWitch, 67-33 against DoubleMountebank.
And it wins 58-42 against Rebuild!!! Am I dreaming? :o I've let the simulator play 5,000 games to be sure. DoubleJack even beats RebuildRogue, RebuildHorse and RebuildDuke by 54-46 or better.

Does the discardPriority function I added mess something up with the opponent's strategy, or is Rebuild really worse than Jack when both are played reasonably (and without Shelters/Colonies)?
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #264 on: April 06, 2014, 04:18:13 pm »
+2

It should still lose against RebuildJack (add the updated strategy there as well), which is the only sensible comparison.
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #265 on: April 06, 2014, 05:10:22 pm »
0

It should still lose against RebuildJack (add the updated strategy there as well), which is the only sensible comparison.

It does lose (even without the updating), but still I'm baffled by this result.
(I wouldn't call this the only reasonable comparison; on a board with Rebuild, Jack and a "better" Rebuild support like Horse Traders, I would have ignored Jack prior to this simulation.)
My impression was that almost everyone considered Rebuild to be the better 1-card BM strategy. Probably (?!) Rebuild remains the stronger card against engines due to the Duchy depletion, but still...
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #266 on: April 07, 2014, 06:30:18 am »
+1

It should still lose against RebuildJack (add the updated strategy there as well), which is the only sensible comparison.

It does lose (even without the updating), but still I'm baffled by this result.
(I wouldn't call this the only reasonable comparison; on a board with Rebuild, Jack and a "better" Rebuild support like Horse Traders, I would have ignored Jack prior to this simulation.)
My impression was that almost everyone considered Rebuild to be the better 1-card BM strategy. Probably (?!) Rebuild remains the stronger card against engines due to the Duchy depletion, but still...

I suspect that what SCSN means is that on any board in which Double-Jack can face Rebuild-X, one of the options is Rebuild-Jack.
Logged
Salvager Extension | Isotropish Leaderboard | Game Data | Log Search & other toys | Salvager Bug Reports

Salvager not working for me at all today. ... Please help! I can't go back to playing without it like an animal!

MarkowKette

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 213
  • Respect: +217
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #267 on: April 07, 2014, 11:53:54 am »
0

I am actually not surprised at all of this result. Adding those rules to the Jack play has to be a big improvement. And Jack is already a very strong BM enabler that was reasonably close in power to rebuild strategies before. SCSN is of course very right about Jack also being a Prime Rebuild enabler (better than e.g. Horse Traders) As rebuild synergizes pretty well with Jack and a normal double Jack will spend $5 on a Silver in the early to midgame where a Rebuild instead is a lot more powerfull.
I wonder how a  double Jack strategy that still buys Gold on 6 (early-to-mid) and just adds rebuilds on 5 would compete with a more rebuild focused Rebuild/JAck.

What i don't really understand is why double Witch has a higher win-rate against double Jack than double Mountemank as you will block Mountebanks less often after the play-rules improvement. I guess there is a good reason for this (given such a huge difference in the win rates) but i can't see it right now.
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11808
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12846
    • View Profile
    • Birds of Necama
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #268 on: April 07, 2014, 12:01:15 pm »
0

I am actually not surprised at all of this result. Adding those rules to the Jack play has to be a big improvement. And Jack is already a very strong BM enabler that was reasonably close in power to rebuild strategies before. SCSN is of course very right about Jack also being a Prime Rebuild enabler (better than e.g. Horse Traders) As rebuild synergizes pretty well with Jack and a normal double Jack will spend $5 on a Silver in the early to midgame where a Rebuild instead is a lot more powerfull.
I wonder how a  double Jack strategy that still buys Gold on 6 (early-to-mid) and just adds rebuilds on 5 would compete with a more rebuild focused Rebuild/JAck.

What i don't really understand is why double Witch has a higher win-rate against double Jack than double Mountemank as you will block Mountebanks less often after the play-rules improvement. I guess there is a good reason for this (given such a huge difference in the win rates) but i can't see it right now.
In the late game, the Coppers are somewhat useful for big money. Maybe that has something to do with it.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #269 on: April 07, 2014, 12:17:54 pm »
0

Because Witch is just the better card?

Its cycling ensures that you play it more often and as long as your money density exceeds 1 its benefits to you are greater than Mountebank's.
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #270 on: April 07, 2014, 02:15:07 pm »
0

It should still lose against RebuildJack (add the updated strategy there as well), which is the only sensible comparison.

It does lose (even without the updating), but still I'm baffled by this result.
(I wouldn't call this the only reasonable comparison; on a board with Rebuild, Jack and a "better" Rebuild support like Horse Traders, I would have ignored Jack prior to this simulation.)
My impression was that almost everyone considered Rebuild to be the better 1-card BM strategy. Probably (?!) Rebuild remains the stronger card against engines due to the Duchy depletion, but still...

I suspect that what SCSN means is that on any board in which Double-Jack can face Rebuild-X, one of the options is Rebuild-Jack.

That's true, of course; but my point was that the relative strength of Rebuild and Jack can still matter if there's good enough support for one of the two that you can ignore the other. E.g. I could now imagine Jack-Mystic to be stronger than RebuildJack; so Rebuild may be ignorable on a sizable number of BM boards containing Jack.

I am actually not surprised at all of this result. Adding those rules to the Jack play has to be a big improvement. And Jack is already a very strong BM enabler that was reasonably close in power to rebuild strategies before. SCSN is of course very right about Jack also being a Prime Rebuild enabler (better than e.g. Horse Traders) As rebuild synergizes pretty well with Jack[...]
I don't think Rebuild and Jack synergize at all - the advantage of drawing an additional card when the two collide should be more than offset by the facts that Rebuild doesn't want Jack to trash all Estates, and the risk of drawing Rebuild dead with Jack; also the Silvers dilute the Rebuilds. But apparently Jack is strong enough that it still helps another card with which it has slight anti-synergy. That's why I had thought Horse Traders would be better support, because it does synergize with Rebuild (giving an almost guaranteed $5).

What i don't really understand is why double Witch has a higher win-rate against double Jack than double Mountemank as you will block Mountebanks less often after the play-rules improvement. I guess there is a good reason for this (given such a huge difference in the win rates) but i can't see it right now.
I expected this from the Rebuild comparisons: DoubleWitch is one of the very few single-card strategies that beats Rebuild, while Rebuild beats DoubleMountebank. I think Witch is just the better BM card (as Awaclus and SCSN said).

I was also surprised to see that the improved DoubleJack seemed to beat most strategies even better in Colony games (adding the "vanilla" Colony/Plat. gain rules), but there seems to be a serious bug in the simulator for these games; DoubleJack "cheats" by sometimes getting 7 extra Coins from nowhere every few turns (no Coin token cards available):

Quote
(DoubleJack shuffles.)
[...]
Tableau: [Jack of All Trades, Smithy, Spice Merchant, Remodel, Jester, Vault, Treasury, Ambassador, Familiar, Bishop, Colony, Platinum, Potion]

[...]
== DoubleJack's turn 5 ==
DoubleJack plays Jack of All Trades.
DoubleJack gains Silver.
DoubleJack reveals and discards Copper.
DoubleJack draws 1 cards: [Jack of All Trades].
DoubleJack plays Copper.
DoubleJack plays Copper.
DoubleJack plays Silver.
DoubleJack plays Silver.
Coins: 13, Potions: 0, Buys: 1
Coin Tokens left: 0
DoubleJack buys Platinum.
DoubleJack draws 5 cards: [Estate, Copper, Copper, Copper, Copper].
[...]
== DoubleJack's turn 8 ==
DoubleJack plays Jack of All Trades.
DoubleJack gains Silver.
DoubleJack reveals and discards Copper.
DoubleJack draws 1 cards: [Copper].
DoubleJack plays Silver.
DoubleJack plays Platinum.
DoubleJack plays Copper.
DoubleJack plays Copper.
DoubleJack plays Copper.
Coins: 17, Potions: 0, Buys: 1
Coin Tokens left: 0
DoubleJack buys Colony.
DoubleJack draws 5 cards: [Silver, Copper, Copper, Silver, Jack of All Trades].

[...]

== DoubleJack's turn 9 ==
DoubleJack plays Jack of All Trades.
DoubleJack gains Silver.
(DoubleJack shuffles.)
DoubleJack reveals and discards Copper.
DoubleJack draws 1 cards: [Platinum].
DoubleJack plays Silver.
DoubleJack plays Silver.
DoubleJack plays Copper.
DoubleJack plays Copper.
DoubleJack plays Platinum.
Coins: 18, Potions: 0, Buys: 1
Coin Tokens left: 0
DoubleJack buys Colony.
DoubleJack draws 5 cards: [Colony, Copper, Copper, Silver, Copper].
[...]
Logged

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1708
  • Respect: +1788
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #271 on: April 07, 2014, 02:17:05 pm »
0

Because if you are buying only Mountebanks and treasure, you should buy more than 2 Mountebanks?
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #272 on: April 07, 2014, 02:49:23 pm »
+1

Maybe I should also clarify that my surprise was not just that Jack beats Rebuild decisively, but that (unlike Rebuild) it beats practically every other BM strategy (the only defeat is against bane-less Young Witch, and very narrowly - about 48-52). The (oldish) common wisdom expressed in the Jack articles by theory and HME:

Quote from: theory, http://dominionstrategy.com/2011/12/05/hinterlands-jack-of-all-trades/
...[it] goes toe-to-toe with DoubleMountebank and DoubleWitch.

If you go in the simulator and pit single-card strategies against each other, [Double]Jack is going to win a lot. As far as I can tell, it only loses to Young Witch, Witch, Mountebank, Wharf, Masquerade, and Courtyard.

is apparently almost completely wrong; DoubleJack does beat all these other cards decisively, except Young Witch (unless their Dominiate strategies should all turn out to be as badly suboptimal as Jack's). So these articles (AdamH says of theory's that it "reflected the mentality of that time, which was that Jack [...] was overpowered[...]") still substantially underestimate Jack's power!

And the simulation results are for Estate games only - with Shelters DoubleJack should be even stronger. Only with (correctly implemented) Colonies might the other cards stand a chance...
Logged

MarkowKette

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 213
  • Respect: +217
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #273 on: April 07, 2014, 04:36:26 pm »
0

Because Witch is just the better card?

Its cycling ensures that you play it more often and as long as your money density exceeds 1 its benefits to you are greater than Mountebank's.

I really have to disagree here. Yes it cycles faster. No that doesn't mean you will play more Witches!
You can draw the second Witch dead and they miss the reshuffle more often. I'm pretty sure both of those reasons together lead to you playing the card less often than if it were a Mountebank.

And to Witch being the better card overall: Mountebank destoys engine possibilities a lot more than Witch does.

@Holger i'm pretty sure they synergize very well. Yes you don't want to trash your estates but gaining Silvers is very good for your deck and having a 5 card hand even if you played a rebuild and your silvergaining card is really nice as it increases the chance of hitting 5 on a turn you played your rebuild drastically. I think the small filter option Jack gives alone nearly makes up for the small chance of drawing rebuild dead with it.
« Last Edit: April 07, 2014, 04:46:31 pm by MarkowKette »
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #274 on: April 10, 2014, 05:52:07 pm »
+3

I've noticed that JoaT is implemented suboptimally: Jack discards an Estate or Curse when it has none in hand, instead it should usually draw and trash it (at least in the early game):

I've now tried a more reasonable discard strategy by adding

Quote
 
discardPriority: (state, my) -> [
    "Estate" if my.countInHand("Estate")+ my.countInHand("Curse")  > 0 \
    or state.countInSupply("Province") < 6 or my.coins=7
    "Curse" if my.countInHand("Estate")+ my.countInHand("Curse")  > 0 \
    or state.countInSupply("Province") < 3 or my.coins=7
    "Copper"
    "Province"
    "Duchy"
    "Jack of All Trades"
    null
 ]

to the DoubleJack bot. The improvement is astonishing: The win rate against BankWharf increases from 36% to 55%, it now wins 53-47 against DoubleWitch, 67-33 against DoubleMountebank.
And it wins 58-42 against Rebuild!!! Am I dreaming? :o I've let the simulator play 5,000 games to be sure. DoubleJack even beats RebuildRogue, RebuildHorse and RebuildDuke by 54-46 or better.

Does the discardPriority function I added mess something up with the opponent's strategy, or is Rebuild really worse than Jack when both are played reasonably (and without Shelters/Colonies)?
I was also surprised to see that the improved DoubleJack seemed to beat most strategies even better in Colony games (adding the "vanilla" Colony/Plat. gain rules), but there seems to be a serious bug in the simulator for these games; DoubleJack "cheats" by sometimes getting 7 extra Coins from nowhere every few turns (no Coin token cards available):
[...]

It seems I WAS dreaming, and the bug was in my own code (and not just in Colony games, apparently): "my.coins=7" sometimes sets the player Coins count from 0 to 7 in spite of being in an if clause; it should read "my.coins==7" instead. When fixing this, DoubleJack does lose against Rebuild and DoubleWitch.
(My improvement only increases the win rate by 0-4%, far from enough.)
« Last Edit: April 10, 2014, 06:03:36 pm by Holger »
Logged
Pages: 1 ... 9 10 [11] 12 13  All
 

Page created in 0.184 seconds with 21 queries.