It has 23,328 distinct mating types. Individuals of any mating type are compatible for mating with most other mating types. There are two genetic loci determining the mating type, locus A with 288 alleles and locus B with 81 alleles. A pair of fungi will only be fertile if they have different A and different B alleles; that is, each mating type can enter fertile pairings with 22,960 others.
How do they differentiate these mating types and what separate things do they contribute to the life cycle?
From the Wikipedia page: