Evolutionary adaptation in ants