1
$\begingroup$

Are there any (well validated) approaches for applying pathfinding algorithms on a graph following specific rules?

To be more specific: I want to introduce a graph with coloured edges. The idea is to apply a well known pathfinding algorithm (such as Dijkstra) on the graph given the rule: "only black and red edges".

$\endgroup$
1
$\begingroup$

The idea is to apply a well known pathfinding algorithm (such as Dijkstra) on the graph given the rule: "only black and red edges"

Remove all the non-black-and-red edges from the graph first, then run it through any off-the-shelf pathfinding implementation. Or implement your own, and have it completely ignore the non-black-and-red edges.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.