import logging import os import simplejson as json import time from dominioncards import EVERY_SET_CARDS from game import Game from primitive_util import PrimitiveConversion, ConvertibleDefaultDict from stats import MeanVarStat import dominionstats.utils.log import incremental_scanner import utils # Module-level logging instance log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) class CardStatistic(PrimitiveConversion): """ Per card statistics. win_weighted_accum_turn: Dictionary keyed by turn that correlates winning and gaining/buying the card on a given turn. It is weighted in the sense that if a card is bought twice in a given turn, it counts twice for that turn. win_diff_accum: Dictionary keyed by relative card advantage that correlates winning and have a surplus in the quanitity of a given card. Card advantages are rounded relative to the average number gained/bought by other players through the game.
import logging import os import simplejson as json import time from dominioncards import EVERY_SET_CARDS from game import Game from primitive_util import PrimitiveConversion, ConvertibleDefaultDict from stats import MeanVarStat import dominionstats.utils.log import incremental_scanner import utils # Module-level logging instance log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) class CardStatistic(PrimitiveConversion): """ Per card statistics. win_weighted_accum_turn: Dictionary keyed by turn that correlates winning and gaining/buying the card on a given turn. It is weighted in the sense that if a card is bought twice in a given turn, it counts twice for that turn. win_diff_accum: Dictionary keyed by relative card advantage that correlates winning and have a surplus in the quanitity of a given card. Card advantages are rounded relative to the average number gained/bought by other players through the game. """