Dominion Strategy Forum

Please login or register.

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

Author Topic: Improvement on BankWharf  (Read 2532 times)

0 Members and 1 Guest are viewing this topic.

Jorbles

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1468
  • Respect: +531
    • View Profile
Improvement on BankWharf
« on: November 23, 2011, 07:28:23 pm »
0

I often tend to buy Duchies at 4 instead of 5 and was wondering how that simulated. Interestingly it improved on BankWharf in Province games and Colony games (though only very slightly in Colony games). It did not improve the DoubleJack algorithm.

Code: [Select]
# Play Big Money including Banks, except buy Wharf with every $5 buy.
# This differs from Geronimoo's BankWharf in that Duchies are bought
# when there are only 4 Provinces left, instead of when there are only 5 left.
{
  name: 'BankWharfD4'
  author: 'Jorbles'
  requires: ['Bank', 'Wharf']
  gainPriority: (state, my) -> [
    "Colony" if my.countInDeck("Platinum") > 0
    "Province" if state.countInSupply("Colony") <= 6
    "Duchy" if state.gainsToEndGame() <= 4
    "Estate" if state.gainsToEndGame() <= 2
    "Platinum"
    "Bank"
    "Gold"
    "Wharf"
    "Silver"
    "Copper" if state.gainsToEndGame() <= 3
  ]
}
« Last Edit: November 23, 2011, 07:44:34 pm by Jorbles »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Improvement on BankWharf
« Reply #1 on: November 23, 2011, 08:30:25 pm »
0


As a general rule, I find the simulators prefer buying duchies with 4 provinces remaining in a 2 player game and you can test up and down from there. In colony games the duchies should sometimes only bought with 2 colonies/provinces left in the supply. There is also quite a lot of advantage to be gained from the right purchasing conditions based on the supply piles, difference in vp scores, and so on. However, you're generally more interested in comparing different scripts for their action and treasure purchasing so you might as well have a simplified vp strategy in all the scripts and concentrate on the kingdom cards.
Logged

Jorbles

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1468
  • Respect: +531
    • View Profile
Re: Improvement on BankWharf
« Reply #2 on: November 24, 2011, 12:37:11 pm »
0

Is it not better to optimize the simple strategies that we're comparing things to though? I get that we want things to be simple, but we're likely going to be tweaking whatever scripts we're building to optimize so shouldn't the default comparison scripts also be optimized?
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Improvement on BankWharf
« Reply #3 on: November 24, 2011, 01:27:47 pm »
+1

Quote
I get that we want things to be simple, but we're likely going to be tweaking whatever scripts we're building to optimize so shouldn't the default comparison scripts also be optimized?
It depends what you want to do with your script. If you want to make a fantastic optimized script then yes, compare it against other optimized scripts. If you want to see whether buying an oasis or a silver might have improved a game from yesterday then perhaps it is a good idea to use a simple model. Detailed optimizations need to be reworked if you make high level changes. More conditions can often lead to more logic errors.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Improvement on BankWharf
« Reply #4 on: November 24, 2011, 02:01:46 pm »
0

Awesome.

I can probably get to it later, but if you're really motivated, you could go on GitHub (https://github.com/rspeer/dominiate/), make a fork, and edit the strategy right there. I'd be happy to have each strategy be as good as it can be.
Logged

Jorbles

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1468
  • Respect: +531
    • View Profile
Re: Improvement on BankWharf
« Reply #5 on: November 24, 2011, 07:32:09 pm »
0

I think I put the fork in, but I'm not very experienced with github.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Improvement on BankWharf
« Reply #6 on: November 27, 2011, 01:23:34 am »
0

You did it right. It's now up on the site. Thanks.
Logged
Pages: [1]
 

Page created in 0.068 seconds with 21 queries.