This paper presents a new algorithm for solving the generalized watchman problem. It is the problem of mobile robot operators that must find the shortest route for the robot to see the whole area with many obstructions. The algorithm adapts the well-known ant algorithm to the new problem. An experiment where the algorithm is applied to an area containing more than 10 obstructions is described. It proves that efficiency and accuracy of the algorithm are high.