Dominion Strategy Forum

Please login or register.

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

Author Topic: Best strategy for a certain kingdom  (Read 7150 times)

0 Members and 1 Guest are viewing this topic.

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Best strategy for a certain kingdom
« on: May 31, 2014, 12:56:26 pm »
+3

Hello,

I've played just a couple of Dominion games but I already find it increasingly addicting. Recently I discovered Dominiate  at http://rspeer.github.com/dominiate/play.html - a wonderful tool for exploring intricacies of alternative strategies. Since my first buy was Dominion: Intrigue, the obvious choice for the first game was Victory Dance. One question which occurred to me is can we find an optimal or at least suboptimal strategy for any arbitrarily chosen set of 10 kingdom cards? I know it is a newbie question, it can be considered, however, also a challenge. This is the strategy which I discovered in my 3rd game and then reimplemented in Dominiate:

Code: [Select]
{
  name: 'VictoryDance'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 2
      "Duchy"
      "Duke" if my.countInDeck("Duchy") > 4
      "Province"
      "Nobles" if my.countInDeck("Harem") > 3 and my.countInDeck("Nobles") < 2
      "Gold"
      "Harem" if my.getTotalMoney() > 10
      "Silver"
    ]
}


It beats BigMoney@WebDominate strategy (94% victory rate), but my question is are there any better strategies?

Regards,
nork
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #1 on: May 31, 2014, 01:10:52 pm »
+1

First welome to the forums.

Optimal strategy always also depends on your opponent, against BM I would guess that you want to get more Duchies before Dukes, or let the question depend on the Provinces left, not on Duchies in your deck.  In a mirror you don't want the condition #Duchy > 4, as you don't take Duke then if you lose the split.

I would guess the Ironworks don't do much for you here, you don't have cards for $4 to gain beside Silver, in which case the Ironworks is a terminal Copper which gains a Silver.  Bridge will certainly be a better choice here.
Otoh, yo might want to gain Great Halls with your IW (which you don't), this sounds strong but usually is not that great, especially as there are lots of other victory cards around.  But if you gain IW, you certainly want to gain GH over Silver once you got some Silvers. Also, with all these VPs, Scout might beat Silver somewhen.
Also some Estate gaining rule for the endgame might help a bit.


There might also be an engine in here as there is lots of time to catch up BigMoney with these trillions points flying around, but I have to leave....
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #2 on: May 31, 2014, 01:38:39 pm »
0

@DStu: thanks for the preliminary analysis. Indeed, I'm already aware that it all depends on your opponent. My initial virtual opponent was BigMoney strategy based on WanderingWinder's forum posts http://forum.dominionstrategy.com/index.php?topic=625. I also know that the expected success rate of a particular strategy usually decreases when the number of opponents increases.

I chose IW as one of my first buys since it allows to perform useful gain [treasury] actions. This choice seems to be confirmed by Dominiate simulations against the (one I tested)  BigMoney strategy. When IW is not bought, the success rate drops from 93.5% to 66.5%. Let me also explain this condition on the number of Duches: I find it more profitable to buy Dukes once they bring me more VP than an equally-priced buy of a Duchy.

I must admit that I also tried several combinations with Scout, GH and Nobles but I was unable to discover any working engines with them.
« Last Edit: May 31, 2014, 01:40:31 pm by norkbes »
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11177
  • Shuffle iT Username: Awaclus
  • (。 ω 。`)
  • Respect: +11853
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #3 on: May 31, 2014, 01:56:10 pm »
0

I find it more profitable to buy Dukes once they bring me more VP than an equally-priced buy of a Duchy.
It is generally more profitable to keep buying Duchies until the Duchies are gone, because your opponent might want to get some Duchies too, but if you manage to gain most of the Duchies, your opponent won't want any Dukes (unless he buys them just to deny them from you).
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #4 on: May 31, 2014, 02:09:57 pm »
0

@Awaclus: Actually my initial strategy prioritizes buying Duchies first. I've just inspected Dominiate logs which confirm that. I must admit it was unintended by me but buying the highest possible number of Duchies results in huge bonus in VP earned by Dukes. While inspecting simulations logs I also discovered that the second part of my strategy comprising Harem/Nobles does not come into play, since the game terminates usually with Dukes/Duches/Estates piles empty. Thus, one possible strategy which might exploit this vulnerability would focus on buying Duchies instead Provinces.
Logged

amalloy

  • Witch
  • *****
  • Offline Offline
  • Posts: 453
  • Respect: +619
    • View Profile
    • Twitch stream
Re: Best strategy for a certain kingdom
« Reply #5 on: May 31, 2014, 02:17:50 pm »
+2

Let me also explain this condition on the number of Duchies: I find it more profitable to buy Dukes once they bring me more VP than an equally-priced buy of a Duchy.

But if you only have four Duchies, and there's another one left in the supply, buying a Duke is worth less VP than a Duchy: you just have to think ahead a bit.

  • The Duke is worth 4VP now, and will continue to be worth 4 forever if you never go back to Duchies, as your plan suggests.
  • The Duchy is worth 3VP now, but will be worth one additional VP per Duke you buy, because it powers them up. We can assume you'll be buying at least two Dukes (otherwise this Duchy/Duke plan is awful), so the fifth Duchy is worth more than a Duke would have been.

For example, let's say you have four Duchies and no Dukes, and you have time for five more gains before the end of the game. How many Dukes should you get?

  • The four remaining Duchies and one 8-point Duke, for 20 points
  • Three Duchies and two 7-point Dukes, for 23 points
  • Two Duchies and three 6-point Dukes, for 24 points
  • One Duchy and four 5-point Dukes, for 23 points
  • No Duchies, just five 4-point Dukes, for 20 points

Generally the more gains you have left, the more you should focus on Duchies. Only go into Dukes if you have to because the game is ending imminently and you need the short-term points.
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #6 on: May 31, 2014, 02:35:09 pm »
0

@amalloy: You are absolutely right. Thanks for great explanation and a possible Duchy/Duke scenario in the end game.

To somehow summarize discussion on Duke/Duchies I provide below the modified/pruned version of my initial strategy. It is almost as good as the initial one (a slightly worse performance seems to be the consequence of getting rid of Harems in the constructed deck):

Code: [Select]
{
  name: 'VictoryDance'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 2
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Silver"
    ]
}
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #7 on: May 31, 2014, 03:14:19 pm »
0

@iwn
Yoiu are probably right, the dexk turns mostly into a duchy/duje slog, a silver gainer is a good card there. Got  disteracted by the nobles/harems, but they are mostly irrelevant it bseems
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #8 on: May 31, 2014, 03:36:27 pm »
0

@DSTu: Indeed Nobles/Harem seems irrelevant in this strategy. Nonetheless, your earlier remark with advantages of GH over Silver actually improves strategy, i.e. the one below is better then the pruned one and BigMoney. Bridge on the other hand doesn't work well since playing IW and gaining Duchy gives you the additional card which seems to improve the way this slog works..

Code: [Select]
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 2
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Silver"
    ]
}
Logged

amalloy

  • Witch
  • *****
  • Offline Offline
  • Posts: 453
  • Respect: +619
    • View Profile
    • Twitch stream
Re: Best strategy for a certain kingdom
« Reply #9 on: May 31, 2014, 03:53:54 pm »
0

@DSTu: Indeed Nobles/Harem seems irrelevant in this strategy. Nonetheless, your earlier remark with advantages of GH over Silver actually improves strategy, i.e. the one below is better then the pruned one and BigMoney. Bridge on the other hand doesn't work well since playing IW and gaining Duchy gives you the additional card which seems to improve the way this slog works..

Code: [Select]
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 2
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Silver"
    ]
}

I don't think Gold belongs on this list at all. If you've piled out Duchy and Duke already, you don't want Gold for 6 - you want to end the game as soon as possible, probably on Great Halls.
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #10 on: May 31, 2014, 04:12:23 pm »
0

@amalloy: Gold gives a slight advantage. A bot without Gold vs. the one with Gold for 1000 randomized games gives 47.3% to 52.7% win rate.
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #11 on: May 31, 2014, 04:26:28 pm »
0

The best so far:

Code: [Select]
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 3
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Silver"
    ]
}

The number of IW seems optimal, i.e. better than 2 or 4.

I think the strategy involving IW, Silver, Duchies/Dukes, GH works very well but I'm wondering whether an experienced player could suggest an alternative engine, rush or big money strategies so that beginner players like me could grasp some ideas between various game playing styles. The series of posts by WanderingWinder (http://dominionstrategy.com/2013/01/21/the-five-fundamental-deck-types-introduction/) is excellent but I think it's adventurous to match theory with practice.. My idea with Victory Dance is not original, it was hugely inspired by the excellent post of Geronimoo on building the first dominion engine: http://dominionstrategy.com/2012/07/30/building-the-first-game-engine/.
« Last Edit: May 31, 2014, 04:27:49 pm by norkbes »
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 323
  • Shuffle iT Username: Ephesos
  • Respect: +266
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #12 on: June 01, 2014, 12:56:29 pm »
+1

I think you should probably have something that takes into account who you're facing, e.g. by keeping track of supply piles or something. For instance, here's a mirror bot that wins against yours 52% of the time, simply by winning the Great Hall split.
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'Ephesos'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 3
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Great Hall" if my.countInDeck("Great Hall") <=4 and state.supply[c["Great Hall"]] == 1
      "Silver"
    ]
}
That's the issue, though, with an optimal strategy: the existence of a counter strategy. Winning the Great Hall split isn't as important against a Bridge engine, or really anything that won't be won by a 2 point swing. But by optimizing the point distribution of your possible cases, you can beat someone even with a lower average score.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #13 on: June 01, 2014, 01:08:33 pm »
+1

I think the slog is the way to go here. BigMoney-Masq seems to lose, and that's probably the strongest BM (esp. against a slog) on this board.
The enigne: Bridge megaturn is out of the question, you can play at most 4 Bridges per turn (3 from a 5 card hand with 2 Nobles, for a 7 card hand with 3 Nobles you need 4 more Nobles), that's not really a megaturn.  Beside Bridge there is no real payload, weak draw, very weak village. Decent trashing and gainers.  No string cantrips. The only thing that is close to an attack is Masquerading Curses, which might be a thing but still getting the drawing done is very expensive and thus it take long until this starts running.  And the slog should have some resilence against this by getting more IWs.

So I would say, optimizing the slog is optimizing the kingdom.

:e I man, there might be somone who can pull an engine here, but I doubt it can be put into a formula.  Better chances to again look on BigMoney and optimize on countering the slog...

« Last Edit: June 01, 2014, 01:18:15 pm by DStu »
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #14 on: June 01, 2014, 04:27:42 pm »
0

@ephesos: thx for pointing out the counter strategy here. The Duke/Duchy slog with IW Silver gainer seems to be hard to beat for this particular kingdom, so keeping track on piles might actually give you advantage.

@DStu: uff, that's deep. I've just realized I need to read more to actually understand fully what you mean :) Your analysis of the potential application of Bridge with Nobles in a megaturn strategy explains why I failed to construct a successful engine with them.
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7134
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #15 on: June 01, 2014, 04:37:36 pm »
+1

The enigne: Bridge megaturn is out of the question, you can play at most 4 Bridges per turn (3 from a 5 card hand with 2 Nobles, for a 7 card hand with 3 Nobles you need 4 more Nobles), that's not really a megaturn.

With enough Great Halls and Nobles Scout becomes pretty decent draw. I'm not sure it's enough to pull it off, especially since Duchy-Duke is so strong and the engine just can't get (m)any Duchies, but it's at least something to consider.
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2121
  • Respect: +2650
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #16 on: June 01, 2014, 05:08:26 pm »
0

I'd suspect the Duchy/Duke strategy is better, but it's worth remembering that with 2 Bridges out you can IW Nobles and have it act like a cantrip. The problem is that it takes a long time to set up when you need Nobles as the village, and as the +Cards because you won't be able to play Masq safely forever. You might be able to get something out of Upgrading $4 costs gained from Ironworks up to $6, potentially through Duchy if you want to try deny them, but you'd probably want to turn $4s into Upgrades anyways.

Again, still feels implausible, IW is pretty good support when gaining Silvers. But I'd still go for it, because it's neat. Probably something like...open Masq/Silver to get $5 more consistently, pick up IW asap? I think IW/Masq isn't good enough to hit the early $5, as much as you want IW early to get lots of Great Halls.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11177
  • Shuffle iT Username: Awaclus
  • (。 ω 。`)
  • Respect: +11853
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #17 on: June 01, 2014, 05:22:56 pm »
0

I'd suspect the Duchy/Duke strategy is better, but it's worth remembering that with 2 Bridges out you can IW Nobles and have it act like a cantrip. The problem is that it takes a long time to set up when you need Nobles as the village, and as the +Cards because you won't be able to play Masq safely forever.
Sounds very clumsy, and you need a lot of Nobles for that, which means that there won't be that many left for you to gain when you finally manage to pull it off.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 323
  • Shuffle iT Username: Ephesos
  • Respect: +266
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #18 on: June 02, 2014, 01:04:00 am »
0

Code: [Select]
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'Ephesos'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 3
      "Duchy"
      "Duke"
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Great Hall" if my.countInDeck("Great Hall") <=4 and state.supply[c["Great Hall"]] == 1
      "Silver"
      "Pawn"
    ]
}
Pawn is never a bad card to have, if you've gotten a 5/2 split. If only you could teach the AI things like using it for +Card/+Action when you have an Ironworks left in your deck and +Card/+Coin when you don't... I looked at the logs and it keeps drawing Ironworks with 4 Copper/Pawn, among various other bad decisions. Oh well, it's better than the friends I play with, at least(and probably me, when I'm not thinking too hard).
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #19 on: June 02, 2014, 11:34:20 am »
0

