Pathfinder algorithm | ScratchStats