Dominion Strategy Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Sparafucile

Filter to certain boards:

Pages: 1 [2] 3 4
26
Hey.  That’s awesome thx for trying to repro.   :)    Now only the Dominion gods know what happened.  ;)

27
There was definitely a Druid in my discard.   And herald can top deck any card.  Not just actions. 

I agree I shouldn’t have been able to top deck the just purchased Gerald.  But I Should have been able to top deck some other card ... :(

28
to make matter worse for me - the bug almost cost me the game ... because i was strategically top decking the herald to align it with a changeling that i knew was coming up on the next set of 5 cards ....   This bug made that changeling go around 2 more times before finally getting converted - slowing me down significantly :(

29
I had 5 money, and a haggler in player, while herald was on the board.  (changeling was around ... in case that's relevent for a bug report)

Haggler - While this is in play, when you buy a card, gain a cheaper non-Victory card.
Herald - When you buy this, you may overpay for it.   For each 1 you overpaid, look through your discard pile and put a card from it onto your deck.

My plan was to buy a Herald for 5(overpay by 1) .  Since there were 2 on buy abilities - one from herald and one from haggler, i should get to choose the order.

I wanted to do the overpay first, topdecking my herald i just bought . and then gain the cheaper card.  (Changeling in this case).

What actually happened - was when I bought the herald for 5 - the UI showed up allowing me to overpay for it.  I couldn't move the slide from 0-1 - and I could hit the "overpay" button.   But then
i was never given an opportunity to look through my discard.

I feel like this was a bug .... (unless i'm interpretting the rules wrong and somehow the lose-track rule applies ... which I could see happening if I gained the haggler card first and then tried the overpay mechanic.

Thoughts? 

30
Dominion General Discussion / Re: is royal seal underrated?
« on: November 26, 2018, 11:08:50 am »

Any of these suggestions probably makes the card even more unattractive than leaving it overpriced at $5. Also, as already pointed out, there is nothing "automatic" about Silver+ at $4 unless one wants to argue that Delve and Patron are "automatic".

Let's also keep in mind topdecking gained stuff is nice but hardly as important as e.g. the Attacks of Idol or Relic, the trashing of Counterfeit or the Buy of Spices and Charm.

$4 plus 1 debt has to be better than $5 ... ;)

31
Dominion General Discussion / Re: is royal seal underrated?
« on: November 26, 2018, 09:37:46 am »
It’d be fine at $4.
It would, except, as Donald X once said, "look, I can't make a Treasure that gives $2, has some other effect that is always beneficial, and costs $4; that's just better than Silver, and people by Silver for $4 all the time".

And then he made Delve.
The main problem with Silver-with-a-bonus for $4 (for games where people want Silver and aren't gaining it with a Silver-gainer) is that the pile just automatically empties. It's also not great that then you have that bonus in your deck, but didn't care about it at all, weren't making a decision there.

Delve has neither issue; it hits the Silver pile rather than a new 10-card pile, and those Silvers have no other abilities.

What if it cost $4 - but also gained a copper on gain.    That would make it cost less than $5, and wouldn’t be an automatic purchase.  The pile may not auto empty.  There are other mechanics that could be used to disincentivize if gain a copper is meh.  $4 plus a debt, $4 but draw one less card at cleanup, $4 plus gain an estate, $4 but also worth -1vp.   

32
The problem is that the changes were not only wording. There were layout and font changes as well, which apply to every card; not just ones like Throne Room. So if players really want the "second edition" experience, they just need to buy second edition.

I’m aware that many formatting changes were made for appearance and aesthetics.  I can’t afford to buy all of dominion a second time though :(.  I’m mostly interested in getting changes to cards that update the rules - so that my existing sets can still be used with the latest one in a consistent way.   I wonder how many others would be interested ....

33
I’m secretly hoping that at some point they will release a rewording update pack.   Even in base and intrigue there were a few cards that got small rule changes by rewording the cards.  Maybe there are enough out of date (but not deprecated) cards now that there would be a market for an update pack to adddress those - including cards that need the coin token to coffers rework.

34
Dominion General Discussion / Dominion Anthology/Fan edtion PLEASE
« on: March 17, 2018, 02:04:55 pm »
Making a request for a dominion expansion in case Donald sees it :)

If there were another dominion expansion, I would really like to see Dominion: Anthology/Fan edition
No new mechanics introduced :)   Instead - reuse and revisit the existing ones in new combinations.

There's many awesome mechanics introduced in the expansions - but the dominion universe is so big, one often doesn't see them that frequently. 

Mechanics to revisit/expand would include:

Ruins, Cards that leverage Shelters (from Dark Ages)
Boons/Hexes, Night (from Noctune)
Reserve Cards (From Adventures)
Potion Cost (From Alchemy)
Over pay, Coin Tokens (from Guilds)
Debt, Gathering Piles, Split Piles (from Empires)
Cards that Require/encourage Platinum/Colony (from Prosperity)
When Gain/When Buy effects (from Hinterlands)

One could even mix and match.  Potion cost cards that hand out Boons!  Reserve cards that cost debt!   Cards that give out ruins and coin tokens.  Get creative :).

I dont think that the expansion would need to include all the necessary supporting pieces.  (another copy of Runes, Boons, etc etc).
Players would get to use the cards that match the expansions they already own - and then would be inspired to buy the missing expansions :)

Please upvote and include your ideas for what you might want included!

35
Variants and Fan Cards / Alternative Kingdom setup rules
« on: February 13, 2017, 02:29:30 pm »
This forum sees a lot of fan cards being made - but I'm wondering if there has been much discussion on how to play the offical cards, but with modified kingdom setup rules.    So in regular Dominion, during setup we choose 10 kingdom cards - available to all players for purchase.   Has anyone tried variations on this?  Ideas might include:
  • Different numbers of kingdom cards.  e.g. 12
  • Some kingdom cards randomly determined, 8 for example, with the remaining (2 in this case) chosen by the players
  • Mixing larger number of kingdom cards together into a "center deck" and then playing a la that style of deck builder
  • Assymetric kingdoms - where not all kingdom cards are available to both players

One idea I'm toying around with is a variation where, in a 2 person game, we randomly choose 8 kingdom cards - then each player gets to add 2 more kingdom cards for only their own use - to round out what they think is missing.  (village, +buy, +cards, gainer, trasher, vp, +cards, curser, etc etc)  Maybe everyone would pick the same power cards - don't know.

Any other ideas or thoughts?  If you have something that you have tried, I would love to hear it.

36
Rules Questions / Games that never end
« on: December 03, 2016, 03:17:21 pm »
I post this in rules question so people can confirm that we played this game correctly.  (recommended game from Empires + Darkages).

Tomb of the Rat King: Advance, Tomb • Castles, Chariot Race, City Quarter, Legionary,
Sacrifice • Death Cart, Fortress, Pillage, Rats, Storeroom

The following combo:

Landmark (+1 point on trash) + rats (trash a card from hand) + Fortress (return card to hand when trashed)

Became the winning strategy on our first play of these cards.   The winner obtained a few fortress, as mans rats as possible.  Every turn consisted of playing like 9 rats or so, trashing a fortress, and getting like 9 points.  It was very quick.  And the deck was a gold deck in that it could generate points forever without destroying the deck or ending the game.


One of the things I've always enjoyed about dominion is that increasing your deck and obtaining points has always brought a game closer to conclusion.  Growing your deck and obtaining victory points (via Goons for example) more or less required emptying piles.

In Prosperity there was one major exception -  Monument.  This card could gain points infinitely without causing the game to end.  In practice, this never comes up because it's too slow compared to other point gaining options.  Later, once cards could be gained out of the trash, an edge case entered with Bishop as well.    First with monument, and later via a combo with Bishop, it's possible to gain points forever without actually ending the game.

It seems that with empires though (an expansion I'm very grateful for Donald :) ) - there are now many more ways to competitively gain points without ending the game.

If Donald happens to see this, i humbly request a rules modification or addition should more 2nd edition rule books come out, that limits these types of games somehow.   One example modification would be to make a certain number of alternate victory points generated be a terminating game condition.  This could be done without contradiction of the current rules - no limit needed on gaining points on your turn after the threshhold for game finish has been met.   Perhaps could the threshhold could be equal to the number of province points, or colony points in a colony game.  Setting it lower might make for interesting "point rushes" instead of "3 pile rushes".  Just brainstorming. 

If such a rule exists already - in which case please let me know so we don't get stuck with infinite games.

37
Dominion Articles / Re: Challenge: Write a Pearl Diver article
« on: September 27, 2016, 05:09:04 am »
    Not particularly strong on it's own - often not worth wasting a buy on unless
       1) You have to pick up a 2 cost card and you don't want an estate or
       2) there's a specific synergy you are looking for with another card

    Source of +Buy amplifies the synergies, as you can aquire pearl divers quickly on 4 coin hands.  In general, much stronger when Gainers and +buy is available.  Picking up 2 pearl divers on 4 money can be a good bet if there is any card that remotely synergizes with it.

    What most people think of first:  drawing from bottom of deck.

    That key card that happened to be at the bottom of your deck will no longer miss the shuffle.  Yay.
    On a 2/5 split, it cuts in half the chance that your 5 card misses the first shuffle!  (from about 10% to about 5%)

    This bottom draw can also force discard from bottom of the deck with certain cards  (suppose you find your tunnel down there for e.g.)

    Scouting Party
    Navigator
    Survivors

    Combos with cards that interact with top of deck without drawing first:

    Mystic
    Scrying Pool
    Lookout
    Native Village
    Loan
    Rebuild
    Adventurer
    Library

    for Rebuild, pearl diver can be used to find victory cards, or to find weak non-victory cards(like copper) that you want to skip.
    For loan, pearl diver can be used to find money worth trashing, or put victory cards on top of deck that you want to skip.
    Lookout is amplified greatly by perl diver.   As a deck thins, lookout becomes more risky to play - but with a pearl diver, the risk can be completely negated.
    Allows you to have much better control over what is on the native village matt.   Playing several pearl divers can give you almost perfect native village matt control if you always draw from the bottom.  (until you find the card that you want on the matt)


    Don't overlook the interactions that occur because of the card being a cheap, cantrip, action card.   Other 2 cost can trips would also fill the following roles - like Pawn for example.  But if it's the only cheap cantrip on the board, don't forget about these uses:

    As a cheap card

    3 pile ending rush (without compromising effective deck density) - especially with Stonemason
    Gainable via Workshop, Hermit, Engineer etc ... You may not want to buy a pearl diver - but if u can gain them for almost free, their power might be worth it.

    As a cantrip

    use with throne room variants for mock village on decks without source of +2 action

    As a cheap cantrip

    is a Prince Target
    ok fodder for Sacrifice as a mock village
    as an alternative to estate when u have to gain a card costing exactly 2.  (e.g. develop, butcher)
    Can be combined with inheritance to add estates to your deck without compromising draw power
    useful with Advance event to get expensive actions
    as a cheap cantrip when plus buy available, combos well with teacher, PathFinding - becomes  cheap lab with a +Card token on them
    negate Enchantress -  instead of wasting a more expensive action


    As a cheap cantrip Action

    lots of cheap can trips are great for Scrying Pool, City Quarter, Vineyard, Herald
    with +buy, can be used to meet action quota - e.g. pedder, conspirator
    Good young Witch Counter when pearl diver is the bane card and you can purchase a lot of them with +buy
    If you have +buy, it can be effective to:  Scoring points with Arena, Colonade, Obelisk, Triumphal Arc, Tower


    As a Deck Filler

    To guard against trashing attacks  (e.g. guard against knights, Pirate ship)
    To make your deck bigger (e.g. gardens)


    Strong With:

    Mystic
    Scrying pool
    City Quarater
    Lookout
    Herald (with +buy)
    PathFinding
    Teacher (for lots of cheap labs, or lots of +buy, or lots of villages)
    Vineyard
    Advance, especially with +Buy

