Merge pathfinding