While Duke/Duchy slog is difficult to beat, I've thought I might think about making actions more versatile, i.e. to find a way to gain treasure cards, possibly without IW. Below is a simple strategy which has a slightly worse performance compared to the BigMoney but on the other hand it beats VictoryDance-GH  in almost 63.5% (10k games). VictoryDance-PUB seems to more "reasonably" spend income from treasury cards by playing proper action cards.

Code: [Select]
{
  name: 'VictoryDance-PUB'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'norkbes'
 
  gainPriority: (state, my) ->
    [
      "Pawn" if my.countInDeck("Pawn") < 3 and my.getAvailableMoney() < 3
      "Bridge" if my.countInDeck("Bridge") < 1 and my.getAvailableMoney() < 5
      "Upgrade" if my.countInDeck("Upgrade") < 1
      "Province" if my.getAvailableMoney() > 7
      "Duchy"
      "Duke"
      "Province"
      "Nobles"
      "Harem" if state.gainsToEndGame() < 5
      "Great Hall" if state.gainsToEndGame() < 5
      "Silver"
      "Estate" if state.gainsToEndGame() < 4
      "Bridge"
    ]

  trashPriority: (state, my) ->
    [
      "Curse"
      "Pawn"
      "Estate"
      "Copper"
      "Bridge"
      "Upgrade"
    ]
}

