filtering duplicate successors, randomly permuting the priority queue, replace plan_to with visited