Modeling the interactions in groups is becoming increasingly important in many application domains such as the design of interactive systems and social robots. Since human interactants do not always make rational choices, a good model of their social motivations is needed to explain the strategies of the interactants that are often influenced by social factors and preferences, the feeling of fairness and understanding the need for cooperation. We propose a cognitive model of social preferences of three or more interactants that are engaged in a collaborative game. The game strategies of the interactants are modeled with cooperation ratios and utility functions. We developed a new generalized utility-based approach to model the cooperation and fairness in multiplayer interactions, which uses three utility parameters. In two-person games, as it has been investigated by others, it is impossible to distinguish between fairness and cooperation in the decisions of a given player. We show that in n-person games (n> 2), and with the use of the proposed utility-based approach, it is possible to distinguish between fairness and cooperation. This makes the proposed approach suitable for more detailed analysis of group interactions in a game setting, which can better explain the social motivation of the interactants, than existing utility models and models that utilize on cooperation ratios. We show that the proposed generalization makes the newly proposed utility function less sensitive to the payoffs of one player if the size of the group grows, and test it with data from the MARS-500 isolation experiment.