I don't think the above strategy is optimal but it shows nice cooperation of Pawn/Bridge/Upgrade cards. A short summary on performance (win rate of the first strategy is given) of various strategies (results for 1k games):

 VictoryDance-GH vs BigMoney: 97.7%
 VictoryDance-PUB vs BigMoney: 87.0%
 VictoryDance-PUB vs VictoryDance-GH: 63.8%

The cards used in trashingPriority which are not in gainPriority have probably no influence how the strategy works but for some reasons limiting trashingPriority set only to gainPriority cards results in slightly lower win-rate (2% or so).
« Last Edit: June 03, 2014, 03:39:23 am by norkbes »
Logged

amalloy

  • Witch
  • *****
  • Offline Offline
  • Posts: 453
  • Respect: +619
    • View Profile
    • Twitch stream
Re: Best strategy for a certain kingdom
« Reply #20 on: June 02, 2014, 02:46:03 pm »
0

The cards used in trashingPriority which are not in gainPriority have probably no influence how the strategy works but for some reasons limiting trashingPriority set only to gainPriority cards results in slightly lower win-rate (2% or so).

Well, i'm certain that putting "Masquarade" in the list makes no difference, since that's not a card that exists. But if any of the cards make a difference, it's because you occasionally get a four-cost into your deck by trashing a three-cost at a time when your gain priorities don't include Bridge. It's rare, because you don't Upgrade three-costs very often, but when you do you end up picking up a junk card. Instead of adding junk cards to your trash priorities, add Bridge to the end of your gain priorities: if you put it after Silver, this won't ever cause you to buy any more of them, but it will lead you to Upgrade into Bridge instead of into total junk.
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #21 on: June 03, 2014, 03:38:43 am »
0

