Machine Learning Model for a Dynamic Path Planning Problem