We provide a generalized definition of evolutionary stability of heritable types in arbitrarily large symmetric interactions under random matching that may be assortative. We establish stability results when these types are strategies in games, and when they are preferences or moral values in games under incomplete information. We show that a class of moral preferences, with degree of morality equal to the index of assortativity are evolutionarily stable. In particular, selfishness is evolutionarily unstable when there is positive assortativity in the matching process. We establish that evolutionarily stable strategies are the same as those played in equilibrium by rational but partly morally motivated individuals, individuals with evolutionarily stable preferences. We provide simple and operational criteria for evolutionary stability and apply these to canonical examples.