I noticed that you had a nice script for Navigation with the Sonars and IRs.
Why not go a step further and make it a SMART Navigation system?
You could do that by two more steps. (use confidence and Random number selection)
First you set confidence levels from zero to three, or even as high as zero to 15.
Next you store the previous move. And use it to know if you are moving in the correct direction.
After that you have done most of it, you check the confidence level for the move you are about to make. If it is High, you make the move. If it is low, you use a random number to select a different move and go through the whole process again.
After trial and error, the robot becomes more intelligent after each move. Then he will KNOW by Learning experiences which way to go.
I have never gotten this to work 100%, but it is possible. I am just not a great programmer. But , you seem to be good enough to pull this off.
I would love to see this machine become more intelligent and actually have the capabilities to Learn.