This algorithm determines the best actions for object recognition