Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!reading!ceb From: ceb@reading.ac.uk (Colin Bridgewater) Newsgroups: comp.lang.prolog Subject: Re: Compilers for breadth first search and bottom up computation ? Summary: Ha! Keywords: agenda is easier than bounded depth.. Message-ID: <2004@onion.reading.ac.uk> Date: 22 Jan 90 18:24:32 GMT References: <8038@uklirb.UUCP> Reply-To: ceb@onion.cs.reading.ac.uk (Colin Bridgewater) Distribution: comp.prolog Organization: Comp. Sci. Dept., Reading Univ., UK. Lines: 28 In Article <2313@cs-spool.calgary.UUCP> John Cleary wrote: > > The easiest way to do a breadth first search is to use a bounded depth search > where the depth is increased after all the solutions at the earlier depth are > found. It is straightforward to write an interpreter to do this, and if > you are a little more bold you can even compile away the interpreter. Try using an agenda-based search technique, which requires no compiler or interpreter and only one or two extra odds and sods to be passed between functions. Eats stack, but is considerably easier to understand, and can be modified to depth-first search with no extra code. (or have I missed a couple of prior postings which explain why this is not an applicable technique????) Cheers, Colin *********************************************************************** Colin Bridgewater alias ceb 'the happy hacker' Construction Robotics Research Group Dept of Construction Management University of Reading ceb@uk.ac.rdg.onion 0734 875123 x7187 kqsbriwa@uk.ac.rdg.am.uts ***********************************************************************