Dominion Strategy Forum

Please login or register.

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

Author Topic: Simulating Dark Ages  (Read 6748 times)

0 Members and 1 Guest are viewing this topic.

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Simulating Dark Ages
« on: August 08, 2012, 09:53:46 pm »
+1

I've got Feodum, Sage, Poor House, and kind of Graverobber implemented in Dominiate. I say "kind of Graverobber" because the code is crappy -- it kind of lumps the two decisions on the card into one. I should do it better soon.

Today's cards are going to be a bit tricky, and I can't really do Looters and Ruins until we know what the Ruins are.

I haven't spent much time trying out strategies with these yet. The easy one I found is that Sage/Jack (or as I've named it, "Sajak") is slightly better than double Jack.

Chapel/Feodum with a custom trashPriority could be fun. Any other ideas for simulator strategies?
« Last Edit: August 08, 2012, 10:01:40 pm by rspeer »
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Simulating Dark Ages
« Reply #1 on: August 08, 2012, 10:43:15 pm »
0

Someone in one of the Dark Ages threads suggested Chapel/Poor House/Village. Chapel everything, get some combination of Poor Houses and Villages, and aim for double-PH Province turns. I implemented Poor House locally in Dominiate and my quick-and-dirty bot beats BMU at least:
Code: [Select]
# Chapel away Coppers and Estates to enable $4 Poor Houses,
# buy Villages, and aim for double-PH turns for Province.
{
  name: 'ChapelPoorHouseVillage'
  requires: ['Chapel', 'Poor House', 'Village']
  gainPriority: (state, my) -> [
    # Open Village/Chapel. We can afford Poor Houses easily later,
    # and opening Village helps ensure we trash 4 cards.
    "Village" if my.countInDeck("Village") == 0 and my.turnsTaken <= 2
    "Chapel" if my.countInDeck("Chapel") == 0 and my.turnsTaken <= 2

    "Province"
   
    "Village" if my.countInDeck("Poor House") > my.countInDeck("Village")
    "Poor House"
  ]

  actionPriority: (state, my) -> [
    # The default plays Poor House instead of Chapel, even when we want to
    # trash.
    "Chapel" if wantsToTrash
  ]
}
It would probably be stronger with Worker's Village.

(Actually this reminds me that Dominiate's play priority for "Chapel if wantsToTrash" might need a bump up, because it'll prefer to play a terminal-Silver rather than Chapel when they collide.)

Edit: This might do better if explicitly instructed to trash all its Coppers, not just 3 of them.

Edit 2: Also, it seems like actionPriority does not work anymore. It needs to be called "playPriority". Also "wantsToTrash" should be "this.wantsToTrash(state)". And this revealed a flaw, which is that Village should of course get played before Chapel. Fixed version, which is better:
Code: [Select]
# Chapel away Coppers and Estates to enable $4 Poor Houses,
# buy Villages, and aim for double-PH turns for Province.
{
  name: 'ChapelPoorHouseVillage'
  requires: ['Chapel', 'Poor House', 'Village']
  gainPriority: (state, my) -> [
    # Open Village/Chapel. We can afford Poor Houses easily later,
    # and opening Village helps ensure we trash 4 cards.
    "Village" if my.countInDeck("Village") == 0 and my.turnsTaken <= 2
    "Chapel" if my.countInDeck("Chapel") == 0 and my.turnsTaken <= 2

    "Province"
   
    "Village" if my.countInDeck("Poor House") > my.countInDeck("Village")
    "Poor House"
  ]

  playPriority: (state, my) -> [
    # The default plays Poor House instead of Chapel, even when we want to
    # trash.
    "Village"
    "Chapel" if this.wantsToTrash(state)
    "Poor House"
  ]

  trashPriority: (state, my) -> [
    "Curse"
    "Copper"
    "Estate"
  ]
}
« Last Edit: August 09, 2012, 01:25:39 am by blueblimp »
Logged

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Simulating Dark Ages
« Reply #2 on: August 08, 2012, 11:54:54 pm »
0

I'd be interested in seeing how Chapel/PH/Village does against Remake/PH/Village (Remaking Copper->PH and Estate->Village). :)
Logged

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Simulating Dark Ages
« Reply #3 on: August 09, 2012, 12:04:17 am »
0

