Workspace IndexMath › Day 17

Repeated Games and Reputation — excluding the Folk Theorem proof TODO

Math · Day 17 / 52 · August — Game Theory & Protocol Economics (Day 11-17)

Concept

In a one-shot game, defection is a dominant strategy, so cooperation can't be sustained as an equilibrium — but when the same players repeat the game, current gains and future retaliation are weighed together, and cooperation can be sustained as an equilibrium. The key variable is the discount factor, representing how much future payoffs are valued (or, equivalently, the probability the game continues); once this value is large enough, the loss from future punishment outweighs the one-time gain from defecting. Strategies like grim trigger and tit-for-tat turn this comparison into an executable rule, and the condition for sustaining cooperation reduces to the inequality 'gain from defecting ≤ discounted loss from future punishment.' The folk theorem states that as the discount factor approaches 1, essentially any payoff combination satisfying individual rationality can be supported as an equilibrium (we won't cover the proof). The practical takeaway is that reputation isn't a matter of morality — it's an equilibrium phenomenon produced by three conditions: repeated interaction, observability of behavior, and the value of the future relationship.

The honesty of continuously participating actors — validators, oracle providers, market makers — is something you design through the possibility of punishment and the size of future earnings, not something you can count on out of good faith. The moment a relationship becomes one-shot, that equilibrium disappears.

Code & Formula

# 반복게임과 평판(grim trigger) — 할인인자가 임계치 이상이면 "영원한 보복" 위협만으로
# 무한반복 죄수의 딜레마에서 협력이 균형으로 유지됨을 수치로 확인한다.

# 표준 PD payoff: R(둘다 협력) < T(배신 유혹) 이고 P(둘다 배신) 는 그 사이 어딘가
T, R, P, S = 5, 3, 1, 0  # Temptation, Reward, Punishment, Sucker

# grim trigger: 상대가 한 번이라도 배신하면 그 뒤로 영원히 배신으로 응징
# 협력 유지 조건(이탈 무이익): R/(1-δ) >= T + δ*P/(1-δ)  =>  δ >= (T-R)/(T-P)
threshold = (T - R) / (T - P)
print(f"협력 유지를 위한 할인인자 임계값 δ* = (T-R)/(T-P) = {threshold:.3f}")


def value_of_cooperating(delta: float) -> float:
    # 계속 협력 → 매 라운드 R을 무한히 할인합산
    return R / (1 - delta)


def value_of_deviating_once(delta: float) -> float:
    # 이번 라운드만 배신(T 획득) 후 상대의 grim trigger로 영원히 P
    return T + delta * P / (1 - delta)


for delta in (0.3, threshold, 0.7):
    coop = value_of_cooperating(delta)
    dev = value_of_deviating_once(delta)
    verdict = "협력 우세 → 협력이 균형으로 유지" if coop >= dev else "이탈 우세 → 협력 붕괴"
    print(f"δ={delta:.3f}: V(협력)={coop:8.3f}  V(1회 이탈+영구응징)={dev:8.3f}  → {verdict}")

Exercise

Fix a payoff table for the repeated prisoner's dilemma, compute by hand the minimum discount factor under which grim trigger sustains cooperation, then check how that threshold moves as you increase the gain from defecting.

Practical Connection

In prediction markets, the incentive for an oracle reporting outcomes or a dispute participant to stay honest ultimately comes down to whether the size of the stake and future fee income outweigh the one-time gain from manipulation.

If you study this on a given day, add a note link and a ✅ to this line in the source curriculum (docs/knowledge/math-50-curriculum.md) and this spot will lead straight to the note body. You can also write directly on this page — but regenerating overwrites it, so it's safer to keep anything you want to save as markdown under docs/algorithms/.


한국어

반복게임과 평판 TODO

Math · Day 17 / 52 · 8월 — 게임이론·프로토콜 경제학 (Day 11–17)

폴크정리 증명은 제외

개념

