Newsgroups: alt.comp.hardware.homebuilt,alt.computer.consultants,comp.ai,comp.periphs,comp.programming,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!osuunx.ucc.okstate.edu!jsun!gcouger
From: gcouger@jsun.okstate.edu (Gordon Couger)
Subject: Re: Help ! maze solving
Message-ID: <CzuuJL.B5n@osuunx.ucc.okstate.edu>
Sender: news@osuunx.ucc.okstate.edu (USENET News System)
Nntp-Posting-Host: jsun.agen.okstate.edu
Reply-To: Gordon Couger <gcouger@olesun.agen.okstate.edu>=
Organization: /etc/organization
References: <3avo57$kut@news.kth.se> <CztFEo.9u1@cruzio.com> <allenbach.16.2ED5C439@di.epfl.ch>
Date: Sat, 26 Nov 1994 03:18:56 GMT
Lines: 34
Xref: glinda.oz.cs.cmu.edu comp.ai:25504 comp.periphs:9995 comp.programming:13060 comp.robotics:15677

In article <allenbach.16.2ED5C439@di.epfl.ch>,
Philippe Allenbach <allenbach@di.epfl.ch> wrote:
>
>Jan Soderman writes:
>
>>> Hello !
>>> The problem for us is to find a suitable algorithm or program to searh and
>>solve
>>> the maze. I would be wery glad if anyone has any ideas that might help.
>>> 
I had to solve a maze in a GIS problem and came up with this:

void goup(x,y)
  {
  int direction;
  if(!on_map(x,y)
    return();
  for(direction = NORTH; direction <=NORTHWEST)
     if(point(direction)== CONECTED_TO_CURRENT_POINT)
        goup(new_x(x,direction),new_y(y,direction)
    mark_path_as_you_fail(x,y);
   }
I got the idea from a computer article in Scientific American. I typed this 
pusdocode from memory. I also had to do some dirty things to limit recursion
fail back and restart to solve really large water sheds.

Good luck
Gordon
                            Gordon Couger                            
                            Biosystems & Agricultural Engineering              
                            Oklahoma State University                         
                            114 Ag Hall, Stillwater, OK  74074                 
gcouger@olesun.agen.okstate.edu 405-744-9763 day 624-2855 evenings 
    I do not speak for my employer
