i have the following graph that i am trying to create a sequence out of for the nodes. it's very similar to a DFS traversal excepted nodes may be visited multiple times. i am trying to find the best algorithm to create the sequence, the final result is listed below (see attached). note that E should have been 4th but because of the false route, its sequence got updated to 6th (the higher sequence number).
i want to traverse the TRUE route first and then the nearest FALSE route (if there are children conditionals).
my initial take on the algorithm is this:
1) keep getting sequence until i hit a conditional or end node
2) if hit end node, stop
3) if hit conditional, take the TRUE route
4) once the TRUE route is done, traverse the nearest false route