def search(self,weights,values,remaining,best,score,solution):
        if len(weights) == 0 and score > best:
            #print "New Best:",score,solution
            #assert 0 
            return score

        soft = self.greedy_soft(weights, values, remaining)
        
        if score + soft > best:
            if weights[0] <= remaining:
                new_score = self.search(weights[1:],values[1:],remaining-weights[0],best,score+values[0],solution+[True])
                if new_score > best:
                    best = new_score

            new_score = self.search(weights[1:],values[1:],remaining,best,score,solution+[False])
            if new_score > best:
                best = new_score
            
        return best
dataset/ETHPy150Open bolme/pyvision/src/pyvision/optimize/testsuite.py/FitnessNapsack.search/original