Code used in "On the coevolution of stereotype, culture and social relationships" by Joseph et al.