1회성 게임에서는 배신이 우월전략이어서 협력이 균형이 되지 못하지만, 같은 상대와 게임이 반복되면 현재의 이득과 미래의 보복이 함께 계산되어 협력이 균형으로 유지될 수 있다. 핵심 변수는 할인인자로, 미래 보수를 얼마나 중시하는지(또는 게임이 계속될 확률이 얼마인지)를 나타내며, 이 값이 충분히 크면 이탈로 얻는 일회성 이득보다 이후 처벌로 잃는 손실이 커진다. grim trigger나 tit-for-tat 같은 유발전략은 바로 이 비교를 실행 가능한 규칙으로 만든 것이고, 협력 유지 조건은 '이탈 이득 ≤ 할인된 미래 처벌 손실'이라는 부등식으로 정리된다. 폴크정리는 할인인자가 1에 가까워질 때 개인 합리성을 만족하는 사실상 모든 보수 조합이 균형으로 지지될 수 있음을 말해 준다(증명은 다루지 않는다). 실무적 함의는 평판이 도덕이 아니라 반복 가능성·행동의 관측 가능성·미래 관계의 가치라는 세 조건이 만들어 내는 균형 현상이라는 것이다.

검증자, 오라클 제공자, 마켓메이커처럼 계속 참여하는 주체의 정직함은 처벌 가능성과 미래 수익의 크기로 설계되는 것이지 선의로 기대할 수 있는 게 아니다. 관계가 일회성이 되는 순간 그 균형은 사라진다.

코드 · 수식

# 반복게임과 평판(grim trigger) — 할인인자가 임계치 이상이면 "영원한 보복" 위협만으로
# 무한반복 죄수의 딜레마에서 협력이 균형으로 유지됨을 수치로 확인한다.

# 표준 PD payoff: R(둘다 협력) < T(배신 유혹) 이고 P(둘다 배신) 는 그 사이 어딘가
T, R, P, S = 5, 3, 1, 0  # Temptation, Reward, Punishment, Sucker

# grim trigger: 상대가 한 번이라도 배신하면 그 뒤로 영원히 배신으로 응징
# 협력 유지 조건(이탈 무이익): R/(1-δ) >= T + δ*P/(1-δ)  =>  δ >= (T-R)/(T-P)
threshold = (T - R) / (T - P)
print(f"협력 유지를 위한 할인인자 임계값 δ* = (T-R)/(T-P) = {threshold:.3f}")


def value_of_cooperating(delta: float) -> float:
    # 계속 협력 → 매 라운드 R을 무한히 할인합산
    return R / (1 - delta)


def value_of_deviating_once(delta: float) -> float:
    # 이번 라운드만 배신(T 획득) 후 상대의 grim trigger로 영원히 P
    return T + delta * P / (1 - delta)


for delta in (0.3, threshold, 0.7):
    coop = value_of_cooperating(delta)
    dev = value_of_deviating_once(delta)
    verdict = "협력 우세 → 협력이 균형으로 유지" if coop >= dev else "이탈 우세 → 협력 붕괴"
    print(f"δ={delta:.3f}: V(협력)={coop:8.3f}  V(1회 이탈+영구응징)={dev:8.3f}  → {verdict}")

연습

반복 죄수의 딜레마 보수표를 하나 정하고 grim trigger 하에서 협력이 유지되는 할인인자의 최소값을 직접 계산한 뒤, 이탈 이득을 키우면 그 임계값이 어떻게 움직이는지 확인하라.

실무 · Verex 연결

예측시장에서 결과를 보고하는 오라클이나 분쟁 참여자가 정직할 유인은 결국 스테이크의 크기와 미래 수수료 수입이 일회성 조작 이득을 넘느냐로 결정된다.

공부한 날 원본 커리큘럼(docs/knowledge/math-50-curriculum.md)의 이 줄에 노트 링크와 ✅ 를 붙이면, 이 자리는 노트 본문으로 바로 이어집니다. 노트 없이 이 페이지에 바로 적어도 됩니다 — 다만 다시 생성하면 덮어쓰이므로, 남길 글은 docs/algorithms/ 의 마크다운으로 쓰는 편이 안전합니다.

← 16. 조합 게임이론(제로섬 vs 비제로섬)18. 벡터·행렬·행렬곱·역행렬 →