Asymptotically Optimal Sequential Experimentation Under Generalized Ranking