# Hedonic game

In cooperative game theory, a hedonic game (also known as a hedonic coalition formation game) is a game that models the formation of coalitions (groups) of players when players have preferences over which group they belong to. A hedonic game is specified by giving a finite set of players, and, for each player, a preference ranking over all coalitions (subsets) of players that the player belongs to. The outcome of a hedonic game consists of a partition of the players into disjoint coalitions, that is, each player is assigned a unique group. Such partitions are often referred to as coalition structures.
Hedonic games are a type of non-transferable utility game. Their distinguishing feature (the "hedonic aspect") is that players only care about the identity of the players in their coalition, but do not care about how the remaining players are partitioned, and do not care about anything other than which players are in their coalition. Thus, in contrast to other cooperative games, a coalition does not choose how to allocate profit among its members, and it does not choose a particular action to play. Some well-known subclasses of hedonic games are given by matching problems, such as the stable marriage, stable roommates, and the hospital/residents problems.
The players in hedonic games are typically understood to be self-interested, and thus hedonic games are usually analyzed in terms of the stability of coalition structures, where several notions of stability are used, including the core and Nash stability. Hedonic games are studied both in economics, where the focus lies on identifying sufficient conditions for the existence of stable outcomes, and in multi-agent systems, where the focus lies on identifying concise representations of hedonic games and on the computational complexity of finding stable outcomes.

## Definition

Formally, a hedonic game is a pair $(N,(\succcurlyeq _{i})_{i\in N})$ of a finite set $N$ of players (or agents), and, for each player $i\in N$ a complete and transitive preference relation $\succcurlyeq _{i}$ over the set $\{S\subseteq N:i\in S\}$ of coalitions that player $i$ belongs to. A coalition is a subset $S\subseteq N$ of the set of players. The coalition $N$ is typically called the grand coalition.
A coalition structure $\pi$ is a partition of $N$. Thus, every player $i\in N$ belongs to a unique coalition $\pi (i)$ in $\pi$.

## Solution concepts

Like in other areas of game theory, the outcomes of hedonic games are evaluated using solution concepts. Many of these concepts refer to a notion of game-theoretic stability: an outcome is stable if no player (or possibly no coalition of players) can deviate from the outcome so as to reach a subjectively better outcome. Here we give definitions of several solution concepts from the literature.
* A coalition structure $\pi$ is in the core (or is core stable) if there is no coalition $S$ whose members all prefer $S$ to $\pi$. Formally, a non-empty coalition $S$ is said to block $\pi$ if $S\succ _{i}\pi (i)$ for all $i\in S$. Then $\pi$ is in the core if there are no blocking coalitions.
* A coalition structure $\pi$ is in the strict core (or is strictly core stable) if there is no weakly blocking coalition $S$ where all members weakly prefer $S$ to $\pi$ and some member strictly prefers $S$ to $\pi$. In other words, $\pi$ is in the strict core if $\not \exists :S\subseteq N:(\forall i\in N:S\succeq \pi )\land (\exists i\in N:S\succ \pi )$.
* A coalition structure $\pi$ is Nash-stable if no player wishes to change coalition within $\pi$. Formally, $\pi$ is Nash-stable if there is no $i\in N$ such that $S\cup \{i\}\succ _{i}\pi (i)$ for some $S\in \pi \cup \{\emptyset \}$. Notice that, according to Nash-stability, a deviation by a player is allowed even if members of the group $S$ that are joined by $i$ are made worse off by the deviation.
* A coalition structure $\pi$ is individually stable if no player wishes to join another coalition whose members all welcome the player. Formally, $\pi$ is individually stable if there is no $i\in N$ such that $S\cup \{i\}\succ _{i}\pi (i)$ for some $S\in \pi \cup \{\emptyset \}$ where $S\cup \{i\}\succeq _{j}S$ for all $j\in S$.
* A coalition structure $\pi$ is contractually individually stable if there is no player who belongs to a coalition willing to let him leave and who wants to join a coalition willing to have him. In other words, $\pi$ is contractually individually stable if $\not \exists i\in N:(\forall j\in \pi (i):\pi (i)\setminus \{i\}\succeq _{j}\pi (i))~\land ~(\exists C\in \pi :(C\cup \{i\}\succ _{i}\pi (i))~\land ~(\forall j\in C:C\cup \{i\}\succeq _{j}C))$.
One can also define Pareto optimality of a coalition structure. In the case that the preference relations are represented by utility functions, one can also consider coalition structures that maximize social welfare.

## Examples

