Friends and Enemies Games
- Friends and Enemies Games is a strategic framework where agents classify others as friends, enemies, or neutrals to form coalitions based on stability, optimality, and welfare criteria.
- The analysis involves equilibrium concepts such as core stability, Nash equilibria, and individual stability, with algorithmic methods addressing computational complexity and incentive compatibility.
- Applications span assignment games, international power allocation, and hidden-role inference, demonstrating the practical impact of friend/enemy dynamics in coalition formation and resource-sharing.
A friends and enemies game is a strategic setting—central to hedonic games, assignment games, power allocation models, and their algorithmic and learning-theoretic variants—in which each agent classifies other agents as friends, enemies, or, less commonly, neutrals or strangers. These designations induce complex group-formation, coalition, allocation, or network processes governed by stability, optimality, manipulability, and welfare objectives. The explicit friend/enemy structure provides a succinct yet expressive representation, enabling rigorous analysis of equilibria, efficiency, computational tractability, incentive compatibility, and learnability in both one-shot and iterative, deterministic or stochastic environments.
1. Canonical Models and Formal Definitions
At the abstract level, friends and enemies games instantiate a hedonic game with agents, where each agent ’s preferences over coalitions containing depend only on the set of friends , enemies , and possibly neutrals . The two dominant preference structures are Friends Appreciation (FA) and Enemies Aversion (EA): in FA, lexicographically maximizes and then minimizes ; in EA, lexicographically minimizes then maximizes (Elkind et al., 23 Dec 2025, Fioravanti et al., 2023, Chen et al., 2022, Flammini et al., 1 Jan 2025). Valuation-based representations (additively separable hedonic games, fractional hedonic games) and partition/coalition-structure outcomes are standard.
In assignment and resource-sharing variants (“assignment games with conflicts”), jobs (agents) select machines (groups) and incur penalties or bonuses based on the friend/enemy relations with others sharing the machine (Anshelevich et al., 2013). In international relations power-allocation games, each country allocates resources to support friends or counteract adversaries, with survival defined in terms of aggregate support and threat (Li et al., 2017). Extensions to friends-and-enemies-with-strangers games abstract over uncertainty regarding the final designation of “strangers” in coalition formation (Schlueter et al., 2024).
2. Equilibria, Stability, and Welfare
Major solution concepts in friends and enemies games involve both individual and group deviations, including:
- Core stability: No coalition blocks a partition if for all , (Aziz et al., 2017, Chen et al., 2022, Schlueter et al., 2024, Durand et al., 19 Feb 2025).
- Strict core, individual stability, Nash stability, contractual individual stability: Refined notions capturing weak blocking, consent of affected agents/coalitions, and response to single-agent deviations.
- Power-allocation Nash equilibria: In the international power game, a pure-strategy Nash equilibrium requires each country’s allocation to be optimal given others’, under lexicographic preference for self-survival and survival of friends (Li et al., 2017).
- Efficiency metrics: Social welfare (utilitarian, egalitarian), price of anarchy, price of stability, often parameterized by network/topological properties (Kanellopoulos et al., 2020, Anshelevich et al., 2013, Elkind et al., 23 Dec 2025).
In classic hedonic coalition games, the feasibility of core-stable partitions is determined by the structure of the friend/enemy graphs, with core non-emptiness guaranteed for some special cases (paths, forests, complete multipartite, girth ≥5), but not in general (e.g., with neutrals or dense enemy graphs) (Aziz et al., 2017, Chen et al., 2022, Elkind et al., 23 Dec 2025, Schlueter et al., 2024).
3. Algorithmic and Computational Complexity
Computational questions in friends and enemies games range from verifying existence to finding optimal/stable partitions, often exhibiting sharp complexity thresholds:
- Core and strict core verification is coNP-complete for the friends-and-enemies (FE) model even in symmetric, planar, or degree-bounded graphs, and for enemy-oriented hedonic games (Chen et al., 2022, Durand et al., 19 Feb 2025).
- Individually stable partition existence is NP-complete in FE and FEN (friends, enemies, neutrals) models (Chen et al., 2022).
- Egalitarian welfare maximization is NP-hard for FA and inapproximable to for any fixed for EA, even in symmetric cases (Elkind et al., 23 Dec 2025).
- Parameterized and FPT results: Many stability and existence tasks become fixed-parameter tractable with respect to treewidth of the friend/enemy graph, the number of friends per agent, or coalition size; W[1]- or para-NP-hardness arise for others (Durand et al., 19 Feb 2025, Chen et al., 2022).
- Special cases in P: Acyclic friend/enemy graphs, bipartite or interval graphs, forests, or bounded coalition size generally admit polynomial-time solutions for stability and welfare problems (Elkind et al., 23 Dec 2025, Aziz et al., 2017, Chen et al., 2022, Durand et al., 19 Feb 2025).
Computational barriers persist in the presence of “strangers” and neutrals: necessary/possible stability existence and verification is coNP-complete or NP-complete except in highly structured symmetric cases, where constructive criteria apply (Schlueter et al., 2024).
4. Welfare Maximization, Manipulability, and Learning
Welfare objectives have focused on utilitarian and egalitarian targets:
- Egalitarian welfare (min satisfaction): NP-hard or inapproximable for both FA and EA, with explicit polynomial-time -approximations for EA and $2 - Θ(1/n)$-approximations for FA (if all agents have ≥2 friends), via partitioning into components, star-packings, matching, or randomized combinatorial methods (Elkind et al., 23 Dec 2025).
- Strategyproofness and non-obvious manipulability (NOM): Exact social welfare maximization mechanisms are not strategyproof for FA preferences, but NOM (where no misreport can strictly improve both worst and best-case outcomes over all opponent reports) admits both exact (though NP-hard) mechanisms and polynomial-time -approximate NOM mechanisms for FA. No such result extends to EA (Flammini et al., 1 Jan 2025).
- Learnability and PAC stabilization: Both FA and EA games are efficiently PAC-learnable (sample, compute, or approximate preference profiles) with sample complexity and admit efficient PAC-stabilization algorithms due to their compact “1-bit edge” representation and structural sample-resistant core properties (Fioravanti et al., 2023).
Table: Complexity of Core Verification/Existence in Friends & Enemies Games
| Model | Core Verif. | Core Existence | Tractable Special Cases |
|---|---|---|---|
| FE, symmetric (FA/EA) | coNP-cmpl | NP-cmpl | Treewidth, friends per agent FPT |
| With neutrals/strangers | coNP-cmpl | NP-cmpl | Symmetric, acyclic: P (Schlueter et al., 2024) |
| Simple FHGs (core stable) | Σ₂p-cmpl | Σ₂p-cmpl | Degree ≤2, forest, multipartite: P |
5. Network Structure, Efficiency, and Price of Anarchy
Network/graph topology critically impacts equilibrium structure, welfare, and efficiency:
- Assignment games with conflicts (BwC, BwF): The price of total anarchy is at most $2-1/m$, and best-response dynamics converge rapidly to near-optimal groupings. The model captures social network and party/faction selection with friend/enemy edges (Anshelevich et al., 2013).
- Modified Schelling games: Introducing enemy types and tracking friends/enemies in neighborhoods (including self in denominator) yields inefficiency bounds (PoA for , $2k$ in balanced -type games, etc.), with equilibrium structure tightly governed by the underlying location graph (Kanellopoulos et al., 2020).
- International power-allocation game: Complete and bipartite adversary graphs admit precise equilibrium characterizations with explicit balancing and unique-survivor constructions based on power endowments and domination/protectorate covers (Li et al., 2017).
6. Specialized Applications and Empirical Models
Friends and enemies structure appears in both classic and novel contexts:
- Linguistic betrayal in strategy games: Dyadic friendship and betrayal in Diplomacy reveal linguistic markers—positive sentiment overcompensation, planning imbalance, and politeness reversals—that statistically predict impending alliance ruptures, with logistic regression models achieving significant classification accuracy above chance (Niculae et al., 2015).
- Hidden-role inference and belief tracking: In games like Avalon, identifying friends/foes under partial observability requires Bayesian inference (over role-assignments), counterfactual regret minimization (CFR), and deep value networks, as exemplified by the DeepRole agent, which gives empirically superior performance in both cooperator and competitor roles (Serrino et al., 2019).
- Games with strangers: Friend/enemy-oriented hedonic games with strangers analyze robustness of stability to ex post designation of “stranger” edges, introducing possible/necessary stability notions and coNP/NP-completeness dichotomies unless strong symmetry or connectivity assumptions hold (Schlueter et al., 2024).
7. Insights, Open Problems, and Directions
The theory of friends and enemies games offers a rich program for the analysis of coalition dynamics, group formation, and population-level efficiency in the presence of local antagonistic and cooperative relations. The dichotomy between tractable structural cases and pervasive computational hardness delineates explicit barriers for mechanism design and algorithmic implementation, while recent advances in learning theory and incentive compatibility (e.g., PAC stabilization, non-obvious manipulability) hint at scalable, robust solutions in sufficiently well-structured or statistical regimes.
Open challenges include extending efficient welfare-approximating and stable partition-finding algorithms to broader graph classes (beyond forests, bipartite, or bounded-degree graphs), resolving existential questions for NE/PNE in modified Schelling configurations with multiple types, fully classifying the effect of strangers and neutrals in adversarial and cooperative setting outcomes, and further integrating empirical methods (linguistic analysis, belief inference, reinforcement learning) into the strategic analysis of friends and enemies environments.