What does Attachment Games and Ceasefire Protocols conclude, in numbers, about “Classical Sources: Repaying Grievance with Uprightness, and Seneca on Anger”?

Answer: Chapter 7 examines "repay grievance with uprightness" from the Analects and Seneca's On Anger: three rules of response average 2.076, 2.286 and 2.344.

Scope of the numbers: Its parameters are illustrative, and all calculations are generated by its programs. The parts on founder couples are not individual business advice.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 2.076, 2.286, 2.344

payoff per round to the row rule, eps0.05 (max R = 3)
row rule ALLC TFT g1/4 WSLS ALLD mean
kindness ALLC2.947 2.810 2.845 1.575 0.203 2.076
grievance TFT3.035 2.250 2.792 2.250 1.100 2.286
upright g1/4 3.013 2.649 2.822 2.359 0.876 2.344
what an exploiter (ALLD) earns from each row rule:
ALLD vs kindness ALLC4.702
ALLD vs grievance TFT1.325
ALLD vs upright g1/4 2.170
Show the full program
# Chapter 7. p71: three readings of Analects 14 as response rules.
# Model: the exact chain of p11 (T=5, R=3, P=1, S=0, eps = 0.05).
# "Repay grievance with kindness" is read as unconditional
# cooperation (ALLC); "repay grievance with grievance" as tit for tat;
# "repay grievance with uprightness" as a measured answer that
# retaliates but forgives a defection with probability 1/4, inside
# the window found in p21 at this noise. Each rule meets each of five
# partners. The mapping of a classical maxim to a rule is the
# author's reading, offered as a testable caricature.
import math
from fractions import Fraction as F
from functools import reduce
from operator import add

T, R, P, S = 5, 3, 1, 0
PAY = [R, S, T, P]
SWAP = [0, 2, 1, 3]
E = F(1, 20)
ROWS = [("kindness ALLC", [1, 1, 1, 1]), ("grievance TFT", [1, 0, 1, 0]),
        ("upright g=1/4", [1, F(1, 4), 1, F(1, 4)])]
COLS = [("ALLC", [1, 1, 1, 1]), ("TFT", [1, 0, 1, 0]),
        ("g=1/4", [1, F(1, 4), 1, F(1, 4)]), ("WSLS", [1, 0, 0, 1]),
        ("ALLD", [0, 0, 0, 0])]


def fsum_exact(xs):
    return reduce(add, xs, F(0))


def noisy(p, e):
    return (1 - e) * p + e * (1 - p)


def chain(s1, s2, e):
    rows = []
    for k in range(4):
        a = noisy(F(s1[k]), e)
        b = noisy(F(s2[SWAP[k]]), e)
        rows.append([a * b, a * (1 - b), (1 - a) * b, (1 - a) * (1 - b)])
    return rows


def solve(a, y):
    n = len(y)
    m = [row[:] + [y[i]] for i, row in enumerate(a)]
    for k in range(n):
        piv = next(r for r in range(k, n) if m[r][k] != 0)
        m[k], m[piv] = m[piv], m[k]
        for r in range(n):
            if r != k and m[r][k] != 0:
                f = m[r][k] / m[k][k]
                m[r] = [x - f * z for x, z in zip(m[r], m[k])]
    return [m[i][n] / m[i][i] for i in range(n)]


def stationary(mat):
    n = len(mat)
    a = [[mat[j][i] - (1 if i == j else 0) for j in range(n)]
         for i in range(n)]
    a[-1] = [F(1)] * n
    return solve(a, [F(0)] * (n - 1) + [F(1)])


def pay(a, b):
    pi = stationary(chain(a, b, E))
    return float(fsum_exact(p * v for p, v in zip(pi, PAY)))


print("payoff per round to the row rule, eps = 0.05 (max R = 3)")
print("row rule        " + "".join("%8s" % n for n, _ in COLS)
      + "    mean")
for name, rule in ROWS:
    vals = [pay(rule, c) for _, c in COLS]
    mean = math.fsum(vals) / len(vals)
    print("%-15s " % name + "".join("%8.3f" % v for v in vals)
          + "%8.3f" % mean)
print("what an exploiter (ALLD) earns from each row rule:")
for name, rule in ROWS:
    print("  ALLD vs %-15s %6.3f" % (name, pay([0, 0, 0, 0], rule)))

Single source and citation

Fan, Y. (2026). Attachment Games and Ceasefire Protocols in Intimate Partnerships: Repeated Non-Zero-Sum Games, Emotion-Decay Equations and Ending Cold Wars between Founder Couples (Version 1.0.0), Chapter 7: Classical Sources: Repaying Grievance with Uprightness, and Seneca on Anger. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-285 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026285,
  author    = {Fan, Yafu},
  title     = {Attachment Games and Ceasefire Protocols in Intimate Partnerships: Repeated Non-Zero-Sum Games, Emotion-Decay Equations and Ending Cold Wars between Founder Couples},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book