关于「实证闭环:扩展人格维度、合成客群覆盖抽样器与预注册检验」,《红蓝军合成客群沙盘》给出的定量结论是什么?

结论:第八章给出店主视角的八步闭环、合成客群覆盖抽样器与预注册检验方案。书中以标注框区分已发表的证据、可运行的 Python 计算(22 段程序)、原典与作者的假说。

数据口径:本书检验相反的立项命题:只用平均买家会漏掉尾部破绽,拉丁超立方合成客群在同样测试量下覆盖更多人格组合(McKay、Beckman 与 Conover 1979 年刊于《技术计量学》),多轮砍价有 Rubinstein 1982 年给出的贴现均衡。 书中参数为示意;全部计算由书中程序生成,不调用任何模型接口;本书是非个人化经营建议。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库

Synthetic Customer Coverage Sampler (B-259)
axes: role3, stage=6, track=8, objection=6, budget=4, patience=4
cells 13824; crowd n24; seed 20261113
first 8 buyers (level index per axis):
# role stage track objection budget patience
11 3 3 3 1 3
21 2 2 1 0 2
32 4 6 3 2 1
41 1 5 2 2 2
50 0 1 5 0 3
60 4 0 3 3 3
72 2 4 5 0 2
82 0 4 2 2 0
each level appears min-max times: role 8-8, stage 4-4, track 3-3, objection
4-4, budget 6-6, patience 6-6
coverage t1 t=2 t=3
LHS1.0000 0.6633 0.1762
SRS mean0.9848 0.5782 0.1668
level pairs 392; no crowd under 48 covers them all
buyers to meet a leak of rate 0.0052 (95%)574
a clean run of 24 buyers bounds a leak rate at 0.1173
urgency only from real stock and real deadlines
查看完整验算程序
# Chapter 8. p81: the Synthetic Customer Coverage Sampler, demo run.
# Same functions as distill/tool.py (run with no arguments it prints
# this demo): a Latin hypercube crowd of 24 over six persona axes, its
# balance per axis, one-, two- and three-way coverage against the mean
# of 200 simple random crowds (p12), the pair floor (p21), the buyers
# needed to meet a leak of rate 1/192 (p53) and the clean-run bound.
# Seed 20261113 fixed; persona axes and counts illustrative.
import itertools
import math
import random
import textwrap

DEFAULT = "role=3,stage=6,track=8,objection=6,budget=4,patience=4"


def parse_levels(spec):
    out = []
    for part in spec.split(","):
        name, _, val = part.partition("=")
        out.append((name.strip(), int(val)))
    return out


def lhs(n, levels, rng):
    cols = []
    for _, lv in levels:
        perm = list(range(n))
        rng.shuffle(perm)
        cols.append([int((perm[k] + rng.random()) / n * lv)
                     for k in range(n)])
    return [tuple(c[k] for c in cols) for k in range(n)]


def srs(n, levels, rng):
    return [tuple(rng.randrange(lv) for _, lv in levels)
            for _ in range(n)]


def coverage(crowd, levels, t):
    lv = [x for _, x in levels]
    seen, total = 0, 0
    for axes in itertools.combinations(range(len(lv)), t):
        total += math.prod(lv[a] for a in axes)
        seen += len({tuple(b[a] for a in axes) for b in crowd})
    return seen / total if total else 1.0


def need(p):
    return math.ceil(math.log(0.05) / math.log(1 - p))


def analyse(n, levels, seed, reps, leak):
    rng = random.Random()
    rng.seed(seed)
    lv = [x for _, x in levels]
    crowd = lhs(n, levels, rng)
    ts = [t for t in (1, 2, 3) if t <= len(lv)]
    mine = {t: coverage(crowd, levels, t) for t in ts}
    rand = {t: [] for t in ts}
    for _ in range(reps):
        c = srs(n, levels, rng)
        for t in ts:
            rand[t].append(coverage(c, levels, t))
    big = sorted(lv, reverse=True)
    pairs = math.fsum(a * b for a, b in itertools.combinations(lv, 2))
    balance = []
    for j, (name, x) in enumerate(levels):
        counts = [0] * x
        for b in crowd:
            counts[b[j]] += 1
        balance.append({"axis": name, "levels": x,
                        "min": min(counts), "max": max(counts)})
    step = math.lcm(*lv)
    return {
        "n": n, "seed": seed, "reps": reps, "levels": dict(levels),
        "cells": math.prod(lv), "balanced": n % step == 0,
        "next_balanced_n": -(-n // step) * step,
        "crowd": [list(b) for b in crowd], "balance": balance,
        "coverage_lhs": {str(t): mine[t] for t in ts},
        "coverage_srs_mean": {str(t): math.fsum(rand[t]) / reps
                              for t in ts},
        "pairs": int(pairs),
        "pair_floor": big[0] * big[1] if len(big) > 1 else big[0],
        "leak_rate": leak, "buyers_to_sight_leak": need(leak),
        "clean_run_bound": 1 - 0.05 ** (1 / n),
    }


def report(r, show):
    names = list(r["levels"])
    out = ["Synthetic Customer Coverage Sampler (B-259)",
           "axes: " + ", ".join("%s=%d" % kv for kv in r["levels"].items()),
           "cells %d; crowd n = %d; seed %d"
           % (r["cells"], r["n"], r["seed"])]
    if not r["balanced"]:
        out.append("warning: n is not a multiple of every level count;"
                   " next balanced n = %d" % r["next_balanced_n"])
    out.append("first %d buyers (level index per axis):" % show)
    out.append(("  #  " + " ".join("%-9s" % x[:9] for x in names))
               .rstrip())
    for i, b in enumerate(r["crowd"][:show], 1):
        out.append(("%3d  " % i + " ".join("%-9d" % v for v in b))
                   .rstrip())
    out.extend(textwrap.wrap("each level appears min-max times: " + ", ".join(
        "%s %d-%d" % (x["axis"], x["min"], x["max"])
        for x in r["balance"]), 76))
    out.append("coverage  " + "  ".join(
        "t=%s   " % k for k in sorted(r["coverage_lhs"])).rstrip())
    for label, key in (("LHS", "coverage_lhs"),
                       ("SRS mean", "coverage_srs_mean")):
        out.append("%-8s  " % label + "  ".join(
            "%.4f" % r[key][k] for k in sorted(r[key])))
    out.append("level pairs %d; no crowd under %d covers them all"
               % (r["pairs"], r["pair_floor"]))
    out.append("buyers to meet a leak of rate %.4f (95%%): %d"
               % (r["leak_rate"], r["buyers_to_sight_leak"]))
    out.append("a clean run of %d buyers bounds a leak rate at %.4f"
               % (r["n"], r["clean_run_bound"]))
    out.append("urgency only from real stock and real deadlines")
    return out


r = analyse(24, parse_levels(DEFAULT), 20261113, 200, 1 / 192)
for line in report(r, 8):
    print(line)

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《红蓝军合成客群对抗沙盘、参数化挑剔买家多轮砍价博弈与漏单破绽预检母典》第 8 章「实证闭环:扩展人格维度、合成客群覆盖抽样器与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-259 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026259,
  author    = {Fan, Yafu},
  title     = {Red-Blue Synthetic-Customer Sandboxes: Multi-Round Bargaining against Parameterised Demanding Buyers and Pre-Launch Leak Detection},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论