From: FOR EVER YOUNG !!!
Subject: Need help with Breadth First Search Algo !
Date: 
Message-ID: <52aefr$suo@carbon.cudenver.edu>
I'm trying to write a program that 
implements Breadth First Search Algo for an 8-puzzle game using LISP.
Any ideas on how to approach this problem ?
Thanks 

Michalakis Michael
From: Marty Hall
Subject: Re: Need help with Breadth First Search Algo !
Date: 
Message-ID: <x5g2403sxm.fsf@rsi.jhuapl.edu>
········@ouray.cudenver.edu (FOR EVER YOUNG !!!) writes:
> 
> I'm trying to write a program that 
> implements Breadth First Search Algo for an 8-puzzle game using LISP.
> Any ideas on how to approach this problem ?

Check if the root is a solution. Stop if so. Otherwise stick it into an
"active" list. From then on, your algorithm is
(A) Remove first node from active list
(B) If it is a solution, you are done.
(C) Otherwise generate its children and stick them on the rear of the
active list.
(D) Go to (A).

Of course this can be done in any language. Lisp just makes the Lisp
handling easy, plus once you have a bit more practice, lets you
generalize the code by passing along the child-generation and
solution-checking functions.
						- Marty

Lisp Resources: <URL:http://www.apl.jhu.edu/~hall/lisp.html>