The behavior of individuals for the purpose of discriminating between the sexes, for the purpose of finding a suitable mating partner.