What does Five-Adversary Business Wargaming conclude, in numbers, about “The Joint Attack, Coverage and Global Sensitivity: Rewriting "Exhaustive" as Three Numbers That Can Be Checked”?
Answer: Chapter 6 decomposes the joint attack: the five marginal damages sum to 0.5160, a forty-point Latin hypercube covers 0.8653 of two-dimensional cells, and opening cash has a first-order sensitivity index of 0.5437.
Scope of the numbers: Marked boxes separate evidence, runnable Python calculations (22 programs), classical sources and hypotheses.
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: 0.5160
| scenario ruin | 95% interval t_med mdd95 cash |
| none | 0.0000 [0.0000, 0.0019] 0.0 1,033 18,578 |
| buyer alone | 0.0000 [0.0000, 0.0019] 0.0 1,644 14,524 |
| arbitrage alone | 0.0000 [0.0000, 0.0019] 0.0 1,760 13,619 |
| auditor alone | 0.0000 [0.0000, 0.0019] 0.0 2,872 15,539 |
| imitator alone | 0.0000 [0.0000, 0.0019] 0.0 5,321 8,151 |
| liquidity alone | 0.0010 [0.0003, 0.0036] 24.0 4,681 15,969 |
| all five | 0.2165 [0.1990, 0.2351] 40.0 9,699 3,358 |
| all but buyer | 0.1565 [0.1412, 0.1731] 44.0 10,294 4,477 |
| all but arbitrage 0.0670 [0.0569, 0.0788] | 47.0 9,611 5,414 |
| all but auditor | 0.0940 [0.0820, 0.1076] 45.0 9,620 4,835 |
| all but imitator | 0.1635 [0.1479, 0.1804] 38.0 7,871 4,483 |
| all but liquidity 0.0855 [0.0740, 0.0986] | 46.0 9,414 4,745 |
| sum of single-agent ruin 0.0010; joint ruin 0.2165 | |
| marginal damage, largest first: | |
| arbitrage | 0.1495 |
| liquidity | 0.1310 |
| auditor | 0.1225 |
| buyer | 0.0600 |
| imitator | 0.0530 |
| sum of marginal damages 0.5160 | |
| hardened, all five 0.0020 [0.0008, 0.0051] | 48.5 8,757 9,302 |
Show the full program
# Chapter 6. p61: single attacks, the joint attack and hardening
# The p13 engine, unchanged. Each adversary alone, all five together,
# and all five minus one (the marginal damage of an agent is the ruin
# it adds on top of the other four). Then a hardened plan: loopholes
# closed, open violations fixed and a larger opening reserve. Common
# random numbers: every scenario reuses the same seeded stream.
import math
import random
import statistics
ND = statistics.NormalDist()
AGENTS = ("buyer", "arbitrage", "auditor", "imitator", "liquidity")
PLAN = {"price": 199.0, "cost": 60.0, "fixed": 600.0, "fee": 0.12,
"cash0": 6000.0, "arrivals": 14.0, "med": 210.0, "sig": 0.35,
"window": 14.0, "loopholes": 3.0, "violations": 1.0,
"delay": 8.0, "runrate": 0.02, "freeze": 0.04, "lam": 2.25,
"disc": 0.15, "rate": 0.4, "exploit": 80.0, "audit": 0.06,
"fine": 600.0, "spiral": 0.85, "channels": 1.0,
"hold": 4.0, "rr0": 0.02}
def p_buy(price, ref, lam, eta, med, sig):
if ref >= price:
gl = eta * (ref - price)
else:
gl = -eta * lam * (price - ref)
need = price - gl
if need <= 1.0:
return 1.0
z = (math.log(need) - math.log(med)) / sig
return 1.0 - ND.cdf(z)
def poisson(rng, mu):
if mu <= 0.0:
return 0
lim = math.exp(-mu)
k, p = 0, rng.random()
while p > lim:
k += 1
p *= rng.random()
return k
def run_path(rng, pl, on, horizon=52):
"""One path; returns (ruin_round or 0, max_drawdown, final_cash)."""
cash = pl["cash0"]
peak, mdd = cash, 0.0
ref = pl["price"]
cum, seen, delist = 0.0, 0, 0
due = 0.0
held = {}
hist = []
for t in range(1, horizon + 1):
entered = on["imitator"] and seen and t >= seen + pl["delay"]
price = pl["price"] * (0.9 if entered else 1.0)
arr = pl["arrivals"] * (0.6 if entered else 1.0)
if on["liquidity"] and cash < 0.25 * pl["cash0"]:
price *= pl["spiral"]
if on["buyer"]:
mkt = price * 0.75 if rng.random() < pl["disc"] else price
ref += 0.3 * (mkt - ref)
pb = p_buy(price, ref, pl["lam"], 0.5, pl["med"], pl["sig"])
rr = pl["rr0"] + 0.0015 * pl["window"] + \
0.25 * max(0.0, (price - ref) / price)
else:
pb = p_buy(price, price, 1.0, 0.0, pl["med"], pl["sig"])
rr = pl["rr0"] + 0.0015 * pl["window"]
n = 0
if delist > 0:
delist -= 1
else:
n = poisson(rng, arr * pb)
gross = n * price
net = gross * (1.0 - pl["fee"]) - n * pl["cost"]
refund_now = due
due = poisson(rng, rr * n) * price
inflow = net
if on["liquidity"]:
ch = int(pl["channels"])
parts = [inflow / ch for _ in range(ch)
if rng.random() < pl["freeze"]]
stuck = math.fsum(parts)
back = t + int(pl["hold"])
held[back] = held.get(back, 0.0) + stuck
inflow -= stuck
inflow += held.pop(t, 0.0)
loss = 0.0
if on["arbitrage"]:
loss += pl["exploit"] * poisson(rng, pl["rate"] * pl["loopholes"])
if on["auditor"] and rng.random() < pl["audit"]:
found = 0
for _ in range(int(pl["violations"])):
if rng.random() < 0.7:
found += 1
loss += pl["fine"] * found
if found:
delist = 1
hist.append(gross)
if on["liquidity"] and rng.random() < pl["runrate"]:
phi = rng.uniform(0.10, 0.30)
loss += phi * math.fsum(hist[-8:])
flow = math.fsum([inflow, -pl["fixed"], -refund_now, -loss])
cash += flow
cum += flow
if on["imitator"] and not seen and cum > 3000.0:
seen = t
peak = max(peak, cash)
mdd = max(mdd, peak - cash)
if cash < 0.0:
return t, mdd, cash
return 0, mdd, cash
def wilson(k, n, z=1.959964):
p = k / n
d = 1.0 + z * z / n
c = (p + z * z / (2 * n)) / d
h = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d
return max(0.0, c - h), min(1.0, c + h)
def scenario(pl, on, n=2000):
rng = random.Random(40613)
res = [run_path(rng, pl, on) for _ in range(n)]
ruins = sorted(r[0] for r in res if r[0])
mdds = sorted(r[1] for r in res)
fin = [r[2] for r in res]
lo, hi = wilson(len(ruins), n)
return {"ruin": len(ruins) / n, "lo": lo, "hi": hi,
"t_med": float(statistics.median(ruins)) if ruins else 0.0,
"mdd50": mdds[n // 2], "mdd95": mdds[int(0.95 * n)],
"cash": math.fsum(fin) / n}
def show(name, r):
print("{:<17} {:.4f} [{:.4f}, {:.4f}] {:>5.1f} {:>6,.0f} {:>7,.0f}"
.format(name, r["ruin"], r["lo"], r["hi"], r["t_med"],
r["mdd95"], r["cash"]))
ALL = dict.fromkeys(AGENTS, True)
print("scenario ruin 95% interval t_med mdd95 cash")
show("none", scenario(PLAN, dict.fromkeys(AGENTS, False)))
alone = []
for a in AGENTS:
r = scenario(PLAN, {b: b == a for b in AGENTS})
alone.append(r["ruin"])
show(a + " alone", r)
joint = scenario(PLAN, ALL)
show("all five", joint)
marg = []
for a in AGENTS:
r = scenario(PLAN, {b: b != a for b in AGENTS})
marg.append((joint["ruin"] - r["ruin"], a))
show("all but " + a, r)
print("sum of single-agent ruin {:.4f}; joint ruin {:.4f}".format(
math.fsum(alone), joint["ruin"]))
print("marginal damage, largest first:")
for m, a in sorted(marg, reverse=True):
print(" {:<10} {:.4f}".format(a, m))
print("sum of marginal damages {:.4f}".format(
math.fsum(m for m, _ in marg)))
hard = dict(PLAN, loopholes=0.0, violations=0.0, cash0=9000.0)
show("hardened, all five", scenario(hard, ALL))Single source and citation
Fan, Y. (2026). Axiom-Driven Business Wargaming, Multi-Agent Adversarial Stress-Testing and Pre-Launch Zero-Tuition Sandboxes (Version 1.0.0), Chapter 6: The Joint Attack, Coverage and Global Sensitivity: Rewriting "Exhaustive" as Three Numbers That Can Be Checked. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-406 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026406,
author = {Fan, Yafu},
title = {Axiom-Driven Business Wargaming, Multi-Agent Adversarial Stress-Testing and Pre-Launch Zero-Tuition Sandboxes},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Axiom Table and the Round-Based Engine: Nineteen Conclusions, Zero-Intelligence Agents and a Sandbox That Can Go Bankrupt
- Chapter 2 · The Price-Sensitive Buyer: Reference Points, Loss Aversion and the Hangover after a Promotion
- Chapter 3 · The Arbitrage Speculator: a Red Team That Reads Only Our Own Rule Book, a Breach List and the Order of Repairs
- Chapter 4 · The Imitating Competitor and the Compliance Auditor: Capacity Commitment, Entry Delay and Random Checks against a Clause List
- Chapter 5 · The Liquidity Shock: Gambler's Ruin, Refund Runs and Frozen Channels
- Chapter 7 · Eastern and Western Classics: the Temple Calculation of the Sunzi and Clausewitz's Friction
- Chapter 8 · Field Tools and Checker Specifications: the Sandbox Planning Ledger, Backfill Calibration and a Pre-Registered Test