The following three-player game has been named "an undesired guest".${\begin{aligned}&\{1,2\}\succ _{1}\{1\}\succ _{1}\{1,2,3\}\succ _{1}\{1,3\},\\&\{1,2\}\succ _{2}\{2\}\succ _{2}\{1,2,3\}\succ _{2}\{2,3\},\\&\{1,2,3\}\succ _{3}\{2,3\}\succ _{3}\{1,3\}\succ _{3}\{3\}.\end{aligned}}$From these preferences, we can see that $1$ and $2$ like each other, but dislike the presence of player $3$.
Consider the partition $\pi =\{\{1,2\},\{3\}\}$. Notice that in $\pi$, player 3 would prefer to join the coalition $\{1,2\}$, because $\{1,2,3\}\succ _{3}\{3\}$, and hence $\pi$ is not Nash-stable. However, if player $3$ were to join $\{1,2\}$, player $1$ (and also player $2$) would be made worse off by this deviation, and so player $3$'s deviation does not contradict individual stability. Indeed, one can check that $\pi$ is individually stable. We can also see that there is no group $S\subseteq N$ of players such that each member of $S$ prefers $S$ to their coalition in $\pi$ and so the partition is also in the core.
Another three-player example is known as "two is a company, three is a crowd".${\begin{aligned}&\{1,2\}\succ _{1}\{1,3\}\succ _{1}\{1,2,3\}\succ _{1}\{1\},\\&\{2,3\}\succ _{2}\{2,1\}\succ _{2}\{1,2,3\}\succ _{2}\{2\},\\&\{3,1\}\succ _{3}\{3,2\}\succ _{3}\{1,2,3\}\succ _{3}\{3\}.\end{aligned}}$In this game, no partition is core-stable: The partition $\{\{1\},\{2\},\{3\}\}$ (where everyone is alone) is blocked by $\{1,2,3\}$; the partition $\{\{1,2,3\}\}$ (where everyone is together) is blocked by $\{1,2\}$; and partitions consisting of one pair and a singleton are blocked by another pair, because the preferences contain a cycle.

## Concise representations and restricted preferences

Since the preference relations in a hedonic game are defined over the collection of all $2^{|N|-1}$ subsets of the player set, storing a hedonic game takes exponential space. This has inspired various representations of hedonic games that are concise, in the sense that they (often) only require polynomial space.
* Individually rational coalition lists represent a hedonic game by explicitly listing the preference rankings of all agents, but only listing individually rational coalitions, that is coalitions $S$ with $S\succcurlyeq _{i}\{i\}$. For many solution concepts, it is irrelevant how precisely the player ranks unacceptable coalitions, since no stable coalition structure can contain a coalition that is not individually rational for one of the players. Note that if there are only polynomially many individually rational coalitions, then this representation only takes polynomial space.
* Hedonic coalition nets represent hedonic games through weighted Boolean formulas. As an example, the weighted formula $j\land \lnot k\mapsto _{i}5$ means that player $i$ receives 5 utility points in coalitions that include $j$ but do not include $k$. This representation formalism is universally expressive and often concise (though, by necessity, there are some hedonic games whose hedonic coalition net representation requires exponential space).
* Additively separable hedonic games are based on every player assigning numerical values to the other players; a coalition is as good for a player as the sum of the values of the players. Formally, additively separable hedonic games are those for which there exist valuations $v_{i}(j)\in \mathbb {R}$ for every $i,j\in N$ such that for all players $i$ and all coalitions $S,T\ni i$, we have $S\succcurlyeq _{i}T$ if and only if $\textstyle \sum _{j\in S}v_{i}(j)\geq \textstyle \sum _{j\in T}v_{i}(j)$. A similar definition, using the average rather than the sum of values, leads to the class of fractional hedonic games.
* In anonymous hedonic games, players only care about the size of their coalition, and agents are indifferent between any two coalitions with the same cardinality: if $|S|=|T|$ then $S\sim _{i}T$. These games are anonymous in the sense that the identities of the individuals do not influence the preference ranking.
* In Boolean hedonic games, each player has a Boolean formula whose variables are the other players. Each player prefers coalitions that satisfy its formula to coalitions that do not, but is otherwise indifferent.
* In hedonic games with preferences depending on the worst player (or W-preferences), players have a preference ranking over players, and extend this ranking to coalitions by evaluating a coalition according to the (subjectively) worst player in it. Several similar concepts (such as B-preferences) have been defined.

## Existence guarantees