I still think TR would be a better enabler for a PH strategy.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Simulating Dark Ages
« Reply #4 on: August 09, 2012, 01:31:56 am »
0

I still think TR would be a better enabler for a PH strategy.
Trying this turns up what looks like a bug in Dominiate's Throne Room:
Code: [Select]
ChapelPoorHouseThroneRoom draws 5 cards: [Poor House, Throne Room, Throne Room, Poor House, Chapel].

...


== ChapelPoorHouseThroneRoom's turn 11 ==
ChapelPoorHouseThroneRoom plays Throne Room.
...playing Throne Room (1 of 2).
...playing Poor House (1 of 2).
ChapelPoorHouseThroneRoom reveals the hand ([Poor House, Chapel]).
...playing Poor House (2 of 2).
ChapelPoorHouseThroneRoom reveals the hand ([Poor House, Chapel]).
...playing Poor House (2 of 2).
ChapelPoorHouseThroneRoom reveals the hand ([Poor House, Chapel]).
Coins: 12, Potions: 0, Buys: 1
ChapelPoorHouseThroneRoom buys Province.
(ChapelPoorHouseThroneRoom shuffles.)
ChapelPoorHouseThroneRoom draws 5 cards: [Province, Poor House, Province, Chapel, Throne Room].
It should be impossible to have $12 on this turn (instead of $16 or $8), unless I goofed my Poor House coding somehow (possible!).

