Skip to content(if available)orjump to list(if available)

Solving the local optima problem – NQueens

cchianel

N-Queens can be solved (find a single valid solution) in polynomial time [1]. That being said, Local Search is a powerful technique that can solve a lot of problems such as employee scheduling, vehicle routing, or maintenance scheduling. You might want to take a look at Timefold [2], which is a local search solver that can be configured to use simulated annealing, tabu search, late acceptance and other local search algorithms. Note: I work for Timefold.

[1] https://stackoverflow.com/a/13109557

[2] https://solver.timefold.ai/

andreareina

It's interesting to see n queens being framed as susceptible to getting stuck in local optima as my mind immediately goes to tree search.