From: Andy
Subject: Learn search algorithm with lisp
Date: 
Message-ID: <1183014581.785854.25530@z28g2000prd.googlegroups.com>
I want to learn some search algorithms such as BFS, DFS, A* and so
on.

I am very familiar with C++. And I can write the search programs in C+
+ without any difficulty.

But I have heard that Lisp is more convenient for search algorithms.
So I want to learn Lisp. I don't know whether this is a good idear or
not. Because it seems that Common Lisp has neither datastructures such
as  queue, priority_queue, map  nor algorithms such as partial_sort,
make_heap.

Can anyone give me some advice?

From: Frank Buss
Subject: Re: Learn search algorithm with lisp
Date: 
Message-ID: <jozmh5cir50v$.tcvddyuyded7.dlg@40tude.net>
Andy wrote:

> I want to learn some search algorithms such as BFS, DFS, A* and so
> on.
> 
> I am very familiar with C++. And I can write the search programs in C+
> + without any difficulty.
> 
> But I have heard that Lisp is more convenient for search algorithms.
> So I want to learn Lisp. I don't know whether this is a good idear or
> not. Because it seems that Common Lisp has neither datastructures such
> as  queue, priority_queue, map  nor algorithms such as partial_sort,
> make_heap.
> 
> Can anyone give me some advice?

I don't know the quality of the implementation, but your STL containers
entered in Google with "Lisp" resulted in this package:

http://common-lisp.net/project/tinaa/documentation/metabang.cl-containers-package/index.html

But if you want to learn Lisp, maybe it is a better idea to try the Common
Lisp built-in containers and datastructures, first, like vector, list,
array and defstruct/defclass, and to write all functions you need yourself.

-- 
Frank Buss, ยทยท@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Alex Mizrahi
Subject: Re: Learn search algorithm with lisp
Date: 
Message-ID: <46838839$0$90266$14726298@news.sunsite.dk>
(message (Hello 'Andy)
(you :wrote  :on '(Thu, 28 Jun 2007 00:09:41 -0700))
(

 A> I want to learn some search algorithms such as BFS, DFS, A* and so
 A> on.

you can find all of them in PAIP book (search Google for exact name, also 
note that source code is available freely).

 A> not. Because it seems that Common Lisp has neither datastructures such
 A> as  queue, priority_queue, map  nor algorithms such as partial_sort,
 A> make_heap.

yes, they are not a part of Common Lisp standard, but it's pretty easy to 
find library doing that.

the source in PAIP does not use priority queue (for brewity, i think), but 
it should be quite easy to plug pq there.

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"I am everything you want and I am everything you need") 
From: Eric Lavigne
Subject: Re: Learn search algorithm with lisp
Date: 
Message-ID: <1183155969.722147.108400@w5g2000hsg.googlegroups.com>
> I want to learn some search algorithms such as BFS, DFS, A* and so
> on.
>

Others have suggested that you start with introductory Lisp books.
Certainly you would learn a lot from following that advice, but I
would not be so patient. Peter Norvig wrote an excellent book that
implements search algorithms in Common Lisp and uses them to solve
classic artificial intelligence problems: http://norvig.com/paip.html

If you are particularly interested in search, and already know a lot
about it, I would just start with Norvig's book. The first few
chapters teach enough about Lisp that you should be able to follow the
rest of the book. If not, you can always change your mind later and
switch to a beginner's book.

Enjoy :-D