Well, i'm certain that putting "Masquarade" in the list makes no difference, since that's not a card that exists.

Typo fixed. Thanks for pointing at it.

Somewhat surprisingly, the occasional presence of Masquerade seems to be benficial to the deck. Adding Bridge to the end of the gainPriority list and removing from trashPriority list $4 cards doesn't improve performance of VictoryDance-PUB but nonetheless makes it simpler.
« Last Edit: June 03, 2014, 03:45:04 am by norkbes »
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 323
  • Shuffle iT Username: Ephesos
  • Respect: +266
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #22 on: June 03, 2014, 03:09:53 pm »
0

Code: [Select]
{
  name: 'VictoryDance-PUB'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'Ephesos'
 
  gainPriority: (state, my) ->
    [
      "Pawn" if my.countInDeck("Pawn") < 3 and my.getAvailableMoney() < 3
      "Bridge" if my.countInDeck("Bridge") < 1 and my.getAvailableMoney() < 5
      "Upgrade" if my.countInDeck("Upgrade") < 1
      "Province" if my.getAvailableMoney() > 7
      "Duchy"
      "Duke"
      "Province"
      "Nobles"
      "Harem" if state.gainsToEndGame() < 5
      "Great Hall" if state.gainsToEndGame() < 5
      "Silver"   
      "Estate" if state.gainsToEndGame() < 4
      "Bridge"
    ]

  trashPriority: (state, my) ->
    [
      "Curse"
      "Estate" if state.gainsToEndGame() > 4
      "Pawn"
      "Copper"
      "Bridge"
      "Upgrade"
    ]
}
Minor improvement: You want to trash Estate before Pawn(especially early on), and you don't want to do so near the end, when the point matters.
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #23 on: June 04, 2014, 03:56:54 am »
0

What do you think of playing the combo: Ironworks-Scout-Great Hall, notably: the combo of the day #22. In comments to theory's article on that combo there is description of an interesting strategy: http://dominionstrategy.com/2011/01/11/combo-of-the-day-22-ironworksscoutgreat-hall/#comment-175516 which unfortunately I'm not able to implement in Dominiate, more specifically I cannot enforce correct actionPriority. According to comments in the Dominiate sources, actionPriority has been replaced by ai_playValue property of each card. Ironworks is considered a terminal action (115 (IW) < 270 (M)) and for that reason, if there are both M/IW in Hand, IW is never played. Below you will find my incomplete "translation" of Samuel Kalkin's strategy.

