as a large, binary string. The GA method starts with a population of random Wannier functions and passes them through a selection procedure where only that one half of the Wannier functions are retained which are most strongly localized with respect to the given locality criterion (“most fit individuals). In a second step, these survived individuals are allowed to reproduce themselves by randomly mixing their strings of phases, thus passing their attributes to the offsprings. Together with their off-springs, the survived individuals, which correspond to better localized Wannier functions, comprise the new generation. By iterating this procedure over several thousands of generations the algorithm will converge slowly but definitely towards the global extremum. Once the GA procedure has reached the valley of the global extremum, the CG method should be applied subsequently to the GA algorithm in order to accelerate the convergence and improve the accuracy of the solution [@MIT99].

In figure \[fig:ga\_sm\] the evolution of the GA results is depicted for two representative systems and polarizations. Every 100 generations a Wannier function with highest locality in the current population was taken as a starting point for the subsequent CG optimization. Over the first several thousand generations the locality of 