Some species mate non-randomly with respect to alleles underlying immunity. One hypothesis proposes that this is advantageous because non-random mating can lead to offspring with superior parasite resistance. We investigate this hypothesis, generalizing previous models in four ways: First, rather than only examine invasibility of modifiers of non-random mating, we identify evolutionarily stable strategies. Second, we study co-evolution of both haploid and diploid hosts and parasites. Third, we allow for maternal parasite transmission. Fourth, we allow for many alleles at the interaction-locus. We find that evolutionarily stable rates of assortative or disassortative mating are usually near zero or one. However, for one case, whose assumptions most closely match the Major Histocompatibility Complex (MHC) system, intermediate rates of disassortative mating can evolve. Across all cases, with haploid hosts, evolution proceeds towards complete disassortative mating, whereas with diploid hosts either assortative or disassortative mating can evolve. Evolution of non-random mating is much less affected by the ploidy of parasites. For the MHC case, maternal transmission of parasites, because it creates an advantage to producing offspring that differ from their parents, leads to higher evolutionarily stable rates of disassortative mating. Lastly, with more alleles at the interaction-locus, disassortative mating evolves to higher levels.