Dominion Strategy Forum

Please login or register.

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

Author Topic: Bug in Council Room logs with points for Fairgrounds  (Read 5734 times)

0 Members and 1 Guest are viewing this topic.

Varsinor

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 204
  • Respect: +63
    • View Profile
Bug in Council Room logs with points for Fairgrounds
« on: April 02, 2012, 08:36:03 am »
0

The game log page of Council Room does not calculate the points for Fairgrounds correctly in the score graph and in the per-turn-box at the bottom of the screen. It looks like this happens when someone has trashed all Estates (or probably also all Copper).

See here:

http://councilroom.com/game?game_id=game-20120401-160738-457cf980.html

In the end I had 4 Fairgrounds and 9 differently named cards. I had no Estates. The Fairgrounds were counted correctly as 2 points apiece on Isotropic and therefore also in the point values given at the beginning of the log on Council Room (total points 44). However, in the score graph and in the box at the bottom of the screen they are counted as 4 points apiece as if I had had 10 differently named cards (total points 52 at the end). My guess would be that this bug stems from the fact that Estates are listed as "0 Estate" and mistakenly counted as a differently named card in the deck.
« Last Edit: April 02, 2012, 08:40:01 am by Varsinor »
Logged

Varsinor

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 204
  • Respect: +63
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #1 on: June 06, 2012, 08:34:32 am »
0

No feedback on this?
Is anyone capable of doing this going to fix the bug?
Logged

Captain_Frisk

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1257
  • Respect: +1263
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #2 on: June 06, 2012, 09:13:32 am »
0

No feedback on this?
Is anyone capable of doing this going to fix the bug?

There's only one person capable of fixing it - and I'm not sure that he's interested in putting more effort into CR until we see what happens with the live version.
Logged
I support funsockets.... taking as much time as they need to get it right.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #3 on: June 06, 2012, 09:16:23 am »
0

No feedback on this?
Is anyone capable of doing this going to fix the bug?

There's only one person capable of fixing it - and I'm not sure that he's interested in putting more effort into CR until we see what happens with the live version.

anybody can fork on github and send a pull request...
But I'm a little bit lost on the code, that has gotten way to many files.

Edit: Got it: (https://github.com/rrenaud/dominionstats/blob/master/game.py)
Code: [Select]
def score_fairgrounds(deck_comp):
    return 2 * (len(deck_comp.keys()) / 5) * deck_comp['Fairgrounds']
Seems like you are right. Fix to?
Code: [Select]
def score_fairgrounds(deck_comp):
    return 2 * (len( [card for card in deck_comp.keys() where deck_comp[card]>0] ) / 5) * deck_comp['Fairgrounds']
« Last Edit: June 06, 2012, 09:39:32 am by DStu »
Logged

dor

  • Ambassador
  • ***
  • Offline Offline
  • Posts: 34
  • Respect: +23
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #4 on: June 06, 2012, 09:58:02 am »
+2

Code: [Select]
def score_fairgrounds(deck_comp):
    return 2 * (len( [card for card in deck_comp.keys() where deck_comp[card]>0] ) / 5) * deck_comp['Fairgrounds']

Use if instead of where.
This is a bit more readable IMO:
Code: [Select]
def score_fairgrounds(deck_comp):
    return  2 * (len([count for count in deck_comp.values() if count>0] ) / 5) * deck_comp['Fairgrounds']

Sent a pull request: https://github.com/rrenaud/dominionstats/pull/25
« Last Edit: June 06, 2012, 10:15:02 am by dor »
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #5 on: June 06, 2012, 10:06:36 am »
0

Oh, if you check my carny achievements, you'll see one where I scored like 49 VP off of fairgrounds.

I really don't know what the bug is that makes it think fairgrounds can ever be worth an odd number....

Not-really-an-edit: eh, here's the log: http://councilroom.com/game?game_id=game-20110820-065511-ed4a32d2.html

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #6 on: June 06, 2012, 10:31:17 am »
0

Oh, if you check my carny achievements, you'll see one where I scored like 49 VP off of fairgrounds.

I really don't know what the bug is that makes it think fairgrounds can ever be worth an odd number....

Not-really-an-edit: eh, here's the log: http://councilroom.com/game?game_id=game-20110820-065511-ed4a32d2.html

Code: [Select]
Carny
WanderingWinder 42 VP from Fairgrounds

But you also get scored 56 VPs from Fairgrounds the same game in the gamestate: (74VPs-2*Provice-Duchy-3*Estate) = 56. Again, 0 Potions in the deck, so probably you moved the Fairgrounds from 6 to 8 VPs each.
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #7 on: June 06, 2012, 11:01:39 am »
+3

Awesome, thanks :).  The fix is live!

I need more people to borderline flame me to convince other people to fix councilroom ;).
Logged

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
  • Respect: +6121
    • View Profile
    • Dominion Strategy
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #8 on: June 06, 2012, 11:09:53 am »
+3

Quote
I discovered that you'd never get an answer to a problem from Linux Gurus by asking. You have to troll in order for someone to help you with a Linux problem.  For example, I didn't know how to find files by contents and the man pages were way too confusing. What did I do? I knew from experience that if I just asked, I'd be told to read the man pages even though it was too hard for me.

Instead, I did what works. Trolling. By stating that Linux sucked because it was so hard to find a file compared to Windows, I got every self-described Linux Guru around the world coming to my aid. They gave me examples after examples of different ways to do it. All this in order to prove to everyone that Linux was better.

So if you're starting out Linux, I advise you to use the same method as I did to get help. Start the sentence with "Linux is gay because it can't do XXX like Windows can". You will have PhDs running to tell you how to solve your problems.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4381
    • View Profile
    • WanderingWinder YouTube Page
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #9 on: June 06, 2012, 11:15:33 am »
0

Oh, if you check my carny achievements, you'll see one where I scored like 49 VP off of fairgrounds.

I really don't know what the bug is that makes it think fairgrounds can ever be worth an odd number....

Not-really-an-edit: eh, here's the log: http://councilroom.com/game?game_id=game-20110820-065511-ed4a32d2.html

Code: [Select]
Carny
WanderingWinder 42 VP from Fairgrounds

But you also get scored 56 VPs from Fairgrounds the same game in the gamestate: (74VPs-2*Provice-Duchy-3*Estate) = 56. Again, 0 Potions in the deck, so probably you moved the Fairgrounds from 6 to 8 VPs each.


I'm looking based on my personal CR page:

[Carny]    49 VP from Fairgrounds
20 Aug 2011

Varsinor

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 204
  • Respect: +63
    • View Profile
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #10 on: June 06, 2012, 11:25:00 am »
0

I need more people to borderline flame me

Hey, no flame intended, borderline or otherwise! 8)
I didn't know who handles bug reports and just wanted to gently remind of the issue.
Glad it worked, thanks! :)
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Bug in Council Room logs with points for Fairgrounds
« Reply #11 on: June 06, 2012, 11:51:01 am »
0

Quote
I'm looking based on my personal CR page:

[Carny]    49 VP from Fairgrounds
20 Aug 2011

Yeah, the messages are stored when they are computed, so the bug is kind of baked into those.  I need to re-run the goal analyzer.
Logged
Pages: [1]
 

Page created in 0.048 seconds with 20 queries.