To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.us.laflrcOpen lugnet.org.us.laflrc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / United States / LafLRC / 73
72  |  74
Subject: 
Re: Just a few highlights and points...
Newsgroups: 
lugnet.org.us.laflrc, lugnet.robotics
Date: 
Wed, 28 Sep 2005 18:10:29 GMT
Viewed: 
2070 times
  
On Wed, September 28, 2005 12:09 pm, Brian Davis wrote:
I'm only keeping 2 bits per node

   Hmm. OK, that's got me confused. I *know* I'm storing more information than
needed, but each node in the path only takes 2 bits? If those two bits encode
the direction to the next node (three possible states for L-R-Straight, or four
possible states for N-E-S-W). But if the path the robot is going down is a
dead-end, then the robot has to back up, and it needs to know... oh, OK, it
*does* know which branch it went down at the last node, OK...

Nodes I haven't seen have a value of zero.

Every time I [re]enter a node, I add 1 to the value that's currently there.  If
there's no right turn (I follow the right "wall"), I add 2.  When the total is 4,
you're done searching that node.

So, when I'm done, I have a map of values, either 1=right, 2=forward, or 3=left,
that tell me which way to go at each node.

   Huh. Remember kids, always demonstrate your ignorance in a public forum where
lots of other people can see it. It's much more fun ;-).

:)

Originally, I was also keeping the number of possible directions, but that can be
calculated every time you reach a node.

My programming is much like my building.  First, build what you need, using whatever
parts are required.  Then, take off parts you don't need.

Steve



Message is in Reply To:
  Re: Just a few highlights and points...
 
(...) Yes, I'm sure that's it - you just *imagined* you maze-solver worked ;-). (...) Hmm. OK, that's got me confused. I *know* I'm storing more information than needed, but each node in the path only takes 2 bits? If those two bits encode the (...) (19 years ago, 28-Sep-05, to lugnet.org.us.laflrc, lugnet.robotics)

13 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR