Feelings of sexual attraction arise when other biochemical algorithms calculate that a nearby individual offers a high probability of successful mating, social bonding, or some other coveted goal. Moral feelings such as outrage, guilt or forgiveness derive from neural mechanisms that evolved to enable group cooperation.

