Implementation of the Path Planning Algorithm M