Path Planning with Adaptive Dimensionality