Probabilistic Smart Terrain Algorithm