Edit: Seems to be a variable-shadowing issue. CoffeeScript interprets the code
Code: [Select]
action = state.current.ai.choose('multiplied', state, choices)
(in the King's Court implementation) as an assignment to the global variable "action" (which is supposed to be a base card type for cards to derive from), not as a declaration of a local variable.

Edit 2: I submitted an issue on GitHub.
« Last Edit: August 09, 2012, 01:45:25 am by blueblimp »
Logged

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Simulating Dark Ages
« Reply #5 on: August 09, 2012, 02:22:18 am »
0

Edit: Seems to be a variable-shadowing issue. CoffeeScript interprets the code
Code: [Select]
action = state.current.ai.choose('multiplied', state, choices)
(in the King's Court implementation) as an assignment to the global variable "action" (which is supposed to be a base card type for cards to derive from), not as a declaration of a local variable.

In Javascript, you need the 'var' keyword to get a local variable. I suspect it's the same in CoffeeScript.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Simulating Dark Ages
« Reply #6 on: August 09, 2012, 11:32:48 am »
0

Edit: Seems to be a variable-shadowing issue. CoffeeScript interprets the code
Code: [Select]
action = state.current.ai.choose('multiplied', state, choices)
(in the King's Court implementation) as an assignment to the global variable "action" (which is supposed to be a base card type for cards to derive from), not as a declaration of a local variable.

In Javascript, you need the 'var' keyword to get a local variable. I suspect it's the same in CoffeeScript.
It's not the same in CoffeeScript:
Quote
Because you don't have direct access to the var keyword, it's impossible to shadow an outer variable on purpose, you may only refer to it. So be careful that you're not reusing the name of an external variable accidentally, if you're writing a deeply nested function.
So yes, they replaced JavaScript's misfeature of implicit globals with a (arguably worse) misfeature of implicit-local-unless-it's-global-already.
Logged

Kelume

  • Ambassador
  • ***
  • Offline Offline
  • Posts: 33
  • Respect: +76
    • View Profile
Re: Simulating Dark Ages
« Reply #7 on: August 09, 2012, 01:26:55 pm »
0

Whipped up a simple Remake/Poor House/FV bot that goes around 50/50 with the built in DoubleJack. Very cool and probably easily improvable. :)

Code: [Select]
{
    name: 'Remake Poor House FV'
    author: 'Kelume'
    requires: ["Remake", "Poor House", "Fishing Village"]
    gainPriority: (state, my) -> [
        "Province"
        "Duchy" if state.gainsToEndGame() <= 5
        "Estate" if state.gainsToEndGame() <= 2
        "Remake" if my.countInDeck("Remake") < 1
        "Poor House" if my.countInDeck("Fishing Village") > my.countInDeck ("Poor House")
        "Fishing Village"
    ]
}
Logged

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Simulating Dark Ages
« Reply #8 on: August 09, 2012, 02:47:09 pm »
0

Whipped up a simple Remake/Poor House/FV bot that goes around 50/50 with the built in DoubleJack.

:O

I think that's better than I expected. (Granted, DoubleJack doesn't really show its true strength against a non-Attack deck...)
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Simulating Dark Ages
« Reply #9 on: August 09, 2012, 03:16:18 pm »
0

Well, FV+Jack beats double-jack......

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 9701
  • Respect: +10741
    • View Profile
Re: Simulating Dark Ages
« Reply #10 on: August 10, 2012, 06:01:27 pm »
0

Well, FV+Jack beats double-jack......

Really? I guess it's largely because Jack is "draw up to X"; but I thought as a general rules, FV was a trap if you aren't using a bunch of terminals.
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Simulating Dark Ages
« Reply #11 on: August 10, 2012, 08:06:09 pm »
0

Well, FV+Jack beats double-jack......

Really? I guess it's largely because Jack is "draw up to X"; but I thought as a general rules, FV was a trap if you aren't using a bunch of terminals.
Yeah, it's the draw-up-to-X thing. And FV is not SO much weaker anyway, just a little bit.

zahlman

  • Minion
  • *****
  • Offline Offline
  • Posts: 724
  • Respect: +216
    • View Profile
Re: Simulating Dark Ages
« Reply #12 on: August 11, 2012, 04:26:32 am »
0

It's still kind of surprising, though. To get the full benefit from FV-Jack, you want them to collide, and this is a no-trashing BM deck. To get the full benefit from DoubleJack, you want them to not collide, and they are helping you out with that quite a bit by flooding you with Silver.
Logged

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: Simulating Dark Ages
« Reply #13 on: August 11, 2012, 04:50:56 am »
0

You can still by two Jacks: the idea is just to buy Fishing Villages instead of Silver.  The simulator likes DoubleJack/FV > SingleJack/FV > DoubleJack.
Logged

Grujah

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2237
  • Respect: +1177
    • View Profile
Re: Simulating Dark Ages
« Reply #14 on: August 11, 2012, 06:26:02 am »
0

Yeah, this is how I play FV/Double Jack -

Buy a Province
Buy a Gold
If #ofJacks < 2, Buy a Jack
Buy a Fishing Village


Always play all of your FVs, discard them with Jack only if you lack actions. Also you probably want to discard Jack with Jack most of the time, if that collision happens. Trash Estates, of course.
Logged

Beyond Awesome

  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 2941
  • Shuffle iT Username: Beyond Awesome
  • Respect: +2466
    • View Profile
Re: Simulating Dark Ages
« Reply #15 on: August 17, 2012, 01:27:51 am »
0

How fast is Scavenger/Stash?

Should you pick up three Scavenger's or an extra Stash if need be? I think the answer is no, but I'm curious to see what the simulator says
Logged

kn1tt3r

  • Minion
  • *****
  • Offline Offline
  • Posts: 585
  • Respect: +278
    • View Profile
Re: Simulating Dark Ages
« Reply #16 on: August 17, 2012, 02:16:49 am »
0

How fast is Scavenger/Stash?

Should you pick up three Scavenger's or an extra Stash if need be? I think the answer is no, but I'm curious to see what the simulator says
I think a third Scavenger does no harm because once you have the thing running it won't hurt you anyway. The fourth Stash, however, should be rather a Duchy I think.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Simulating Dark Ages
« Reply #17 on: August 17, 2012, 02:33:01 am »
+2

I apologize, but I'm going to stop tweaking Dominiate for at least this week, even though all the new information is out. I'd rather have that time to enjoy Isotropic while it's still around, and to try out playing Dark Ages myself if I get the chance to. I'm sure you understand.

So unless some other cool person steps up to add cards like Scavenger, we can only speculate.

And of course things like Band of Misfits and Knights are going to be crazy to implement.
Logged
Pages: [1]
 

Page created in 0.201 seconds with 20 queries.