Code: [Select]
{
  name: 'VictoryDance-SIGH'
  author: 'Samuel Kalkin' # work in progress..
  requires: ['Scout','Ironworks','Masquerade','Great Hall','Harem']

  gainPriority: (state, my) -> [
    "Masquerade" if my.getAvailableMoney() < 4 and my.countInDeck("Masquerade") < 1
    "Ironworks" if my.countInDeck("Ironworks") < 1
    "Scout" if my.countInDeck("Scout") < 2
    "Great Hall" if my.countInHand("Ironworks") > 0 and my.countInDeck("Silver") < 2 and my.countInDeck("Harem") < 1
    "Silver" if my.countInDeck("Silver") < 2
    "Harem"
    "Province"
    "Duchy"
    "Estate" if state.countInSupply("Great Hall") == 0
  ]

 trashPriority: (state, my) -> [
    # my.getCurrentAction()
    "Curse"
    "Estate" if state.countInSupply("Great Hall") > 0
    "Copper"
  ]

 actionPriority: (state, my) -> [
    "Scout"
    "Great Hall"
    "Ironworks"
    "Masquerade"
  ]
}
« Last Edit: June 04, 2014, 08:10:38 am by norkbes »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #24 on: June 04, 2014, 10:07:18 am »
+1

If you specify an actionPriority, it should overwrite the default ai_value I think

edit: It's now called playPriority.

edit2: The logic is as follows: If the ai needs to decide wether to $X, it looks for the following functions
this->$XPriority
this->$XValue
choice->ai_$XValue

It takes the first one that exists.
« Last Edit: June 04, 2014, 10:20:26 am by DStu »
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #25 on: June 04, 2014, 10:37:43 am »
0

@DStu: thank you very much. playPriority works like a charm.

One additional question: how can I make Masquerade to pass a chosen card to the opponent. I've got impression that trashPriority is not relevant in that case, i.e. it works for trashing not passing a card.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #26 on: June 04, 2014, 12:04:56 pm »
0

@DStu: thank you very much. playPriority works like a charm.

One additional question: how can I make Masquerade to pass a chosen card to the opponent. I've got impression that trashPriority is not relevant in that case, i.e. it works for trashing not passing a card.


