Dominion Strategy Forum

Please login or register.

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

Author Topic: Horse Traders / Duke  (Read 1853 times)

0 Members and 1 Guest are viewing this topic.

Sherlock_Holmes

  • Pearl Diver
  • **
  • Offline Offline
  • Posts: 12
  • Respect: +3
    • View Profile
Horse Traders / Duke
« on: November 27, 2014, 02:15:09 pm »
+1

So, I'm new to code, but I gathered enough to program this *extremely* basic HT/Duke algorithm. It demolished Big Money - Embassy 60% to 40%; with the BM/E set to buy duchies at 6 provinces. However, I would like to do additional testing, like playing 2 HT/Duke algorithms vs. each other, or feat/duke vs ht/duke, etc. How do I program feast's gain ability?
{
  name: 'HT/Duke'
  requires: ['Duke', 'Horse Traders']
  gainPriority: (state, my) -> [
    "Duchy"
    "Duke"
    "Horse Traders" if my.countInDeck ("Horse Traders") <= 3
    "Silver"
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Copper"
  ]

  wantsToJM: (state, my) ->
    #my.draw.length >= 3
    true

  skipPriority: (state, my) -> [
    "Copper" if my.getTotalMoney() / my.numCardsInDeck() > 1
    "Province" if my.countInDeck("Province") > my.countInDeck("Duchy") \
               and my.countInDeck("Province") > my.countInDeck("Estate")
    "Duchy" if my.countInDeck("Duchy") > my.countInDeck("Estate")
    "Estate"
  ]
}

Logged
Pages: [1]
 

Page created in 0.037 seconds with 20 queries.