38
Greenlake Games in Seattle, WA has copies today.   Got mine :)

39
In celebration of the upcoming Adventures expansion, I'm making available a beta version of the Dominulator UI.   The simulator has been around for a while, but is now much easier to use for simple results.   Use the UI to assemble a purchase order.  The cards will play be via very simple rules.  Excellent for deciding simple questions, like does Witch beat SoothSayer?

If you don't want to use the simulator, you can still use it as a randomizer which includes all released Dominion cards, including Adventures.

Full source code and installation instructions (windows 8 only) are available at

Github source

Or get the installation package here:

Release

Sorry, not in the app store yet, so it requires a developer licence.  Which is free. 

I welcome any feedback.    Sorry, not all cards are implemented for simulation yet - including most of Adventures.  Stay tuned for updates though!

40
Simulation / Re: Introducing DominionSim
« on: April 05, 2015, 07:49:08 pm »
Forgot to answer your question.   The license on dominulator is pretty loose.   I would prefer for people not to fork the code base for the purpose of taking it a different direction, but I welcome any non-profit use of it, and encourage people to contribute back into it.  It's all open source for people to play with.

Here's a quick link to the source:

https://github.com/NathanTeeuwen/Dominulator

Look through the forum for more posts on this simulator.  I've made quite a few - but not a lot since last summer

But the readme is sorely out of date.  I should update that I think.

41
Simulation / Re: Introducing DominionSim
« on: April 05, 2015, 07:45:44 pm »
I like the style of your code.  Very nice :).  I can understand your motivation for wanting to write it in your fav language.   I made similar choices of course when choosing to begin my simulator.   It does also run multi threaded - and the core game engine itself makes 0 decisions on behalf of the player.  One has to build up strategy code on top of the core engine. I do have a UI I have coded up which dynamically allows one to tune a strategy without recompiling.   I'll have to make an updated post on this thread I think

I like the approach of your declaration language for DiminonSim.  I will be keeping an eye on it to see if I can borrow any ideas ;)

For convenience, here's what my implementation of Mine ended up looking like.  Thought it's kind of cheating showing this code.  It's obviously just special casing a helper method.  (as the pattern of trashing and gaining another card is common - and I like code reuse ;) )   

Code: [Select]
public class Mine
        : Card
    {
        public static Mine card = new Mine();

        private Mine()
            : base("Mine", Expansion.Base, coinCost: 5, isAction: true)
        {
        }

        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RequestPlayerTrashCardFromHandAndGainCard(
                        gameState,
                        card => card.isTreasure,
                        CostConstraint.UpTo,
                        3,
                        CardRelativeCost.RelativeCost,
                        isOptionalToTrash: false,
                        isOptionalToGain: false,
                        defaultLocation: DeckPlacement.Hand);
        }
    }

One interesting differentiation I see in the approach you are taking is the "try all permuation" approach to evaluating strategies.   I considered this approach, but I was worried that the branching factor would become too high.   For example, a hand with cellar and a bunch of pawns has quite a high branching factor for searching the entire space.   I have a friend who also advocated for the approach you are taking - but he never implemented it.  I'm looking forward to seeing more of your results.

It's an interesting approach you are taking with continuations.   Unfortunately modifying dominulator to use continuations would require revisiting each card.  I likely won't have time to do that.    However, I always considered that if I wanted to employ a solution that requires iterating the permutations of all available actions - would I would do is clone the gamestate at key points (probably the beginning of each players turn), and then build up a description of actions the user would take during that turn.    One description might cellar one set of cards, and a second and third description might cellar different sets.    With this approach, one would be able to look at the set of descriptions as a whole, and perhaps remove obviously uninteresting, or repetitive permutations.  I'm just musing now.   

42
Simulation / Re: Introducing DominionSim
« on: April 02, 2015, 11:32:58 am »
Very nice!   Implementing all of the cards takes quite a bit of time.  I had the same thought process as you - but a couple years later, I still have 3 cards left to implement.

Have you considered building on top of an existing engine?  It may not be easy on top of the more popular ones, but Dominulator should have the infrastructure you need.   You'll find references to it in this forum.   It's a c# backend which has separated the rules of the game from the choices players make.   Just about all of the cards (excluding Adventures) have been implemented.  (though unit tests are minimal).   On my PC, it can simulate a turn from rules similar to Geronimos in about 2 microseconds.  A whole game takes about 83 microseconds. 

Theoretically, you would just have to implement this interface to get all of the cards working:

