(self)
return alive[self.current_player - 1] - alive[self.opponent_index - 1]
Very simple heuristic counting 'alive' hands
Very simple heuristic counting 'alive' hands
Very simple heuristic counting alive hands
def scoring(self):
        """
        Very simple heuristic counting 'alive' hands
        """
        if self.lose():
            return -100
        if self.win():
            return 100
        alive = [0] * 2
        for player in range(self.numplayers):
            for hand in range(len(self.hands[player])):
                alive[player] += self.hands[player][hand] > 0
        return alive[self.current_player - 1] - alive[self.opponent_index - 1]
def scoring ( self ) : if self . lose ( ) : return - 100 if self . win ( ) : return 100 alive = [ 0 ] * 2 for player in range ( self . numplayers ) : for hand in range ( len ( self . hands [ player ] ) ) : alive [ player ] += self . hands [ player ] [ hand ] > 0 return alive [ self . current_player - 1 ] - alive [ self . opponent_index - 1 ]