The prediction of interface structures is an uncertain and time-consuming task. A technique merging ab initio calculations with a genetic algorithm simplifies the process and provides suitable solutions of the atomic structures that would be hard to envisage a priori.