The quantitative assessment of the state and dynamics of a social system is a very difficult problem. This issue is important for both practical and theoretical reasons such as establishing the efficiency of social action programs, detecting possible community needs or allocating resources. In this paper we propose a new general theoretical framework for the study of social complexity, based on the relation of complexity and entropy in combination with evolutionary dynamics to assess the dynamics of the system. Imposing the second law of thermodynamics, we study the conditions under which cooperation emerges and demonstrate that it depends on the relative importance of local and global fitness. As cooperation is a central concept in sustain...