I suppose this is an example of bidirectional breadth-first search, but in a highly paralleled way.
I think it is one-directional. The dye remains fixed until the acid "finds it".
The path is then reconstructed as the dye "backtracks" the ph gradient.