Dominion Strategy Forum

Please login or register.

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

Author Topic: Noble Brigand bot (PROBABLE SIMULATOR BUG)  (Read 4583 times)

0 Members and 1 Guest are viewing this topic.

Epoch

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • Respect: +38
    • View Profile
Noble Brigand bot (PROBABLE SIMULATOR BUG)
« on: November 01, 2011, 05:37:23 pm »
0

This bot:

Code: [Select]
<player name="2xNoble Brigand" author="Epoch" description="Big Money + 2 Noble Brigands.  Waits until after turn 1/2 to buy the NBs, to minimize chances of just missing and hitting Coppers.">
 <type name="Province"/>
 <type name="UserCreated"/>
 <type name="SingleCard"/>
 <type name="Generated"/>
 <type name="Bot"/>
 <type name="TwoPlayer"/>
 <type name="BigMoney"/>
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Noble_Brigand">
      <condition>
         <left type="countCardsInDeck" attribute="Noble_Brigand"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
      <condition>
         <left type="countCardsInDeck" attribute="Silver"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>

Seems to beat Single Smithy, Single Mountebank, and Single Witch by substantial margins.

Can that seriously be right?
« Last Edit: November 01, 2011, 06:59:31 pm by Epoch »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Noble Brigand bot
« Reply #1 on: November 01, 2011, 06:46:50 pm »
0

I ran this script against a really strong script that I have tucked away and it showed a 95% win rate for the noble brigands with an average game length of 30 turns. I opened about 15 sample games in a row and my strong script had won all of them in under 20 turns. I'm guessing there is an error in the simulator somewhere that might not be carried through into sample games.
Logged

Epoch

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • Respect: +38
    • View Profile
Re: Noble Brigand bot
« Reply #2 on: November 01, 2011, 06:55:49 pm »
0

Hmmm, interesting theory.

