Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'algorithm': 0.04; 'turtle': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'random': 0.14; '(put': 0.16; 'hits': 0.16; 'message-id:@4ax.com': 0.16; 'path.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:turtle': 0.16; 'user?': 0.16; 'code.': 0.18; 'all,': 0.19; 'basically': 0.19; 'seems': 0.21; 'separate': 0.22; 'choices': 0.24; 'subject:problem': 0.24; 'url:home': 0.24; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'direction': 0.30; 'forgot': 0.30; 'mode': 0.30; 'end,': 0.31; 'option': 0.32; 'another': 0.32; 'beginning': 0.33; 'subject:with': 0.35; 'common': 0.35; 'but': 0.35; 'picking': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'so,': 0.37; 'being': 0.38; 'received:76': 0.38; 'branch': 0.38; 'solving': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'major': 0.40; 'back': 0.62; 'email addr:gmail.com': 0.63; 'real': 0.63; 'our': 0.64; 'pick': 0.64; 'wall': 0.65; 'contact': 0.67; 'guided': 0.68; 'realized': 0.68; 'walk': 0.74; 'hand': 0.80; '180': 0.84; 'completes': 0.84; 'draws': 0.84; 'penalty,': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: basic maze problem with turtle Date: Sun, 13 Oct 2013 21:53:51 -0400 Organization: IISS Elusive Unicorn References: <4c8e9740-25ef-4531-89db-467eb18c673f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-29-234.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381715643 news.xs4all.nl 15910 [2001:888:2000:d::a6]:35769 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56787 On Sun, 13 Oct 2013 15:18:27 -0700 (PDT), baujacob@gmail.com declaimed the following: > >Sorry about that, I realized I forgot to include the code. >So basically I have one turtle that draws the maze at the beginning and then another turtle(userTurtle) that completes the maze. When the userTurtle hits any point on the wall, I want to force userTurtle back to the start of the maze. Still seems rather harsh to me... After all, one of the common suggestions for solving a maze is to "always follow [right/left] hand" (put said hand on said wall -- walk keeping that hand in contact with the wall -- if you hit a dead end, the 180 turn-around will pick up the other wall and carry our around the branch that lead to that dead-end). But you are postulating "hit a dead end, through out all progress, start over" Is "userTurtle" being guided by a real user? If so, resetting to the start on each dead-end is a major penalty, the user should have the option of back-tracking and picking another turn. If "userTurtle" is a separate algorithm it should still have a back-track ability. The difference is whether the algorithm uses a wall following scheme, or a random direction at any intersection. Note that, without memorizing choices for each intersection, the random direction mode can result in repeating a failed path. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/