Two IR sensors: [ROBOT]--[SENSOR1]--[SENSOR2].
If SENSOR1 is on AND SENSOR2 is off you are going ok.
If both on you must turn toward the edge.
If both off you must turn away from the edge.
If SENSOR1 is off AND SENSOR2 is on your robot has already fallen down and broken the sensor holder 