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

<p>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.</p>

CC BY-SA 4.0
2019-03-05T18:25:49.640Z
2019-03-05T18:25:49.640Z
BlueRaja - Danny Pflughoeft
<p>Are there any (well validated) approaches for applying pathfinding algorithms on a graph following specific rules?</p>

<p>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".</p>

<path-finding>
Which pathfinding algorithms can be applied on coloured graphs?
Bryan McGill
# Which pathfinding algorithms can be applied on coloured graphs?

(Asked by: username_0 on 2019-03-05)

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".

**Tags:** path-finding


---

## 1 answers

### Answer by username_1 on 2019-03-05. Score: 1

> 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.


---