Not every hedonic game admits a coalition structure that is stable. For example, we can consider the stalker game, which consists of just two players $N=\{1,2\}$ with $\{1\}\succ _{1}\{1,2\}$ and $\{1,2\}\succ _{2}\{2\}$. Here, we call player 2 the stalker. Notice that no coalition structure for this game is Nash-stable: in the coalition structure $\pi _{1}=\{\{1\},\{2\}\}$, where both players are alone, the stalker 2 deviates and joins 1; in the coalition structure $\pi _{2}=\{\{1,2\}\}$, where the players are together, player 1 deviates into the empty coalition so as to not be together with the stalker. There is a well-known instance of the stable roommates problem with 4 players that has empty core, and there is also an additively separable hedonic game with 5 players that has empty core and no individually stable coalition structures.
For symmetric additively separable hedonic games (those that satisfy $v_{i}(j)=v_{j}(i)$ for all $i,j\in N$), there always exists a Nash-stable coalition structure by a potential function argument. In particular, coalition structures that maximize social welfare are Nash-stable. A similar argument shows that a Nash-stable coalition structure always exists in the more general class of subset-neutral hedonic games. However, there are examples of symmetric additively separable hedonic games that have empty core.
Several conditions have been identified that guarantee the existence of a core coalition structure. This is the case in particular for hedonic games with the common ranking property, with the top coalition property, with top or bottom responsiveness, with descending separable preferences, and with dichotomous preferences. Moreover, common ranking property has been shown to guarantee the existence of a coalition structure which is core stable, individually stable and Pareto optimal at the same time.

## Computational complexity

When considering hedonic games, the field of algorithmic game theory is usually interested in the complexity of the problem of finding a coalition structure satisfying a certain solution concept when given a hedonic game as input (in some concise representation). Since it is usually not guaranteed that a given hedonic game admits a stable outcome, such problems can often be phrased as a decision problem asking whether a given hedonic game admits any stable outcome. In many cases, this problem turns out to be computationally intractable. One exception is hedonic games with common ranking property where a core coalition structure always exists, and it can be found in polynomial time. However, it is still NP-hard to find a Pareto optimal or socially optimal outcome.
In particular, for hedonic games given by individually rational coalition lists, it is NP-complete to decide whether the game admits a core-stable, a Nash-stable, or an individually stable outcome. The same is true for anonymous games. For additively separable hedonic games, it is NP-complete to decide the existence of a Nash-stable or an individually stable outcome and complete for the second level of the polynomial hierarchy to decide whether there exists a core-stable outcome, even for symmetric additive preferences. These hardness results extend to games given by hedonic coalition nets. While Nash- and individually stable outcomes are guaranteed to exist for symmetric additively separable hedonic games, finding one can still be hard if the valuations $v_{i}(j)$ are given in binary; the problem is PLS-complete. For the stable marriage problem, a core-stable outcome can be found in polynomial time using the deferred acceptance algorithm; for the stable roommates problem, the existence of a core-stable outcome can be decided in polynomial time if preferences are strict, but the problem is NP-complete if preference ties are allowed. Hedonic games with preferences based on the worst player behave very similarly to stable roommates problems with respect to the core, but there are hardness results for other solution concepts. Many of the preceding hardness results can be explained through meta-theorems about extending preferences over single players to coalitions.

## Applications
### Robotics

For a robotic system consisting of multiple autonomous intelligent robots (e.g., swarm robotics), one of their decision making issues is how to make a robotic team for each of given tasks requiring collaboration of the robots. Such a problem can be called multi-robot task allocation or multi-robot coalition formation problem. This problem can be modelled as a hedonic game, and the preferences of the robots in the game may reflect their individual favours (e.g., possible battery consumption to finish a task) and/or social favours (e.g., complementariness of other robots' capabilities, crowdedness for shared resource).
Some of the particular concerns in such robotics application of hedonic games relative to the other applications include the communication network topology of robots (e.g., the network is most likely partially connected network) and the need of a decentralised algorithm that finds a Nash-stable partition (because the multi-robot system is a decentralised system).
Using anonymous hedonic games under SPAO (Single-Peaked-At-One) preference, a Nash-stable partition of decentralised robots, where each coalition is dedicated to each task, is guaranteed to be found within $O(n_{a}^{2}d_{G})$ of iterations, where $n_{a}$ is the number of the robots and $d_{G}$ is their communication network diameter. Here, the implication of SPAO is robots' social inhibition (i.e., reluctancy of being together), which normally arises when their cooperation is subadditive.