)> How does your 8x8 exhaustive solver stack against the (almost) constant time )> algorithms at
http://www.cit.gu.edu.au/~sosic/nqueens.html for finding )> solutions to large e.g. 10^6 x 10^6 boards? If you have improved upon those )> then I suggest you publish! ) ) I have visited that site and the say their algorithm does a ) _probabilistic_ local search. My algorithm, as you said, is exhaustive
You say that as if a probabilistic search is something bad.
) and does NOT imply any probability or even 'try and verify' scheme. By ) the way, did anyone figured out how it works, or should I explain it? ) It is rather simple...
I looked at it for a coupla seconds, I would say it generates all possible permutations of 1..n, then checks if the diagonals clash and prints out all permutations for which no diagonal collisions occur.
I won't even go into the use of arbitrary constants, or the fact that you're using C++ instead of ordinary C for no reason whatsoever.
By the way, have you ever heard of branch-and-bound ?
SaSW, Willem (at stack dot nl)