Robust program equilibrium

Caspar OesterheldTheory 2018

Abstract

One approach to achieving cooperation in the one-shot prisoner’s dilemma is Tennenholtz’s (2004) program equilibrium, in which the players of a game submit programs instead of strategies. These programs are then allowed to read each other’s source code to decide which action to take. As shown by Tennenholtz, cooperation is played in an equilibrium of this alternative game. In particular, he proposes that the two players submit the same version of the following program: cooperate if the opponent is an exact copy of this program and defect otherwise. Neither of the two players can benefit from submitting a different program. Unfortunately, this equilibrium is fragile and unlikely to be realized in practice. We thus propose a new, simple program to achieve more robust cooperative program equilibria: cooperate with some small probability $\epsilon$ and otherwise act as the opponent acts against this program. I argue that this program is similar to the tit-for-tat strategy for the iterated prisoner’s dilemma. Both “start” by cooperating and copy their opponent’s behavior from “the last round”. We then generalize this approach of turning strategies for the repeated version of a game into programs for the one-shot version of a game to other two-player games. We prove that the resulting programs inherit properties of the underlying strategy. This enables them to robustly and effectively elicit the same responses as the underlying strategy for the repeated game.

Introduction

In classical game theory, the one-shot Prisoner’s Dilemma (PD) presents a fundamental challenge: while mutual cooperation is the best collective outcome, individual rationality dictates mutual defection. Tennenholtz (2004) proposed a novel solution called "program equilibrium." In this framework, players do not choose actions directly; instead, they submit computer programs that can inspect the opponent's source code before deciding whether to Cooperate or Defect.

While theoretically sound, Tennenholtz's original implementation relied on a "clique" strategy: a program would cooperate only if the opponent's code was an exact, character-for-character match. This approach is highly fragile. In any practical setting, minor differences in implementation, variable naming, or code structure would cause the system to collapse into mutual defection. This paper addresses this fragility by proposing a robust mechanism based on behavioral simulation.

The $\epsilon$-Grounded Mechanism

The author introduces a new class of programs, exemplified by the $\epsilon$-GroundedFairBot. This program avoids the pitfalls of syntactic matching by focusing on what the opponent's code does rather than how it is written. The logic is elegantly recursive:

  1. The Base Case ($\epsilon$): With a small probability $\epsilon$, the program simply cooperates. This acts as the "first move" in a simulated interaction.
  2. The Simulation ($1-\epsilon$): Otherwise, it simulates how the opponent's program would behave when faced with this very program.
  3. The Reaction: It treats that simulated action as the "previous round" of a repeated game and responds using a reciprocal strategy, such as Tit-for-Tat.

By introducing the $\epsilon$ probability of termination, the author solves the "halting problem" inherent in mutual simulation. The recursion eventually "grounds" out, allowing the programs to reach a decision in finite time without getting stuck in an infinite loop.

The Bridge Theorem: From Repeated Games to One-Shot Programs

A central contribution of this work is the conceptual link between recursion levels in program equilibrium and rounds in an Iterated Prisoner's Dilemma (IPD). When two programs simulate each other, they are essentially playing a "mental" repeated game.

The paper proves a powerful Bridge Theorem: if a strategy $\pi$ (like Tit-for-Tat) possesses desirable properties in a repeated game—such as being a Nash Equilibrium or being robust against exploitation—the $\epsilon$-Grounded version of that strategy inherits those same properties in the one-shot program game. This allows researchers to leverage decades of research into repeated games to design robust one-shot agents.

Empirical Validation

The theoretical framework was tested against a dataset of hand-coded programs from a "Prisoner's Dilemma with visible source code" tournament conducted on the LessWrong community blog. The $\epsilon$-Grounded approach demonstrated significant robustness. Unlike previous models that required complex formal verification (provability logic), this simulation-based approach is computationally efficient and successfully elicited cooperation from a wide variety of sophisticated, non-identical programs.

Conclusion and Future Work

This research provides a robust mathematical foundation for "rational cooperation through code." By shifting the focus from syntactic identity to behavioral simulation, Oesterheld transforms program equilibrium from a theoretical curiosity into a practical protocol for autonomous agents. Future work remains to extend these proofs to multi-player games and to accommodate strategies that require longer historical memory than the single-step lookback currently modeled.

Summary updated

BibTeX
@inproceedings{oesterheld2018robust,
  author = {Caspar Oesterheld},
  title = {{Robust program equilibrium}},
  booktitle = {Theory},
  year = {2018},
  doi = {10.1007/s11238-018-9679-3},
}
Figure