Code: [Select]
public interface IPlayerAction
{       
        int GetCountToReturnToSupply(Card card, GameState gameState);
        Card BanCardToDrawnIntoHandFromRevealedCards(GameState gameState);
        Card BanCardForCurrentPlayerPurchase(GameState gameState);       
        Card ChooseCardToPlayFirst(GameState gameState, Card card1, Card card2);       
        Card GetTreasureFromHandToPlay(GameState gameState, CardPredicate acceptableCard, bool isOptional);
        Card GetCardFromSupplyToEmbargo(GameState gameState);
        Card GetCardFromSupplyToPlay(GameState gameState, CardPredicate acceptableCard);
        Card GetCardFromSupplyToBuy(GameState gameState, CardPredicate acceptableCard);
        Card GetCardFromSupplyToGain(GameState gameState, CardPredicate acceptableCard, bool isOptional);
        Card GuessCardTopOfDeck(GameState gameState);
        Card NameACard(GameState gameState);
        Card GetCardFromTrashToGain(GameState gameState, CardPredicate acceptableCard, bool isOptional);       
        Card GetCardFromPlayToTopDeckDuringCleanup(GameState gameState, CardPredicate acceptableCard, bool isOptional);
        Card GetCardFromDiscardToTopDeck(GameState gameState, bool isOptional);
        Card GetCardFromRevealedCardsToTopDeck(GameState gameState, bool isOptional);
        Card GetCardFromRevealedCardsToTrash(GameState gameState, CardPredicate acceptableCard);
        Card GetCardFromRevealedCardsToPutOnDeck(GameState gameState);
        Card GetCardFromRevealedCardsToDiscard(GameState gameState);
        Card GetCardFromHandToDeferToNextTurn(GameState gameState);
        Card GetCardFromHandToDiscard(GameState gameState, CardPredicate acceptableCard, bool isOptional);
        Card GetCardFromHandToIsland(GameState gameState);
        Card GetCardFromHandToPassLeft(GameState gameState);       
        Card GetCardFromHandToPlay(GameState gameState, CardPredicate acceptableCard, bool isOptional);
        Card GetCardFromHandToReveal(GameState gameState, CardPredicate acceptableCard); // always optional
        Card GetCardFromHandToTopDeck(GameState gameState, CardPredicate acceptableCard, bool isOptional);       
        Card GetCardFromHandToTrash(GameState gameState, CardPredicate acceptableCard, bool isOptional, CollectionCards cardsTrashedSoFar);       
        Card GetCardFromHandOrDiscardToTrash(GameState gameState, CardPredicate acceptableCard, bool isOptional, out DeckPlacement deckPlacement);
        Card GetCardFromOtherPlayersHandToDiscard(GameState gameState, PlayerState otherPlayer);
        Card GetCardFromOtherPlayersRevealedCardsToTrash(GameState gameState, PlayerState otherPlayer, CardPredicate acceptableCard);
        int GetNumberOfCoppersToPutInHandForCountingHouse(GameState gameState, int maxNumber);
        bool ShouldPlayerDiscardCardFromDeck(GameState gameState, PlayerState player, Card card);
        bool ShouldPlayerDiscardCardFromHand(GameState gameState, Card card);
        bool ShouldRevealCardFromHandForCard(GameState gameState, Card card, Card cardFor);
        bool ShouldRevealCardFromHand(GameState gameState, Card card);
        bool ShouldPutCardInHand(GameState gameState, Card card);
        bool WantToResign(GameState gameState);       
        bool ShouldPutDeckInDiscard(GameState gameState);
        bool ShouldPutCardOnTopOfDeck(Card card, GameState gameState);
        bool ShouldTrashCard(GameState gameState, Card card);
        bool ShouldGainCard(GameState gameState, Card card);
        PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice);
        DeckPlacement ChooseBetweenTrashAndTopDeck(GameState gameState, Card card);
        DeckPlacement ChooseBetweenTrashTopDeckDiscard(GameState gameState, Card card);
        string PlayerName { get; }       
        int GetCoinAmountToOverpayForCard(GameState gameState, Card card);
        int GetCoinAmountToSpendInBuyPhase(GameState gameState);
        int GetCoinAmountToUseInButcher(GameState gameState);
        void ChooseLocationForStashAfterShuffle(GameState gameState, int[] locations);
    }

And you could watch what happens during a game using this interface

Code: [Select]
public interface IGameLog
        : IDisposable
    {
        void PushScope();
        void PopScope();
        void BeginRound(PlayerState playerState);
        void EndRound(GameState gameState);
        void BeginPhase(PlayerState playerState);
        void EndPhase(PlayerState playerState);
        void BeginTurn(PlayerState playerState);
        void EndTurn(PlayerState playerState);
        void PlayerNamedCard(PlayerState playerState, Card card);
        void PlayerRevealedCard(PlayerState playerState, Card card, DeckPlacement source);
        void PlayerBoughtCard(PlayerState playerState, Card card);       
        void PlayedCard(PlayerState playerState, Card card);
        void CardWentToLocation(DeckPlacement deckPlacement);
        void ReceivedDurationEffectFrom(PlayerState playerState, Card card);
        void PlayerGainedCard(PlayerState playerState, Card card);
        void PlayerDiscardCard(PlayerState playerState, Card card, DeckPlacement source);
        void PlayerTrashedCard(PlayerState playerState, Card card);
        void PlayerPutCardInHand(PlayerState playerState, Card card);
        void PlayerTopDeckedCard(PlayerState playerState, Card card);
        void PlayerSetAsideCardFromHandForNextTurn(PlayerState playerState, Card card);
        void PlayerReturnedCardToHand(PlayerState playerState, Card card);
        void PlayerReturnedCardToPile(PlayerState playerState, Card card);
        void DrewCardIntoHand(PlayerState playerState, Card card);
        void DiscardedCard(PlayerState playerState, Card card);
        void ReshuffledDiscardIntoDeck(PlayerState playerState);
        void StartGame(GameState gameState);
        void EndGame(GameState gameState);
        void PlayerGainedPotion(PlayerState playerState, int potionCount);
        void PlayerGainedCoin(PlayerState playerState, int coinAmount);
        void PlayerGainedCoinToken(PlayerState playerState, int coinAmount);
        void PlayerGainedActions(PlayerState playerState, int actionAmount);
        void PlayerGainedBuys(PlayerState playerState, int actionAmount);
        void PlayerOverpaidForCard(Card boughtCard, int overPayAmount);
        void PlayerGainedVictoryTokens(PlayerState playerState, int amount);
        void PlayerChoseLocationForStash(PlayerState playerState, int[] positions);
    }


