metanull
Add an additional list of 'visited', storing position, direction and score. When any runner comes across a point with a position and direction found in that list; then, if it's score is greater than the score in the list, then that node is abandoned, otherwise the score is updated. Pass that list as a reference to next_node_from @metanull