A New Flexible Algorithm for Random Yield Improvement