/nQueens

Implements and uses a hashing function and horizontal symmetry to optimize the classic nQueens problem.

Primary LanguageJavaScript

nQueens

Implements and uses a hashing function and horizontal symmetry to optimize the classic nQueens problem. Solves all solutions for 18 queens in around 66 minutes on an average pc.

TO-DO:

  1. Use bitwise operators to massively increase speed.
  2. Use more types of symmetry.
  3. Use multi-threading.
  4. Find more cases where algorithm does not search dead-ends.

Find the implementation under nQueens/src/solvers.js.