alt.hn

5/16/2025 at 9:57:29 AM

Solving the local optima problem – NQueens

https://github.com/Dpbm/n-rainhas/blob/main/readme-en.md

by ColinWright

5/20/2025 at 5:09:09 PM

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/

by cchianel

5/20/2025 at 2:02:13 PM

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.

by andreareina