(self)
In the beginning of the game (less than 32 pieces) much
        importance is given to placing pieces on the border. After this
        point, only the number of pieces of each player counts
In the beginning of the game (less than 32 pieces) much
        importance is given to placing pieces on the border. After this
        point, only the number of pieces of each player counts
In the beginning of the game ( less than 32 pieces ) much importance is given to placing pieces on the border . After this point only the number of pieces of each player counts
def scoring(self):
        """
        In the beginning of the game (less than 32 pieces) much
        importance is given to placing pieces on the border. After this
        point, only the number of pieces of each player counts
        """

        if np.sum(self.board == 0) > 32:  # less than half the board is full
            player = (self.board == self.current_player).astype(int)
            opponent = (self.board == self.opponent_index).astype(int)
            return ((player - opponent) * BOARD_SCORE).sum()
        else:
            npieces_player = np.sum(self.board == self.current_player)
            npieces_opponent = np.sum(self.board == self.opponent_index)
            return npieces_player - npieces_opponent
def scoring ( self ) : if np . sum ( self . board == 0 ) > 32 : # less than half the board is full player = ( self . board == self . current_player ) . astype ( int ) opponent = ( self . board == self . opponent_index ) . astype ( int ) return ( ( player - opponent ) * BOARD_SCORE ) . sum ( ) else : npieces_player = np . sum ( self . board == self . current_player ) npieces_opponent = np . sum ( self . board == self . opponent_index ) return npieces_player - npieces_opponent