Dominion Strategy Forum

Please login or register.

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

Author Topic: Hinterlands play rules published  (Read 3280 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Hinterlands play rules published
« on: November 06, 2011, 04:59:11 pm »
+2

check out http://dominionsimulator.wordpress.com/ to find the Hinterlands cards' play rules for the simulator.
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #1 on: November 07, 2011, 06:01:57 pm »
0

I commented about this on rspeer's simulator too (well, kinda..), but I dislike the way Mandarin and Ghost ship are handled by the simulator.  If you're currently trying to collect provinces, I would expect topdecking your best card to be the best play even if it changes your buy decision for that turn.  If you're buying both provinces and duchies, topdecking the best card that still allows you to buy a duchy or province is probably best (often, the same card.)
Mandarin makes this even more of an issue, because without perfect play rules it's probably not going to manage to outperform Silver in games where it's going to be drawn 2 or 3 times.  So the simulator would never really be able to shed light on when it's a good card.
Logged
Also you probably are an expert if you buy two bureaucrats early.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Hinterlands play rules published
« Reply #2 on: November 07, 2011, 08:41:04 pm »
0

Spice merchant could perform as +2 coins/+1 buy if the $ to spend is greater than the most expensive card in the buy list.

I'd still like to see a purchasing rule of 'is gaining a card' which would make it easier to create scripts for the border town and haggler. Trying to work with the available $, number of buys, or action phase will produce undesired results. This condition would probably simplify scripts for the other card gaining actions too.

Thanks for your response to my feedback about a 'cards in hand' condition for farmlands.

I can't see any solution to the inn without new conditions specifically for that card. There are probably better uses for your time.

For the mandarin, grand market, and mint, would it be possible for the simulator to propose the playing of treasure cards then retract some when it decides to buy a mandarin or mint and there is excess spending (no retraction with loans, ventures)? The playing of treasure cards is then confirmed after the purchases are made. I suspect the answer is "too much work" but I might as well ask anyway. Maybe it would create logic failures in purchasing too.

In response to popsofctown, the simulator will always struggle to shed any light at all on whether the mandarin is a good card. The simulator works best when cards are played and resolved in sequential fashion with little reference to the remaining cards in the hand, the supply piles, potential purchases, the opponents, the score, or anything else. Both functions of the mandarin need a change of card play based on potential spending, the potential of the following turn, and potential use of other action cards that turn. This is likely to be an impenetrable problem to solve for home coded simulators.

As an example, how should the simulator decide to play a hand of {fishing village, mandarin, salvager, gold, silver}?
« Last Edit: November 07, 2011, 08:43:10 pm by DG »
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #3 on: November 07, 2011, 09:02:10 pm »
0

it checks if it's possible to buy a province this turn.  It is, so it plays fishing village as highest play priority, then salvager as second highest play priority, and then it sees that mandarin has the highest trash priority if it doesn't affect the turn's buy so it trashes mandarin.  That's a pretty decent play, the mandarin ends up replaced with a generally better silver and the simulator buys a province.
Logged
Also you probably are an expert if you buy two bureaucrats early.

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #4 on: November 07, 2011, 09:04:47 pm »
0

Did you want it to play fishing village, trash the gold and topdeck the silver ?  That's only considerably better play near the very end of the game, I don't see why that's a huge difference.

It also seems like more of a salvager issue with salvager needing to know whether it will draw the cards it is buying and trashing.
« Last Edit: November 07, 2011, 09:08:59 pm by popsofctown »
Logged
Also you probably are an expert if you buy two bureaucrats early.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Hinterlands play rules published
« Reply #5 on: November 07, 2011, 10:14:21 pm »
0

Quote
it checks if it's possible to buy a province this turn.  It is, so it plays fishing village as highest play priority, then salvager as second highest play priority, and then it sees that mandarin has the highest trash priority if it doesn't affect the turn's buy so it trashes mandarin.  That's a pretty decent play, the mandarin ends up replaced with a generally better silver and the simulator buys a province.

It actually can do something like that. I've actually seen it with {fishing village, salvager, trading post, copper, copper, curse, curse, curse} in hand and salvage the trading post to buy a province. Trashing three curses and buying duchy might just have been a little better. Unless you get the simulator to think through combined actions it will always make mistakes of this sort. Evaluating combined actions though is largely intractable since any number of actions can be played in a turn, in any sequence, with variety of usages on a variety of targets, with an unknown sequence in the draw deck.

In the mandarin/salvager example, the simulator evaluates each action individually. Whichever action is resolved first will be acting on an incorrect estimate of the purchasing value of the hand (unless it removes the other action from the hand). To maximise income by playing the salvager first, the salvager might actually trash the gold and expect $12 to spend, not know that the mandarin must then put the silver on top of the deck. The salvager doesn't know whether the mandarin will be played or its full effect.
« Last Edit: November 07, 2011, 10:23:33 pm by DG »
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #6 on: November 07, 2011, 11:18:47 pm »
0

After it trashes the gold why wouldn't it topdeck the silver?  The algorithm as-is would topdeck the silver if the gold was trashed, it's the most valuable card that wouldn't change the buy decision.
edit
Now I see what you're saying


rspeer's simulator has a function where the bot goes into hypathetical mode and just checks out what it expects to buy next turn.  All it does is apply the same logic it uses when it's normally playing and plays all the way through the end of the entire turn hypathetically.

If you have the bot do that, which is more than easy to do, the bot is going to say, "Ok, if I don't go plan B on Mandarin, what will happen?  I play the fishing village, then salvage the mandarin, then have enough for a province.  Ok, I declare this a province turn."  And then it's going to play out the turn just like I said it would, and that's only infinitesimally worse than optimal play, and only in a pretty contrived scenario.
« Last Edit: November 07, 2011, 11:29:01 pm by popsofctown »
Logged
Also you probably are an expert if you buy two bureaucrats early.

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4733
  • Respect: +3325
    • View Profile
Re: Hinterlands play rules published
« Reply #7 on: November 08, 2011, 05:12:39 am »
0

I have a question, couldn't find it in the playrules.

Does it actively discard Tunnel with the highest priority? I should assume so.

Couldn't find it on this page with all the parameters: http://dominionsimulator.wordpress.com/play-rules/
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +670
    • View Profile
Re: Hinterlands play rules published
« Reply #8 on: November 08, 2011, 05:51:37 am »
+1

As an example, how should the simulator decide to play a hand of {fishing village, mandarin, salvager, gold, silver}?

Personally I'd probably play FV -> Mandarin (put back Salvager) -> Buy Province.

Just going to throw it out there as it hasn't been mentioned yet.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Hinterlands play rules published
« Reply #9 on: November 08, 2011, 06:35:30 am »
0

The FV/Mandarin/Salvager hand illustrates a point: even people who have a deep understanding of the game have different opinions of how to play that hand, how could you expect a computer program to handle it well? It's just not doable.

One option is to let the simulator branch out when there's a difficult play decision where he will play the game to the end for each possible decision and then choose the one with highest win rate. The problem is of course that it will increase simulation time exponentially (or double exponentially)
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Hinterlands play rules published
« Reply #10 on: November 08, 2011, 11:15:50 am »
0

It's not a hinterlands issue, but I've noticed that a bishop will sometimes not be played if it has to trash a vp card that is in the current buy list. Presumably the bishop should always trash an estate or duchy rather than not be played at all (with a spare action).
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #11 on: November 08, 2011, 02:30:56 pm »
0

But the simulator can select an option that is competitive with a rank 20ish player's play, that's more than good enough to learn something.  Fumbling a couple of the most complicated hands on God's green earth and losing a dollar off next turn is totally different from suggesting adding a few lines to the algorithm to cover a large group of scenarios.  Like, really, if this is your attitude about it why not leave ghost ship on a random function? You're just going to reject an improvement suggestion because the simulator will never be better than the disagreeing opinions of various players, throw up your hands and say might as well give up?

The FV/Mandarin/Salvager hand illustrates a point: even people who have a deep understanding of the game have different opinions of how to play that hand, how could you expect a computer program to handle it well? It's just not doable.

One option is to let the simulator branch out when there's a difficult play decision where he will play the game to the end for each possible decision and then choose the one with highest win rate. The problem is of course that it will increase simulation time exponentially (or double exponentially)
I'm not suggesting indefinite branching!  I'm just suggesting a check for the buying power of that turn, just a single doubling.  It's still finite.  I'm just suggesting a slightly more complex version of the current algorithm, not Deep Blue.

"The FV/Mandarin/Salvager hand illustrates a point: even people who have a deep understanding of the game have different opinions of how to play that hand, how could you expect a computer program to handle it well?"
You're giving me a non-sequitir.  DG and you are trying to assert that there are common, complex scenarios the simulator cannot play optimally, and that the simulator's suboptimal play in that scenario would have a considerable impact on its winning chances.  Then you give the FV/Mandarin/Salvager hand, which is reasonable to satisfy #1, common enough, and #2, not played 100% optimally, but not #3, since I described that the algorithm makes a choice that requires complex mathematical proof to be shown as inferior to a human answer, practically.

I want another example.  If you can show me that it will draw Village, Village, Harvest and no simple algorithm you can develop can keep it from playing Harvest first, then sure, I'll throw up my hands, give up, and never suggest you improve your play rules, ever.
« Last Edit: November 08, 2011, 02:42:42 pm by popsofctown »
Logged
Also you probably are an expert if you buy two bureaucrats early.

ftl

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2028
  • Respect: +1295
    • View Profile
Re: Hinterlands play rules published
« Reply #12 on: November 08, 2011, 03:06:12 pm »
0

Doesn't the simulator do the right thing in that FV/Mandarin/Salvager example, or at least close enough to the right thing that it's debatable? Salvage the Mandarin, buy a province and a silver?  Seems like a pretty good choice to me.

And I just checked, Geronimoo's simulator plays the Villages before the Harvest.

I'm completely missing what point you're trying to make, popsofctown.
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #13 on: November 08, 2011, 03:08:32 pm »
0

My point is the same point you're making.  The example does not "illustrate" that developing good play rules is a futile endeavor because a simulator can play it rather well.

If I'm not making sense it's because I'm frustrated by the illogic.
Logged
Also you probably are an expert if you buy two bureaucrats early.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Hinterlands play rules published
« Reply #14 on: November 08, 2011, 05:50:35 pm »
0

@popsofctown: To be clear, I'm very happy you're commenting on the play rules and suggesting improvements, but I'm finding your method of communication unclear and the last post was just agressive without real reason. I'd be happy to implement anything that you suggest if I understand what it is you're saying and if it applies for many situations or will improve a few interesting bots a lot (like enabling the Apothecary/Native Village combo).
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #15 on: November 08, 2011, 06:15:05 pm »
0

I was frustrated by DG not taking me seriously and seeming to attack my understanding of AI instead of the algorithm I actually presented, or at least asking for clarification.

I can post some details later.
Logged
Also you probably are an expert if you buy two bureaucrats early.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Hinterlands play rules published
« Reply #16 on: November 08, 2011, 07:11:40 pm »
0

Popsofctown, I tried to give a serious answer and not attack you. As Geronimo said, if you can suggest good new card play rules for putting cards on top of the deck then everyone would be happy to see them. I'm sorry if I didn't create a foolproof example. To be honest I didn't put that much time into creating it, and it is still illustrative.

{Upgrade, moneylender, copper, gold, silver} is perhaps a better example if you are disagreeing with the example. The simulator plays the upgrade, draws a province, trashes the copper, and plays the moneylender with no copper in hand. To do anything else requires much deeper calculation, especially when you next consider {upgrade, throne, moneylender, menagerie, copper, copper, silver}.
« Last Edit: November 08, 2011, 07:21:45 pm by DG »
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #17 on: November 08, 2011, 08:37:17 pm »
0

That's a better example, and the exclusion of mandarin makes it clearer you're being abstract.


Anyway, the algorithm I'm suggesting has three steps whenever there is a mandarin in deck:

-Play out the turn using default decision making (and the current mandarin logic) , with the assumption of a deck full of curses, (or a deck with the cards known to be in it ordered in ascending value top to bottom, whichever.).  This might mean it blows up a copper that a moneylender could have used, whatever, the only thing I expect this to do is improve mandarin behavior.
-Check whether you gained a green card.  If you did, then stick to default decision making and keep going.
-If you didn't gain a green card and there's a valid green card on the buy priority list, restart the turn and play the turn with a "Hoarding" strategy, and topdeck the most valuable card you can instead of the least valuable card you can.  (though topdecking unplayable actions still reigns supreme.  Mandarin has lots of big money synergies though..)

This makes the bot go for province-silver pairs of turns instead of Gold-Festival pairs of turns like it does now.  The variable for the hoarding strategy itself is also useful for tweaking Mandarin's buy logic.

There's several ways you can implement the hypothetical turn, but overall to check how much you expect to make in the turn all you have to do is use the decision making power it already has, so it shouldn't be too hard. 


It might be intimidating because it sounds like a decision tree, and it is, but it will only have two branches, green or not green.  If it seemed necessary to have a branch for greening, and a branch for, failing that, getting an attack, and a branch for, failing that, getting a village variant, then you would have runtime issues but this is just a one time doubling of effort whenever topdecking gets involved.
Logged
Also you probably are an expert if you buy two bureaucrats early.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Hinterlands play rules published
« Reply #18 on: November 09, 2011, 04:54:45 am »
0

I like the idea, but I'm not sure if we really want to do it like that. The point is, we increase the complexity of the program and also of the running time here, and we should evaluate what we get out of it, and if and how we can use that to get more powerfull bots.

I think the idea of some kind of "lazyness" is the right one, that lets the bot sacrify a current bad/mediocre turn in hope to get a better one next turn. But I'm not sure if it's the right thing to just assume you should play lazy if you can't buy a green card, but could the next turn.
Maybe it would be easier, and also more powerfull to have an additional option "lazy/unimportant if xyz" at the buyrules, that let us tell the bot that it should not really think buysing Silver is a lot more important than buying nothing once we have an $2 average, or that, in this example, can let us tell the bot that once we start greening, getting Gold is also not really more important than getting Festival.

I suspect that would be much more easier to implement, and from the user's point-of-view also more powerfull, because I could configure it like I think it should be correct for the current bot, and don't have to take the default rules on when what card is considered to be played lazy.

edit: Just remembered. I came across something similar when we where dicussing the Mining Villabe ->$5/$6 opening some weeks ago. It really happened that the MV is trashed to afford a Silver instead of nothing, which really is not what you want. Which such a mechanism you could pervent this by buying the Silver as "unimportant", so that it will not trash anything to afford it.
« Last Edit: November 09, 2011, 05:07:07 am by DStu »
Logged

popsofctown

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5262
  • Respect: +2711
    • View Profile
Re: Hinterlands play rules published
« Reply #19 on: November 09, 2011, 11:26:40 am »
0

I haven't looked at the code for Gerominoo's simulator so I don't know how things are set-up or what the best implementation is.  So yeah, this buy priority tweaking might work too.  I just explained an extremely thorough implementation so you would understand the behavioral goal.

The way the play rule is written is "Put back the most valuable card that doesn't affect the buy decision this turn."  All it needs to change to is "Put back the most valuable card that doesn't affect a green buy decision this turn." during greening phase.

If Mandarin has very low play order priority then no lookahead like I was talking about is really needed, it can see just from the treasure in front of it what to topdeck.

The reason Mandarin bugs me is that I think you can improve it with any level of effort by realigning its goal.  I suspect that doing nothing more than changing the buy decision bit to "province buy decision" would even increase win percentages on its own.  (It's hard to buy something that terrible with 3$ or more from mandarin)
« Last Edit: November 09, 2011, 11:31:38 am by popsofctown »
Logged
Also you probably are an expert if you buy two bureaucrats early.
Pages: [1]
 

Page created in 0.069 seconds with 20 queries.