LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the floodfill algorithm works?

Solved!
Go to solution

Hey people:

 

I'm currently working on designing a small robot car for a Micro Mouse competition. To program it, I have found that the best way for it to solve a maze is using the Flood-Fill algorithm.  I understand the concept of it - the mouse needs to move always to a smaller number until it reaches the center which is represented by a zero - but I still don't understand the updating it should do as the mouse moves through the maze. Maybe someone has a good explanation or maybe an example of it so I can understand better. If you need more information, please don't hesitate to ask.

 

The help is much appreciated.

-Sergio

0 Kudos
Message 1 of 6
(6,335 Views)

Is this "floodfill" algorithm based on any specific LV VI which you have?  If it is, then attach the VI.

 

I have seen this done with LV.  If you dont have any code examples there may be some available at ni.com.  I know they have done this.  Take a look for the examples in www.ni.com/academic.

0 Kudos
Message 2 of 6
(6,331 Views)

Hey Sergio,

 

Check out this Thread on the Floodfill Algorithm. There are some links and examples in that thread that might be useful.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 3 of 6
(6,292 Views)

BCho:

 

I entered the link you posted, but it doesn't talk about the Flood-Fill algorithm. The thread's title is "64 bit IMAQdx". Here they talk about problems with different OS. Maybe the link is taking me someplace it shouldn't, but it's no help for me. Thanks anyway. If you - or anybody- have any other ideas, please let me know.

 

Thanks

-Sergio

0 Kudos
Message 4 of 6
(6,272 Views)

Hey Sergio,

 

I do apologize. This is one of those cases where the last thing in the clipboard was not quite what I thought it was. Here is the real Floofill Algorithm thread. The one mentioned in my previous post is unrelated.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 5 of 6
(6,249 Views)
Solution
Accepted by topic author s.garcia

Thanks BCho, but apparently there are two flood-fill algorithms. The one being described in the threads you sent is used to edit pictures or draw. The one I need is used to program a "mouse" so that it can reach the center of a maze without any help.

 

After looking a lot, I finally found a good web page that has a great explanation: http://www.micromouseinfo.com/introduction/mfloodfill.html

 

Thanks for the help anyway.

-Sergio

0 Kudos
Message 6 of 6
(6,236 Views)