Finish the learning part of path planning. Still need test though.