Abstract

The n-queens problem is a classical search problem in the artificial intelligence (AI) area. In recent years, this problem has found many useful, practical applications including 2-dimensional VLSI routing and testing, maximum full range communication, and parallel optical computing.

In this paper we present two new algorithms, called Queen Search 2 (QS2) and Queen Search 3 (QS3). QS2 and QS3 are probabilistic local search algorithms, based on a gradient-based heuristic. These algorithms, running in almost linear time, are capable of finding a solution for extremely large size n-queens problems. For example, QS3 can find a solution for 500,000 queens in approximately one and a half minutes.