Re: Recursion head scratcher

2009-12-02 Thread Joel Madigan
On 12/2/09, Dave Angel wrote: > Joel Madigan wrote: >> Hi everyone! >> Sorry this isn't strictly a Python question but my algorithms professor >> contends that given the standard recursive-backtracking maze solving >> algorithm: >> >> width=6 >> height=4 >> maze=[[1,0,1,1,0,1], >> [0,0,1,0,0

Re: Recursion head scratcher

2009-12-02 Thread Tim Wintle
On Wed, 2009-12-02 at 02:07 -0500, Joel Madigan wrote: > > that it is possible to make it print the path to the finish in the > order the steps were taken. That is, the algorithm as written > produces: (4,0) (4,1) (3,1) (3,2) (3,3) (2,3) (1,3) (1,2) True > > Rather than (1,2) (1,3) (2,3) (3,3)

Re: Recursion head scratcher

2009-12-02 Thread Dave Angel
Joel Madigan wrote: Hi everyone! Sorry this isn't strictly a Python question but my algorithms professor contends that given the standard recursive-backtracking maze solving algorithm: width=6 height=4 maze=[[1,0,1,1,0,1], [0,0,1,0,0,0], [1,0,1,0,1,0], [0,0,0,0,1,1]] visited =

Recursion head scratcher

2009-12-01 Thread Joel Madigan
Hi everyone! Sorry this isn't strictly a Python question but my algorithms professor contends that given the standard recursive-backtracking maze solving algorithm: width=6 height=4 maze=[[1,0,1,1,0,1], [0,0,1,0,0,0], [1,0,1,0,1,0], [0,0,0,0,1,1]] visited = [[False for x in range