You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new here, but I've been playing Dominion for about a year and keep up on DominionStrategy.com. Since I recently learned the ins and outs of CoffeeScript, I thought I could contribute to Dominate.
I was thinking about the best way to implement Embargo without being psychic like in Geronimoo's simulator. There are a few obvious ways that I can think of, the first of which would probably be easier to implement than the others:
Add a decision to choose the card to embargo, like the decisions to trash, discardHand, etc, in basicAI.coffee. By default, the decision would choose the most expensive card not in the AI's gainPriority method. (I don't know how we could "search" gainPriority seeing that it does not return all possible priorities, given the game state.) More intricate AIs would specify a custom embargoPriority() method.
Look at the cards that other players have bought, and embargo those. This could possibly done by looking at the size of the current stacks, such as by defining a method on State called getSmallestStack:
getSmallestStack: (omissions) ->supplyByCount=sortNumericAssociative(@supply.slice(0)) # we'd define sortNumericAssociative similar to how sortNumeric is definedfor card of supplyByCount
return card ifcard.namenotin omissions
getSmallestStack() would be called in embargoPriority(), and omissions would pass the value of @gainPriority:
The interesting part is guessing what your opponent wants.
I don't want to use Geronimoo's trick of peeking into the opponent's mind.
The text was updated successfully, but these errors were encountered: