Inconsistent result with GnuProlo / Ubuntu 10.04/64 bits
Zyx <[email protected]> Tue, 27 Jul 2010 07:16:33 -0700 (PDT)
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've got inconsistent results with gnu Prolog, with a simple nqueens program: %%%%%%%%%%%%%%%%%%%%%%%%%%%% queens(N,L):- length(L,N),fd_domain(L,1,N) , fd_all_different(L),correct(L), fd_labelingff(L). correct([]). correct([X|L]):- safe_diag_fd(X,L,1),correct(L). safe_diag_fd(X,[],_). safe_diag_fd(X,[Y|L],D):- Y-X #\= D, X-Y #\= D, D1 is D+1, safe_diag_fd(X,L,D1). %%%%%%%%%%%%%%%%%%%%%%%%%%%% For queens(32,L) , I have duplicate values in the list, and sometimes -1 in the following answers: | ?- queens(32,L). L = [1,3,5,16,15,4,10,7,13,16,22,15,6,17,19,21,8,25,2,16,27,28,9,18,20,14,11,13,10,2,2,12] ? yes | ?- queens(32,L),sort0(L). L = [1,2,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28] ? ; L = [-1,1,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28] ? ; L = [-1,1,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28] ? I'm running gnuProlog 1.3.0 under Ubuntu 10.04 / 64 bits. Don't seem to have the same problem on another computer under Debian Lenny. Any suggestion? Regards, Steve. -- View this message in context: http://old.nabble.com/Inconsistent-result-with-GnuProlo---Ubuntu-10.04-64-bits-tp29276860p29276860.html Sent from the Gnu - Prolog - Bugs mailing list archive at Nabble.com.