Neil, did you read my response to your original question?
http://lists.gforge.info.ucl.ac.be/pipermail/mozart-users/2008/010188.html
/p

On Tue, Aug 19, 2008 at 6:49 PM, Neil Munro <[EMAIL PROTECTED]> wrote:
> Having read several articles now on the subject I understand I have to write
> a recursive back tracking solution like the below (incomplete and
> non-working code, it is this i need help with, I believe) to check if queens
> positions conflict with each other.
>
> BoardSize is a global variable set by the user at start up can be between 1
> and 16.
> {Length L} returns the length of a list.
> {Threaten T H} checks if a queen position is on the same row, column, rising
> or falling diagonal and returns a boolean result.
>
> fun {Revise L}
>      case L of H|T then
>           if {Length L} == BoardSize then {Revise L}
>           else N = {Length L} in
>           {Threaten T H} then
>           {Revise H.1+1#H.2+1|T}
>           else H.1+1#H.2+1|T
>           end
>      end
> end
>
> I know this function does not work and if anyone could provide any help as
> to why it does not work I'd appreciate it, I have neither a mathematics nor
> engineering background so explanations may have to be quite simplistic.
>
> Thanks
> Neil Munro
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to