I ran it against Mountebank (that's an optimized bot that buys two Mountebanks, btw), and it shows a 78.46% win rate for NBx2 with an average game length of 30.1 turns.

So here are 10 Sample games in a row:

Game 1:  NB LOSES, 28 turns.
Game 2:  NB LOSES, 20 turns.
Game 3:  NB LOSES, 19 turns.
Game 4:  NB LOSES, 27 turns.
Game 5:  NB LOSES, 23 turns.
Game 6:  NB LOSES, 23 turns.
Game 7:  NB LOSES, 25 turns.
Game 8:  TIE, 21 turns.
Game 9:  NB WINS, 26 turns.
Game 10:  NB LOSES 20 turns.

That certainly decent evidence for DG's hypothesis that there's something different about the sample game play and the multi-game play.  And, on the face of it, I'd tend to agree with DG that it's likely that the sample game play is correct and the multi-game play is incorrect, because... NB?  Beats Mountebank?  It doesn't seem likely.

Geronimoo, can you investigate?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #3 on: November 02, 2011, 02:58:58 am »
0

Hi I have similiar issue with Monument.  Ran it yesterday, first to test against JoaT, where it loses greatly, and than to confirm against Smithy, Wharf etc.. I remembered Monument to be on par with these, however it also lost. Reading this thread, I now tested against BMU, where it went like 50:50.

So inspired by Epochs/DGs posts I ran 100 sample games Monument:BMU, Monument wins 81. Winning 19 or less out of 100 coin flips has probability 5x10^-5.

So then I noticed that maybe that could be biased by firstplayer advantage, as the sample game keeps it fixed (for Monument), 50 games with switched positions (42 wins for Monument) makes me think that this is not the case. I'm not going to calculate a probability for this, it should be small.

And once we are there: JoaT:Mountebank 28:22 with firstplayer advantage JoaT...

ceterum censeo: A "generate 100 sample games" button would be nice...

Edit: NB-Mountebank 14:35
Edit2: Logs deleted.
« Last Edit: November 06, 2011, 06:24:10 am by DStu »
Logged

boloni

  • Steward
  • ***
  • Offline Offline
  • Posts: 25
  • Respect: +8
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #4 on: November 02, 2011, 03:00:30 pm »
0

I simulated games between 2xNoble Brigand and SingleWitch in Geronimoo's Simulator and Dominioate. After 10000 Games 2xNoble Brigand wins 80%:18% in Geronimoo's Simulator, but looses 31%:68% in Dominiate. Is there any difference in the two simulators that would explain the different numbers?
I used this bots:
SingleWitch for Geronimoo's Simulator:
Code: [Select]
<player name="SingleWitch">
   <buy name="Province">
      <condition>
         <left type="countCardsInDeck" attribute="Gold"/>
         <operator type="greaterThan" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Witch">
      <condition>
         <left type="countCardsInDeck" attribute="Witch"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Silver"/>
</player>
SingleWitch for Dominiate:
Code: [Select]
{
  name: 'SingleWitch'
  requires: ['Witch']
  gainPriority: (state, my) -> [
    "Province" if my.countInDeck("Gold") > 0
    "Witch" if my.countInDeck("Witch") == 0
    "Duchy" if 0 < state.gainsToEndGame() <= 5
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Platinum"
    "Gold"
    "Silver"
  ]
}
2xNoble Brigand for Dominioate:
Code: [Select]

{
  name: 'NobleBrigand'
  requires: ['Noble Brigand']
  gainPriority: (state, my) -> [
    "Province"
    "Duchy" if 0 < state.gainsToEndGame() <= 5
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Gold"
    "Noble Brigand" if my.countInDeck("Noble Brigand") < 2 \
             and my.countInDeck("Silver") > 2
    "Silver"
  ]
}
Logged

Epoch

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • Respect: +38
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #5 on: November 02, 2011, 04:58:47 pm »
0

I simulated games between 2xNoble Brigand and SingleWitch in Geronimoo's Simulator and Dominioate. After 10000 Games 2xNoble Brigand wins 80%:18% in Geronimoo's Simulator, but looses 31%:68% in Dominiate. Is there any difference in the two simulators that would explain the different numbers?

It seems like it's almost iron-clad likely that Geronimoo's simulator has a bug that affects Noble Brigand, and potentially other cards.
Logged

kn1tt3r

  • Minion
  • *****
  • Offline Offline
  • Posts: 585
  • Respect: +278
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #6 on: November 03, 2011, 07:54:19 am »
0

I simulated games between 2xNoble Brigand and SingleWitch in Geronimoo's Simulator and Dominioate. After 10000 Games 2xNoble Brigand wins 80%:18% in Geronimoo's Simulator, but looses 31%:68% in Dominiate. Is there any difference in the two simulators that would explain the different numbers?
You obviously used a Platinum (not Colony, however) bot for Dominiate's SingleWitch, whereas all the others are just with Golds. Platinum or not is a huge difference when playing against Noble Brigand.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #7 on: November 03, 2011, 08:12:23 am »
0

I simulated games between 2xNoble Brigand and SingleWitch in Geronimoo's Simulator and Dominioate. After 10000 Games 2xNoble Brigand wins 80%:18% in Geronimoo's Simulator, but looses 31%:68% in Dominiate. Is there any difference in the two simulators that would explain the different numbers?
You obviously used a Platinum (not Colony, however) bot for Dominiate's SingleWitch, whereas all the others are just with Golds. Platinum or not is a huge difference when playing against Noble Brigand.

When played correctly it should be, but as the Province is priorized over Platinum it only can be bought if you get to $9 before you bought a Gold (or if all your Gold got stolen by the NB). I don't think that happens too often.
But obviously one should just delete the line with Platinum.
Logged

Geronimoo

  • Saboteur
  • *****
  • Online Online
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #8 on: November 03, 2011, 08:25:09 am »
0

Thanks for noticing and reporting the bug. There's a problem when resetting the board: the Golds seem to disappear. This has an impact for all bots... so I wouldn't trust simulations until I fix this.
Logged

ehunt

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1532
  • Shuffle iT Username: ehunt
  • Respect: +1865
    • View Profile
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #9 on: November 03, 2011, 03:20:52 pm »
0

If the nature of the bug is that games are being played without a gold pile, why is Noble Brigand doing better, instead of worse, than expected?

Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4389
    • View Profile
    • WanderingWinder YouTube Page
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #10 on: November 03, 2011, 05:20:14 pm »
0

If the nature of the bug is that games are being played without a gold pile, why is Noble Brigand doing better, instead of worse, than expected?



Probably because things are sooooo slow, and silver is the really key card that both decks are buying lots of, so the Noble Brigand can get fairly well ahead on THE key card.

Geronimoo

  • Saboteur
  • *****
  • Online Online
  • Posts: 1059
  • Respect: +868
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Noble Brigand bot (PROBABLE SIMULATOR BUG)
« Reply #11 on: November 05, 2011, 06:55:48 am »
0

Bug is fixed!!!

You should upgrade automatically.
Logged
Pages: [1]
 

Page created in 0.044 seconds with 20 queries.