43
Simulation / Re: Apothecary Golden Deck-Simulation help
« on: October 01, 2014, 07:30:17 pm »
EDIT: BTW, which BM are you comparing to? BMU?

Something similar to BMU from Dominator.   Just buying provinces without duchies isn't really interesting to compare against.

44
Simulation / Re: Apothecary Golden Deck-Simulation help
« on: October 01, 2014, 07:27:01 pm »
Did you implement a ppr rule?  With 2 provinces remaining you want to buy/trash gold so that you end the game on your turn. I'd imagine this would be quite significant.

The simulator does not have a PPR implemented - for any of the strategies.    I wonder how it affects the game when both players ignore the rule ;).    I may try to add the rule to see how it affects and report back

45
Simulation / Re: Apothecary Golden Deck-Simulation help
« on: October 01, 2014, 12:09:04 am »
This looked like fun to try.  I have tried to answer part 1 using dominulator.   I will try other parts later perhaps :)

tl;dr.   Potion/nothing seems like the best opening.

All comparisons vs BigMoney.

potion/nothing = 90% win rate
Potion/copper = 83%
Potion/silver = 78.5%
Getting bishop/silver before potion = 62%

Some other interesting results:

Preferring bishop over 4 apothecaries = 87%

I.e. for the first 4 apothecaries, if you have to choose, buy the apothecary before the bishop.

The win % for the simulator is a couple % points higher when it favors placing apothecaries on the deck last (so they are drawn first)

Incidentally, trashing the potion near the end of the game is key to a strong finish.  When I neglected to trash the potion, the win rate was only 66%

Here's the code.  Attached is some pretty graphs:

Code: [Select]
class MyPlayerAction
            : PlayerAction
        {
            public MyPlayerAction()
                : base("ApothecaryBishop",
                    purchaseOrder: PurchaseOrder(),
                    actionOrder: ActionOrder(),
                    trashOrder: TrashOrder())
            {
            }

            public override Card GetCardFromRevealedCardsToTopDeck(GameState gameState, bool isOptional)
            {
                var result = gameState.Self.CardsBeingRevealed.FindCard(card => card != Cards.Apothecary);
               
                if (result != null) return result;
               
                return base.GetCardFromRevealedCardsToTopDeck(gameState, isOptional);
            }
        }

        private static ICardPicker PurchaseOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Province),
                        CardAcceptance.For(Cards.Potion, 1),
                        CardAcceptance.For(Cards.Apothecary, 4),
                        CardAcceptance.For(Cards.Bishop, 1),
                        CardAcceptance.For(Cards.Apothecary),
                        CardAcceptance.For(Cards.Copper, 7));
        }

        private static ICardPicker ActionOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Apothecary, ShouldPlayApothecary),
                        CardAcceptance.For(Cards.Bishop));
        }

        private static ICardPicker TrashOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Curse),
                        CardAcceptance.For(Cards.Potion, ShouldTrashPotion),
                        CardAcceptance.For(Cards.Province, ShouldTrashProvince),
                        CardAcceptance.For(Cards.Estate, gameState => CountAllOwned(Cards.Estate, gameState) > 1 || ShouldTrashLastEstate(gameState)),
                        CardAcceptance.For(Cards.Bishop, gameState => CountAllOwned(Cards.Bishop, gameState) > 1));
        }

        private static bool ShouldTrashPotion(GameState gameState)
        {
            bool isSelfPlaying = gameState.CurrentContext.IsSelfPlaying(gameState);
            if (!isSelfPlaying)
                return false;

            if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 7 && CountOfPile(Cards.Province, gameState) <= 3)
                return true;

            return false;
        }

        private static bool ShouldTrashProvince(GameState gameState)
        {
            bool isSelfPlaying = gameState.CurrentContext.IsSelfPlaying(gameState);
            if (!isSelfPlaying)
                return false;

            if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 7)
                return true;

            return false;
        }

        private static bool ShouldTrashLastEstate(GameState gameState)
        {
            if (CountAllOwned(Cards.Province, gameState) > 0)
                return true;

            if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 7)
                return true;

            return false;
        }

        private static bool ShouldPlayApothecary(GameState gameState)
        {
            if (gameState.Self.CardsInDeckAndDiscard.Where(card => card != Cards.Apothecary).Any())
                return true;
            return false;
        }

46
Simulation / Re: Need help with a simulation
« on: September 12, 2014, 05:49:59 pm »
Simulation is fun :)   This strategy combo is near the top of the ones I have written so far.  I especially like how it smashes ill gottens gains ;)

