Quoting Alex Gian <[EMAIL PROTECTED]>: > > Hm, I see. If you only need that some solutions imply that some other > > should be discarded, think of using a "choice penalty" and SearchBest > > instead of SearchAll. > > [...] > > See what I mean? > > This is not a bad idea practically, but I was really looking for > something a little more... elegant (no offence meant :) ). Also will > your method cause solutions to be generated which are then discarded??
Well, elegance is a mainly a matter of taste. But think twice. What you were asking first is not declarative, and can easily break modularity, which means an extra source of errors. The penalty idea can be a declarative way to express what you want. A good choice for the penalty can quickly discard unwanted solutions. Fred Spiessens at UCL uses a similar technique to implement a model checker in Mozart. He had this problem, where the search process actually returns too many solutions. Many solutions were sub-solutions of "maximal" solutions, and he wanted the maximal ones only. He started by hacking a search engine of his own, but gave up when we found an (elegant) way to code the maximality, and getting all solutions with SearchBest. Cheers, raph _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
