Linking microscopic and macroscopic behavior is at the heart of many natural and social sciences. This apparent similarity conceals essential differences across disciplines: Although physical particles are assumed to optimize the global energy, economic agents maximize their own utility. Here, we solve exactly a Schelling-like segregation model, which interpolates continuously between cooperative and individual dynamics. We show that increasing the degree of cooperativity induces a qualitative transition from a segregated phase of low utility toward a mixed phase of high utility. By introducing a simple function that links the individual and global levels, we pave the way to a rigorous approach of a wide class of systems, where dynamics are governed by individual strategies.