One of my perfect AI demos has realtime obstacle detection (can't remember the magazine number, though). The following versions use precomputed paths, but from what I remember only one of the functions needs to be changed. I might improve the code in the near future and post it in the AUM.