I made a guess as to what was about to happen as I’ve taught a wave algorithm in my computer science course before. It was sort of right. Then I ran the thing using an exploration value so I’ve got some “extra” code and my final build path is slower by O(4) because I have to look at each direction again.
http://devlog.merlinsbeard.net/2020/10/10/breadth-first-pathfinding/