The long-term stability of binary nanoparticles and clusters is one of the main challenges in the develop- ment of novel (electro-)catalysts for e.g. CO2 reduction. Here, we present a method for predicting the optimal composition and structure of alloy nanoparticles and clus- ters, with particular focus on the surface properties. Based on a genetic algorithm (GA) we introduce and discuss efficient permutation operations that work by interchanging positions of elements depending on their local environment and position in the cluster. We discuss the fact that in order to be efficient, the operators have to be dynamic, i.e. change their behavior during the course of an algorithm run. The implementation of the GA including the cus- tomized operators is freely available at http://svn.fysik.dtu. dk/projects/pga.