Dominion Strategy Forum

Meta => Feedback => Council Room Feedback => Topic started by: Varsinor on April 02, 2012, 08:36:03 am

Title: Bug in Council Room logs with points for Fairgrounds
Post by: Varsinor on April 02, 2012, 08:36:03 am
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.
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: Varsinor on June 06, 2012, 08:34:32 am
No feedback on this?
Is anyone capable of doing this going to fix the bug?
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: Captain_Frisk on June 06, 2012, 09:13:32 am
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.
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: DStu on June 06, 2012, 09:16:23 am
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']
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: dor on June 06, 2012, 09:58:02 am
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
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: WanderingWinder on June 06, 2012, 10:06:36 am
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
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: DStu on June 06, 2012, 10:31:17 am
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.
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: rrenaud on June 06, 2012, 11:01:39 am
Awesome, thanks :).  The fix is live!

I need more people to borderline flame me to convince other people to fix councilroom ;).
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: theory on June 06, 2012, 11:09:53 am
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.
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: WanderingWinder on June 06, 2012, 11:15:33 am
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
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: Varsinor on June 06, 2012, 11:25:00 am
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! :)
Title: Re: Bug in Council Room logs with points for Fairgrounds
Post by: rrenaud on June 06, 2012, 11:51:01 am
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.