POV-Ray : Newsgroups : povray.off-topic : Logic programming : Re: Logic Box v2 release #1 Server Time
29 Jul 2024 04:30:53 EDT (-0400)
  Re: Logic Box v2 release #1  
From: scott
Date: 31 May 2012 08:27:52
Message: <4fc763c8@news.povray.org>
>> Runs fine here, opened it up and was thinking what it could be useful
>> for ... could it be used to solve Sudoku puzzles?
>
> It... could. Perhaps. With some serious modifications.

You would need a permutation predicate, eg LPerm.  It would be solved 
when the first list is a permutation of the second list.

LPerm{ List[1,2,3] , List[3,1,x] }

Would tell you that x := 2

I'm guessing that it wouldn't be simple to implement...

If you had that, then you could expand it easily to a sudoku grid. 
You'd need an LPerm for each row, each column and each 3x3 box all ANDed 
together.

Now that would be a very cool solution, as in you wouldn't need to tell 
the computer *how* to solve it (as you have to when writing a 
"traditional" sudoku solver), just what the rules are.


Post a reply to this message

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