The idea of machine learning is introduced to the QMC area.
A new path generation method called the auto-realignment method is proposed.
The k-means clustering algorithm is used to select representative normal vectors.
Experiments demonstrate the efficiency and robustness of the proposed method.