This is the difference in win%.   The strategies > 0 did better than HermitFeodum.  The others did worse.

Code: [Select]
64.0% difference for GardensBeggarIronworks
59.6% difference for RebuildMonument
57.3% difference for RatsWanderingMinstrelWatchtowerArmory
43.2% difference for KingsCourtRabbleExpandFarmingVillage
33.8% difference for RebuildJack
30.1% difference for HermitMarketSquare
17.5% difference for RebuildAdvanced
11.7% difference for LookoutSalvagerLibraryHighwayFestival
9.8% difference for FishingVillageChapelPoorHouse
4.3% difference for CaravanBridgeDukeCartographer
=====>
-2.1% difference for HermitFeodum
-6.7% difference for BigMoneyCultist
-16.7% difference for BigMoneyColony
-17.3% difference for MountebankMonumentHamletVineyard
-18.2% difference for Rebuild
-19.4% difference for EmbassyTunnelSpiceMerchantPlaza
-20.6% difference for FishingVillageChapelPoorHouseTalisman
-20.9% difference for FishingVillageLibraryCountPoorHouse
-28.3% difference for AmbassadorCaravanApprenticeMerchantGuild
-30.7% difference for RebuildDuke
-31.6% difference for FeodumDevelop
-34.6% difference for BigMoneyCouncilRoomEarlyProvince
-35.8% difference for BigMoneyFishingVillageJack
-38.1% difference for BigMoneyWharf
-40.4% difference for NomadCampLaboratorySpiceMerchantWarehouse
-41.3% difference for AmbassadorCaravanLaboratory
-42.2% difference for BigMoneySingleJack
-44.2% difference for FishingVillageJackLookout
-46.4% difference for BigMoneyDoubleSmithy
-46.5% difference for BigMoneyDoubleWitch
-46.7% difference for BigMoneySingleSmithy
-48.5% difference for BigMoneyDoubleJack
-50.1% difference for LaboratorySpiceMerchantWarehouse
-52.3% difference for DuchyDukeWarehouseEmbassy
-55.5% difference for BigMoneySmithyEarlyProvince
-57.3% difference for BigMoneyDoubleJackSlog
-59.4% difference for MineHoard
-60.3% difference for BigMoneySingleWitch
-60.4% difference for CacheCountingHouseBridgeTunnel
-63.3% difference for RemakeSoothsayer
-63.7% difference for TreasureMapDoctor
-64.4% difference for LookoutTraderNobles
-65.8% difference for ButcherPlazaWatchtower
-67.5% difference for TreasureMap
-67.8% difference for RatsUpgradeBazaar
-69.6% difference for MintBaker
-70.3% difference for DevelopFeastMysticTunnel
-70.7% difference for Doctor
-70.8% difference for BigMoneyBridge
-71.0% difference for ArmoryConspiratorForagerGreatHall
-71.7% difference for TaxMan
-73.2% difference for HorseTraderSoothsayerMinionGreatHall
-74.2% difference for LookoutHaremMiningVillageMysticScout
-75.3% difference for BigMoneyMoneylender
-76.0% difference for DoubleWarehouse2
-77.6% difference for DoubleWarehouse
-79.2% difference for BigMoneyThief
-79.5% difference for DeathCartDoubleWarehouse
-81.1% difference for RatsUpgrade
-82.5% difference for BigMoney
-82.5% difference for Harem
-84.5% difference for MountebankGovernorMaurader
-85.2% difference for BigMoneyDelayed
-88.0% difference for Lookout
-88.5% difference for FamiliarPotionSilverOpenning
-88.7% difference for IronworksGreathallRemodelHuntingGrounds
-89.9% difference for ProcessionGraverobber
-92.8% difference for FamiliarSilverSilverOpenning
-94.2% difference for BigMoneySimple
-97.1% difference for GovernorMarketsquare
-98.0% difference for IllgottengainsMoneylender
-98.4% difference for Illgottengains
-100.0% difference for ChapelCanTripKingsCourtMasquerade
-100.0% difference for GovernorJunkdealer
-100.0% difference for MountebankHoard

47
Simulation / Re: Need help with a simulation
« on: September 12, 2014, 05:28:47 pm »
Here's the solution in dominulator:

