Cultural boundaries have often been the basis for discrimination, nationalism, religious wars, and genocide. Little is known, however, about how cultural groups form or the evolutionary forces behind group affiliation and in-group favoritism. Hence, we examine these forces and show that arbitrary symbolic markers, though initially meaningless, evolve to play a key role in cultural group formation and in-group favoritism because they enable a population of heterogeneous individuals to solve important coordination problems. This process requires that individuals differ in some critical but unobservable way and that their markers are freely and flexibly chosen. If these conditions are met, markers become accurate predictors of behavior. The resulting social environment
includes strong incentives to bias interactions toward others with the same marker, and subjects accordingly show strong in-group favoritism. When markers do not acquire meaning as accurate predictors of behavior, players show a dramatically reduced taste for in-group favoritism. Our results support the prominent evolutionary hypothesis that cultural processes can reshape the selective pressures facing individuals and so favor the evolution of behavioral traits not previously advantaged.