Code: [Select]
makeCard "Masquerade", action, {
...
for player in state.players
      cardToPass = player.ai.choose('trash', state, player.hand)
Looks like it is trashPriority
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #27 on: June 05, 2014, 04:31:54 pm »
0

The Kalkin's strategy looks roughly like this:

Code: [Select]
{
  name: 'VictoryDance-SHIGH' # by Samuel Kalkin
  author: 'norkbes'
  requires: ['Scout','Ironworks','Masquerade','Great Hall','Harem',"Pawn","Upgrade","Nobles","Bridge","Duke"]

  gainPriority: (state, my) -> [
    "Masquerade" if my.getAvailableMoney() < 4 and my.countInDeck("Masquerade") < 1
    "Ironworks" if my.countInDeck("Ironworks") < 1
    "Great Hall" if my.countInHand("Ironworks") > 0 and my.countInDeck("Silver") < 2 and my.countInDeck("Harem") < 1 and my.countInDeck("Scout") > 0
    "Scout" if my.countInDeck("Scout") < 2
    "Silver" if my.countInDeck("Silver") < 2
    "Province"
    "Harem"
    "Great Hall"
    "Duchy"
    "Estate" if state.countInSupply("Great Hall") == 0
    null
  ]

 trashPriority: (state, my) -> [
    "Curse"
    "Pawn" if my.countInHand("Pawn") > 1
    "Ironworks" if state.countInSupply("Great Hall") == 0
    "Estate" if state.gainsToEndGame() > 5
    "Copper" if my.getAvailableMoney() > 6 or state.countInSupply("Harem") == 0
    null
  ]

 playPriority: (state, my) -> [
    "Scout"
    "Great Hall"
    "Ironworks"
    "Masquerade"
  ]
 
  putOnDeckPriority: (state, my) -> [
    "Gold"
    "Silver"
    "Copper"
    "Scout"
    "Ironworks"
    "Masquerade"
  ]
}

One difficulty with implementing it properly in Dominiate is that there are many things you need to take about, e.g. trash or not trash with Masquerade, if trash: choose Estate or Copper, etc. Another tricky thing is how to optimally choose non-victory cards put on deck by Scout.. Anyway, it looks that the strategy above basically corresponds what Samuel had in mind.

One sad thing is that while VictoryDance-SHIGH strategy wins with BigMoney, it fails to do so with VictoryDance-GH or VictoryDance-PUB. Anyway it was good/beneficial to me to see how naugty might be a naughty interplay between both Scouts and Harems.

To sum up, so far at least four strategies seems to work for this kingdom: big money, Ironworks-Duke-Duches, Duke-Duches-Pawn-Upgrade-Bridge, and so far the weakest but nonetheless promising (I guess you always can tweak it somehow) Kalkin's Scout-Harem-Great Hall-Ironworks.


 



« Last Edit: June 07, 2014, 03:13:05 am by norkbes »
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 323
  • Shuffle iT Username: Ephesos
  • Respect: +266
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #28 on: June 06, 2014, 12:20:07 am »
0

Have you tried using OBM Nobles as your Big Money variant, as opposed to straight BM? It ties SHIGH, but loses to GH and PUB by quite a lot(probably since the game ends on Nobles, Dukes, Duchies).
Logged

norkbes

  • Swindler
  • ***
  • Offline Offline
  • Posts: 15
  • Respect: +3
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #29 on: June 07, 2014, 03:19:45 am »
0

@ephesos: for comparisons I used the generic BigMoney strategy. As far as OBM Nobles is considered, you are right, SHIGH ties OBM Nobles.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4069
  • Respect: +2608
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #30 on: June 07, 2014, 09:53:02 pm »
0

You might want to try waiting until a specific turn to buy duchies, using the turn number as an approximation for when you shuffle. That turn number is probably 5 for the ironworks/duchy rush.

You might want to always gain a silver with the ironworks when you have 4 coins in hand and dukes/duchies in the supply.

Province buying scripts can easily go wrong when competing for duchies. Too few duchies is ineffective and too many just becomes another duchy rush.

I'm guessing that the scout based deck would essentially be scout-nobles rather than great halls or harems. A simulator wouldn't be able to make the upgrade decisions needed for a complex engine to work.
« Last Edit: June 07, 2014, 09:56:37 pm by DG »
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 323
  • Shuffle iT Username: Ephesos
  • Respect: +266
    • View Profile
Re: Best strategy for a certain kingdom
« Reply #31 on: June 10, 2014, 01:31:55 pm »
0

You'd be surprised, actually. Apparently, getting the first Duchy is at least just as important as not clogging your deck with it. This one just about ties the unmodified version that buys Duchy first no matter what.

Code: [Select]
{
  name: 'VictoryDance-GH'
  requires: ['Masquerade','Pawn','Nobles','Duke','Bridge','Harem','Great Hall','Scout','Ironworks','Upgrade']
  author: 'Ephesos'
  gainPriority: (state, my) ->
    [
      "Ironworks" if my.countInDeck("Ironworks") < 3
      [hypState,hypMy]=state.hypothetical(my.ai)
      "Duchy" if hypMy.draw.length > 4 or state.countInSupply("Duchy") < 8
      "Duke" if state.countInSupply("Duchy") < 8
      "Province"
      "Gold"
      "Great Hall" if my.countInHand("Ironworks") > 0
      "Great Hall" if my.countInDeck("Great Hall") <=4 and state.supply[c["Great Hall"]] == 1
      "Silver"
      "Pawn"
    ]
}

Made code that can tell when I'm about to shuffle. I'm assuming that if the other person has a Duchy already, I want to match them no matter what. Otherwise, if I'm about to shuffle, I'll buy something else like Ironworks or Silver before my Duchy. However, if I have at least a full turn left, I'll buy the first Duchy.
Logged
Pages: 1 2 [All]
 

Page created in 0.098 seconds with 20 queries.