Breadth-First Solve
Russ Abbott
russ.abbott at gmail.com
Fri Mar 31 21:16:30 CEST 2006
Chris,
For a course I taught last Fall using Oz, I developed a solver that does
either depth first or breadth first depending on a parameter. (The actual
difference in the code is amazingly small.) It's
here<http://cs.calstatela.edu/~wiki/index.php/Courses/CS_460/Fall_2005/SolveAll>if
you are interested.
-- Russ
On 3/31/06, Christian Schulte <schulte at imit.kth.se> wrote:
>
> Dear Chris,
>
> at some time breadth-first actually was included in Mozart. However, as
> people tend to not understand that this uses _exponential_ rather than
> linear memory in the depth of a search tree I kicked it out. But as you
> say
> yourself: roll your own!
>
> Christian
>
> --
> Christian Schulte, http://web.imit.kth.se/~schulte/
>
>
>
>
> -----Original Message-----
> From: users-bounces at mozart-oz.org [mailto:users-bounces at mozart-oz.org] On
> Behalf Of Chris Rathman
> Sent: Friday, March 31, 2006 7:11 PM
> To: users at mozart-oz.org
> Subject: Breadth-First Solve
>
>
> The Solve function given in CTM is Depth-First. I was wondering if
> there is a BFSolve function that does a Breadth-First search? So if I
> have the following:
>
> {Browse
> {BFSolveAll
> fun {$}
> choice
> choice 1 [] 3 end
> [] choice 2 [] 4 end
> end
> end}}
>
> Depth first gives the results of [1 3 2 4] whereas a Breadth-First would
> give the results of [1 2 3 4].
>
> Probably wouldn't be difficult to modify Solve to change the search
> strategy, but then it's even easier just to ask on the Oz mailing
> list. :-)
>
> Thanks,
> Chris Rathman
>
>
>
> ____________________________________________________________________________
> _____
> mozart-users mailing list
> mozart-users at ps.uni-sb.de
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gforge.info.ucl.ac.be/pipermail/mozart-users/attachments/20060331/66ec4d73/attachment.html
More information about the mozart-users
mailing list