Code: [Select]
    public class HermitFeodum
        : Strategy
    {
           
        public static PlayerAction Player()
        {
            return new PlayerAction(
                        "HermitFeodum",                           
                        purchaseOrder: PurchaseOrder(),
                        actionOrder: ActionOrder(),
                        trashOrder: TrashOrder(),                           
                        gainOrder: GainOrder(),
                        chooseDefaultActionOnNone:false);
        }

        private static ICardPicker PurchaseOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Province, gameState => CountAllOwned(Cards.Silver, gameState) < 18 || CountOfPile(Cards.Feodum, gameState) == 0 ),
                        CardAcceptance.For(Cards.Feodum, ShouldGainFeodum),
                        // open up double hermit
                        CardAcceptance.For(Cards.Hermit, gameState => CountAllOwned(Cards.Silver, gameState) == 0 && CountAllOwned(Cards.Hermit, gameState) < 2),
                        CardAcceptance.For(Cards.Silver));
        }

        private static ICardPicker GainOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Hermit, gameState => gameState.Self.ExpectedCoinValueAtEndOfTurn < 3),                       
                        CardAcceptance.For(Cards.Silver),
                        CardAcceptance.For(Cards.Estate));
        }

        private static CardPickByPriority ActionOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Madman),
                        CardAcceptance.For(Cards.Hermit));
        }

        private static CardPickByPriority TrashOrder()
        {
            return new CardPickByPriority(
                        CardAcceptance.For(Cards.Feodum, ShouldTrashFeodum),
                        CardAcceptance.For(Cards.Estate),
                        CardAcceptance.For(Cards.Copper));
        }

        private static bool ShouldTrashFeodum(GameState gameState)
        {         
            int countSilvers = CountAllOwned(Cards.Silver, gameState);
            int countFeodum = CountAllOwned(Cards.Feodum, gameState);

            // if you have trashed 2 or less feodum, you should have less than 9 silvers.
            if (countSilvers < 8)
            {
                return true;
            }

            // otherwise maximize feodum points
            int scoreTrashNothing = CardTypes.Feodum.VictoryCountForSilver(countSilvers) * countFeodum;
            int scoreTrashFeodum = CardTypes.Feodum.VictoryCountForSilver((countSilvers + 4)) * (countFeodum - 1);

            return scoreTrashFeodum > scoreTrashNothing;
        }

        private static bool ShouldGainFeodum(GameState gameState)
        {
           
            int countSilvers = CountAllOwned(Cards.Silver, gameState);

            if (countSilvers > 9)
            {
                return true;
            }

            //hermits left in draw pile >0 && cards left in drawpile [mod 5] / cards left in draw pile <= 0,2

            bool hasHermitInDrawPile = CountInDeck(Cards.Hermit, gameState) > 0;
            bool atLeast80PercentChanceOfDrawingBeforeShuffle = (((double)(gameState.Self.CardsInDeck.Count % 5)) / gameState.Self.CardsInDeck.Count) < 0.2;

            if (hasHermitInDrawPile && atLeast80PercentChanceOfDrawingBeforeShuffle)
                return true;

            return false;
        }
    }

Attached is a full HTML report of how the strategy compares to BigMoney.  It wins 90% of the games as coded.

There is one added heuristic that you didn't request.  The strategy will trash a feodum if it increases the total point value.

I may not have coded exactly what you were looking for.  Let me know if u want any changes.


48
Simulation / Re: Dominulator: A flexible dominion engine simulator
« on: September 12, 2014, 09:55:13 am »
I have recently gone back to work full time, so I am not spending nearly as much time on the simulator.   I still have time to implement any strategies/functionality and/or integrate any changes people may have.

I haven't pushed any changes in a while because I've been busy refactoring the code for clarity.    I just pushed those changes up to github now.  I have also updated the readme.md.  Please check it out.   There's a lot more functionality now than when I first released the simulator :)  You may find the webapp interesting.

Happy simulating.

49
Simulation / Re: Ambassador, the card of openning luck?
« on: November 20, 2013, 04:14:23 pm »
Quote
simply adding Lab and Caravan to the simulation doesn't really help with that

Agreed that these do not make an engine.  My goal in adding them was so that there would be interesting cards at the 4 and 5 purchase price point - cards that also are good for ambassador, as they assist in draw.

Quote
Simulations are far less useful when it comes to engine strategies

That's an interesting statement.  Why?  Do you have an example engine strategy, preferably involving ambassador, that you would like to see some simulator stats on?   If you have a link to an example game on goko that's even better.   If someone posts a good one, I'll even try to show the effect of luck on the engine in a mirror match up.   If there is a set of cards with 2 competing engines, also involving ambassador - even better.   I have been able to simulate every engine I have tried to simulate to date, so I'm not sure what you mean.


50
Simulation / Re: Ambassador, the card of openning luck?
« on: November 20, 2013, 01:44:17 pm »
Quote
you can probably do something with "perfect shuffle luck" to get ambassador with two estates then two coppers t3/t4, and I would be interested to see how this fares against the A/S perfect shuffle luck.

I assumed that by A/S perfect shuffle luck, you mean the player ambassadors 2 estates, and also hits silver with 4 coppers, enabling an early gold.   

58.13% win for SingleAmbassador  (Open ambassador/silver. Turn 3 ambassador 2 estates, Turn 4 buy Gold)
39.22% win for DoubleAmbassador (open ambassador/ambassador.  Turn 3 ambassador 2 estates, Turn 4 Ambassador 2 copper)
2.65% there is a tie.

For completeness sake, here's single ambassador vs double ambassador in BigMoney situation. (using tactics mentioned above)
52.51% win for SingleAmbassador
45.66% win for DoubleAmbassador
1.83% there is a tie.

Thank you for the article link above.  One of the topics discussed is whether it's better to return 2 coppers or 1 estate. This is a little bit deviating from the original topic of Ambassador luck, lets see what the simulators can tell us about ambassador tactics in big money.   

I have written 3 different Ambassador tactics. 
   1)  AmbassadorAlwaysReturnBestTrash - Always return the card with the highest Trash Priority.  (estates over copper). 
   2)  AmbassadorReturnIfNotDisruptPurchase - Similar to 1, except becareful when returning copper.  Never return so many coppers on the current hand that it changes what you would buy this turn.   In BigMoney, this translates to ambassador + 4 copper would return 1 copper still enabling purchase of a  silver.  Ambassador + 3 copper would return nothing, as that would disrupt a silver purchase.
   3) AmbassadorMaxReturn - Always prefer to trash 2 of a card - even if you could return 1 of a card of a lower trash priority.  In otherwords.  Prefer 2 estates over 2 coppers.  Prefer 2 coppers over 1 estate.  etc ...

And here's the round robin results using BigMoney, and a single ambassador:

