Hmmmmm I believe you guys are on the wrong track ~no offense~
He wants the computer to search, not to aquire his target from 10 miles away. I believe the correct way for this to happen would be to order the computer to randomly walk across the map checking if there is enemies there. With your way (visibility max - attack orders) the enemy will find you no matter what, which is not good in a survival map now is it?
So why dont we do this!
Set regions in the map!
Covering all crossroads, places where resources are etc
And covering various places on the map!
And then, Order the enemy unit, to "Attack-Ground" that specific location! So not only will it go in that location but will attack anyone he finds in his way!
When he reaches that location, order it to "Attack-Ground" a different location, etc etc.
This seems like a search to me, instead of sniper tracking ~~