Routing in ad hoc networks is challenging as nodes are mobile and links are continuously created and broken. Current on-demand ad hoc routing algorithms start route discovery after path break, incurring high cost to detect the disconnection and to establish a new route. Specifically, when a path is liable to break, the source is warned about the likelihood of disconnection. The source then starts path discovery avoiding disconnection entirely. A path is likely to break when link availability decreases. Since routing is nondeterministic polynomial (NP) hard, this work proposes an improved ad hoc on-demand multipath distance vector (AOMDV) based on link availability, neighboring node's queuing delay, node mobility, and bit error rate. The optimal path is selected using BAT meta-heuristic optimization. Simulation shows improved performance compared to AOMDV.