35.39% win for AmbassadorMaxReturn
61.84% win for AmbassadorReturnIfNotDisruptPurchase
2.77% there is a tie.

44.57% win for AmbassadorAlwaysReturnBestTrash
52.38% win for AmbassadorReturnIfNotDisruptPurchase
3.05% there is a tie.

39.57% win for AmbassadorMaxReturn
57.48% win for AmbassadorAlwaysReturnBestTrash
2.95% there is a tie.

Maybe these results are skewed because it's bigmoney.  Let's add Caravan and Laboratory into the mix to see if that changes the rankings:

26.27% win for AmbassadorMaxReturn
72.12% win for AmbassadorReturnIfNotDisruptPurchase
1.61% there is a tie.

45.49% win for AmbassadorAlwaysReturnBestTrash
52.19% win for AmbassadorReturnIfNotDisruptPurchase
2.32% there is a tie.

31.52% win for AmbassadorMaxReturn
66.76% win for AmbassadorAlwaysReturnBestTrash
1.72% there is a tie.

From these simulator guided results, the conclusion seems to be that returning 2 coppers over 1 estate is a bad idea.  (This also matches my intuition personally).  It also appears that even though the temptation is great to ambassador as many coppers as possible, it seems like you should NOT disrupt your current purchase order to ambassador an extra copper away...

Of course, please keep in context that these are simulator results - and it would not be surprising to find that the very best dominion players can outwit these odds through human ingenuity.  However, I'm not of the very best players, and to my intermediate dominion playing skills these numbers reflect my experience.

For reference, here's the 3 tactics

Code: [Select]
    public class AmbassadorAlwaysReturnBestTrash
      : UnimplementedPlayerAction
    {
        private readonly PlayerAction playerAction;

        public AmbassadorAlwaysReturnBestTrash(PlayerAction playerAction)
        {
            this.playerAction = playerAction;
        }

        public override Card GetCardFromHandToReveal(GameState gameState, CardPredicate acceptableCard)
        {
            Card cardToReturn = playerAction.trashOrder.GetPreferredCard(gameState, card => gameState.Self.Hand.HasCard(card) && acceptableCard(card));           
            return cardToReturn;
        }

        public override int GetCountToReturnToSupply(Card cardToReturn, GameState gameState)
        {           
            return 2;           
        }
    }

    public class AmbassadorReturnIfNotDisruptPurchase
      : UnimplementedPlayerAction
    {
        private readonly PlayerAction playerAction;

        public AmbassadorReturnIfNotDisruptPurchase(PlayerAction playerAction)
        {
            this.playerAction = playerAction;
        }

        public override Card GetCardFromHandToReveal(GameState gameState, CardPredicate acceptableCard)
        {
            Card cardToReturn = playerAction.trashOrder.GetPreferredCard(gameState, card => gameState.Self.Hand.HasCard(card) && acceptableCard(card));
            if (cardToReturn == null)
                return null;
           
            PlayerState self = gameState.Self;
            int currentCoin = self.ExpectedCoinValueAtEndOfTurn;
            int coinCountIfReturn = currentCoin - cardToReturn.plusCoin;

           
            if (currentCoin < Dominion.Cards.Gold.DefaultCoinCost)
                return cardToReturn;
           
            Card cardWithAllCoin = playerAction.GetCardFromSupplyToBuy(gameState, card => card.CurrentCoinCost(self) <= currentCoin);
            Card cardWithReturnedCard = playerAction.GetCardFromSupplyToBuy(gameState, card => card.CurrentCoinCost(self) <= coinCountIfReturn);

            if (cardWithAllCoin != cardWithReturnedCard)
                return null;

            return cardToReturn;
        }

        public override int GetCountToReturnToSupply(Card cardToReturn, GameState gameState)
        {
           
            PlayerState self = gameState.Self;
            int currentCoin = self.ExpectedCoinValueAtEndOfTurn - cardToReturn.plusCoin;
            int coinCountIfReturn = currentCoin - cardToReturn.plusCoin;


            if (currentCoin < Dominion.Cards.Gold.DefaultCoinCost)
                return 2;
           
            Card cardWithAllCoin = playerAction.GetCardFromSupplyToBuy(gameState, card => card.CurrentCoinCost(self) <= currentCoin);
            Card cardWithReturnedCard = playerAction.GetCardFromSupplyToBuy(gameState, card => card.CurrentCoinCost(self) <= coinCountIfReturn);

            if (cardWithAllCoin != cardWithReturnedCard)
                return 1;
           
            return 2;
        }
    }

    public class AmbassadorMaxReturn
      : UnimplementedPlayerAction
    {
        private readonly PlayerAction playerAction;

        public AmbassadorMaxReturn(PlayerAction playerAction)
        {
            this.playerAction = playerAction;
        }

        public override Card GetCardFromHandToReveal(GameState gameState, CardPredicate acceptableCard)
        {
            int maxCount = 0;
            // find out which card that is wanted to be trashed you have most of in hand.
            foreach (Card card in playerAction.trashOrder.GetNeededCards())
            {
                maxCount = Math.Max(maxCount, gameState.Self.Hand.CountOf(card));
            }

            if (maxCount > 2)
                maxCount = 2;

            Card cardToReturn = playerAction.trashOrder.GetPreferredCard(gameState, card => gameState.Self.Hand.CountOf(card) >= maxCount && acceptableCard(card));
            return cardToReturn;
        }

        public override int GetCountToReturnToSupply(Card cardToReturn, GameState gameState)
        {
            return 2;
        }
    }


Pages: 1 [2] 3 4

Page created in 1.52 seconds with 18 queries.