Newsgroups: alt.computer.consultants,comp.ai,comp.periphs,comp.programming,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!swrinde!pipex!uunet!world!jhallen
From: jhallen@world.std.com (Joseph H Allen)
Subject: Re: Help ! maze solving
Message-ID: <D0FGIx.88p@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <3avo57$kut@news.kth.se> <3avqkb$i1n@news.acns.nwu.edu> <3bdidg$afd@vixen.cso.uiuc.edu> <D05uB8.MI@icdc.delcoelect.com>
Date: Wed, 7 Dec 1994 06:25:45 GMT
Lines: 31
Xref: glinda.oz.cs.cmu.edu comp.ai:25782 comp.periphs:10081 comp.programming:13334 comp.robotics:16063

In article <deboest.786776128@pv1623.vincent.iastate.edu>,
Philip G. DeBoest <deboest@iastate.edu> wrote:
>In <3bdidg$afd@vixen.cso.uiuc.edu> smithjj@s (Jeff Smith) writes:
>>In article <3avqkb$i1n@news.acns.nwu.edu>, agb669@lulu.acns.nwu.edu (Andrew G Bachmann) writes:
>> If you are interested in the boring humdrum solution, you can always just set
>> the robot to "keep it's hand on the wall".  It doesn't matter which wall you
>> stick to.  Eventually the robot will get out of the maze.

>>You are correct as long as the maze does not contain "islands" that is,
>>two paths to the same location.

>I got in on this thread a few days late, but it caught my attention.  I
>understand that the "hand on the wall" algorithm would not get the
>"best" solution, but I do not see how it could ever fail to make it
>through the maze.  Islands would not prevent this solution as fall as I
>can reason.

What if the starting point is on an island?  What if there are more than one
exit, but only one correct one?

Anyway, here's my solution:

 1) Close of all of the exits.
 2) Fill the maze with water.
 3) Open the exit and watch as the robot floats out

-- 
/*  jhallen@world.std.com (192.74.137.5) */               /* Joseph H. Allen */
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
