Energy-saving light positioning using heuristic search