After obtaining the unit-cell formula consistent with doping, we searched for the minimum energy structure by switching the relevant atomic positions. A variation of the genetic algorithm (GA) is used. The search starts with a few random parent structures. At each step, tens of children are generated randomly for each parent. Dozens of lowest energy structures among the union of parents and the new generation are kept as parents for the next generation. The search is stopped if the parents set did not change much for a few steps. Several independent searches are carried out. The search is accelerated with a SGPP machine learning model, which is built on-the-fly. If the ML model is estimated to be inadequate at every energy calculation step, exact DFT calculations are carried out and the model is updated.