POV-Ray : Newsgroups : povray.off-topic : Logic programming : Re: Logic Box v2 release #1 Server Time
29 Jul 2024 10:24:43 EDT (-0400)
  Re: Logic Box v2 release #1  
From: scott
Date: 31 May 2012 10:56:51
Message: <4fc786b3$1@news.povray.org>
> This in turn causes SEqual{} to function correctly.
>
> It's quite slow, but
>
> SEqual{List[1, 2, 3], List[3, 1, x]}
>
> does eventually yield x := 2.

So for the first row in a sudoku I'd expect something like this:

SEqual{List[1..9], List[3,a,b,c,1,d,e,f,8]}

That should work, as both lists are the same length (so the 2nd list 
must contain the each of the elements 1-9 once).

But I'm guessing it's going to be very slow, especially when you add in 
the other 26 SEqual statements all ANDed together...

Shame, as I think it's a really neat way to write a solver.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.