Note that "X1 precedes X2 in Xs" is also done as a constraint rather than as a search. 
 
Of course something has to do some generation sometime. But other than the specific information provided by the problem statement, that is put off until the end.  It's like a range declaration at the end instead of at the beginning.
 
Of course, this approach is not able to narrow variables ranges.  The constraints are all yes or no.  And its search options are not as slick as those in FD. But still it's pretty slick. 
 
It's all built on suspension and multiple threads, which aren't available in standard prolog. It doesn't use data flow variables to communicate between distributed processes.  It uses them as a way to trigger constraint tests. Of course to do that is to rely on monotonicity.
 
This is an attempt to explore what one can do with suspension and multiple threads without having to use any additional constraint propagation machinery.
 
-- Russ

 
On 10/24/05, Russ Abbott <[EMAIL PROTECTED]> wrote:
Here is an example of a solution to a Zebra-like logic puzzle using straight logic programming tools (no FD) but with constraints implemented as thread bombs. The puzzle is here: http://www.puzzlersparadise.com/article1021.html.
 
 
The solution code is here: http://cs.calstatela.edu/~wiki/index.php/Courses/CS_460/Fall_2005/Homework#Problem_specific_information . Note how closely the solution code is to the problem statement.  The negative statements are expressed negatively, i.e., as constraints, which are implemented as thread bombs.
 
 
-- Russ



--
_____________________________________________
Professor, Computer Science
California State University, Los Angeles
o Check out my blog at http://russabbott.blogspot.com/
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to