Click here to Skip to main content
15,900,457 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionFast path finding algorithm Pin
alikalik27-May-11 7:08
alikalik27-May-11 7:08 
AnswerRe: Fast path finding algorithm Pin
AspDotNetDev27-May-11 7:31
protectorAspDotNetDev27-May-11 7:31 
AnswerRe: Fast path finding algorithm Pin
Luc Pattyn27-May-11 7:42
sitebuilderLuc Pattyn27-May-11 7:42 
GeneralRe: Fast path finding algorithm Pin
alikalik27-May-11 8:24
alikalik27-May-11 8:24 
AnswerRe: Fast path finding algorithm Pin
Luc Pattyn27-May-11 14:16
sitebuilderLuc Pattyn27-May-11 14:16 
QuestionRe: Fast path finding algorithm Pin
AspDotNetDev27-May-11 9:08
protectorAspDotNetDev27-May-11 9:08 
AnswerRe: Fast path finding algorithm Pin
David I Carter31-May-11 22:29
David I Carter31-May-11 22:29 
AnswerRe: Fast path finding algorithm Pin
Member 41945939-Aug-11 19:42
Member 41945939-Aug-11 19:42 
Sorry for the late response, I was going back over some of old entries in the forum that I had not reviewed yet.

I have a question (or observation as the case may be) about the "wave algorithm" as it applies to a maze.

If you start at either point and flood fill, you may go down many unproductive paths (in paralel - the wave front expands equally from all points). It takes time to fill all the dead ends. Eventually the other point will be found.

What about starting the flood fill at both points? You may fill some dead ends from both points, but when you finally collide with the other wave front, it is "Game over!", stop filling the dead ends. OBTW, the flooding must be with different colors from each point to be able to correctly identify looping paths from either end - you need to find the opposite wave color to claim a complete path.

To identify the actual path from the first point to the second point, save (in a solution array that has the same size as the array) the x-y coordinates (or point ID of some kind) of the originating point that was being processed when this new point was flooded, into the array position for the new point. Do this for points starting from the first point (the first color). For the points starting from the second point (the second color), save the new point ID in the current point array position so the path is consistent. To walk the path, start at the second point in the solution array and backtrack to the first point. If you are processing blocks of points in a maze (i.e., 8x8), then you only need a solution array big enough for the number of blocks, not big enough for the number of pixels.

Dave.
GeneralRe: Fast path finding algorithm Pin
Member 419459310-Aug-11 3:53
Member 419459310-Aug-11 3:53 
AnswerRe: Fast path finding algorithm Pin
BobJanova1-Jun-11 2:01
BobJanova1-Jun-11 2:01 
AnswerRe: Fast path finding algorithm Pin
dasblinkenlight1-Jun-11 6:52
dasblinkenlight1-Jun-11 6:52 
AnswerRe: Fast path finding algorithm Pin
YDaoust2-Jun-11 0:05
YDaoust2-Jun-11 0:05 
QuestionReal time peak identification Pin
Wjousts25-May-11 4:32
Wjousts25-May-11 4:32 
AnswerRe: Real time peak identification Pin
AspDotNetDev25-May-11 5:06
protectorAspDotNetDev25-May-11 5:06 
GeneralRe: Real time peak identification Pin
Wjousts25-May-11 7:54
Wjousts25-May-11 7:54 
AnswerRe: Real time peak identification Pin
Luc Pattyn25-May-11 5:30
sitebuilderLuc Pattyn25-May-11 5:30 
GeneralRe: Real time peak identification Pin
Wjousts25-May-11 8:43
Wjousts25-May-11 8:43 
AnswerRe: Real time peak identification Pin
Luc Pattyn25-May-11 13:45
sitebuilderLuc Pattyn25-May-11 13:45 
GeneralRe: Real time peak identification Pin
Wjousts26-May-11 8:45
Wjousts26-May-11 8:45 
AnswerRe: Real time peak identification Pin
Luc Pattyn26-May-11 9:09
sitebuilderLuc Pattyn26-May-11 9:09 
GeneralRe: Real time peak identification Pin
Wjousts26-May-11 9:20
Wjousts26-May-11 9:20 
AnswerRe: Real time peak identification Pin
Luc Pattyn26-May-11 9:44
sitebuilderLuc Pattyn26-May-11 9:44 
AnswerRe: Real time peak identification Pin
Peter_in_278025-May-11 13:38
professionalPeter_in_278025-May-11 13:38 
AnswerRe: Real time peak identification Pin
Luc Pattyn25-May-11 14:52
sitebuilderLuc Pattyn25-May-11 14:52 
GeneralRe: Real time peak identification Pin
Peter_in_278025-May-11 16:14
professionalPeter_in_278025-May-11 16:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.