Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!news.sprintlink.net!redstone.interpath.net!sas!mozart.unx.sas.com!cox
From: cox@tachyon.unx.sas.com (Jim Cox)
Subject: Re: "The Shortest Route"
Originator: cox@tachyon.unx.sas.com
Sender: news@unx.sas.com (Noter of Newsworthy Events)
Message-ID: <D5yq9r.Bun@unx.sas.com>
Date: Fri, 24 Mar 1995 20:58:39 GMT
Distribution: usa
X-Nntp-Posting-Host: tachyon.unx.sas.com
Reply-To: cox@unx.sas.com
References: <1995Mar13.231632.13723@blaze.trentu.ca> <3ki16b$3aj@math.rutgers.edu> <3knrrf$a26@belfort.daimi.aau.dk> <D5uFpI.H7D@cs.dal.ca> <3ks62l$33t@gap.cco.caltech.edu> <3kspvu$7pa@aesir.cs.cornell.edu>
Organization: SAS Institute Inc. Cary NC
Lines: 43


In article <3kspvu$7pa@aesir.cs.cornell.edu>, nell@cs.cornell.edu (William Nell) writes:
>>lots of stuff deleted.
>
>Forgive me if this is redundant.  I just recently started reading this thread.
>
>You should take a look at motion planning for robotics.  There is alot
>of relevant stuff in motion planning to finding the shortest path in
>an arbitrary environment.  Finding the shortest path is an O(n^2), it's
>not equivalent to the traveling salesman problem (which is finding the
>shortest path which reaches _every_ node in a graph).  Finding the
>shortest point between two nodes in a graph can be solved using A*
>search.  If you've never heard of A* search, you can probably find it in
>any AI textbook.  A* is pretty simple, at each stage you extend the
>current path with all it's possible neighbors (being careful to reject
>cyclic paths).  Then all the new paths are sorted according to their
>lengths and estimated distanc to the goal node.  This guarantees
>that the best path is always searched first.
>

Actually what is even faster than a straight A* search is a bidirectional
A* search.  In this, you start evaluating paths from the beginning to
the end and from the end to the beginning at the same time.  Again you order
all possible directions based on min(dist to goal).  As soon as a path from
the beginning meets a path from the end, you have your optimal path.

I implemented this once for an AI class I took in graduate school.  It 
turns out to be quite fast in most cases.







-- 

+-----------------------------------------------------+
| James A. Cox, PhD                AI Department      |
|                                  SAS Institute Inc. |
| cox@unx.sas.com                  SAS Campus Drive   |
| (919) 677-8000 x7963             Cary, NC 27513     |
+-----------------------------------------------------+
