Computer searching for obstacles ahead of a moving dislocation