LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to determine a valid path through a boolean array representing position?

Let me explain:  I'm working on a LabView project for a class where I'm interfacing an RC car and trying to have the car follow a predetermined path.  This path will be set by the user through a 2D array of boolean controls.  I've attached the basic idea:  you draw the path from one side to the other in the shape that you want. The input would be invalid if is if the path isn't continous, is ambiguous (say by having more than one possible route a car could take), or there are true booleans in the array that aren't on the path.  

 

I'm not really sure where to start with this logically since I'm a novice at programming.  I would love advice on how to identify the true booleans that represent the beginning of the path (assuming it starts on the left side of the array) and be able to go from there.  Thanks so much in advance for the advice!

0 Kudos
Message 1 of 3
(2,129 Views)

This doesn't sound like a project for a novice, however if you do some reading on 'A* path finding' (A star) this will give you an algorithm that will identify a valid path. I would start from there.

0 Kudos
Message 2 of 3
(2,109 Views)

It seems challenging but I love a good problem.  Thanks so much for putting a name to what I want!  I'll come back with questions once I look into this further.

0 Kudos
Message 3 of 3
(2,100 Views)