关于「两种摩擦:换线成本要求滞后带,会变的市场要求记录褪色」,《业务线周度配额》给出的定量结论是什么?
结论:有换线成本时,吉廷斯指数不再有最优性,滞后带是一个简单有效的补丁:成本越高,最好的滞后带越宽,在示意模型里约为成本的三到五成。市场会变时,旧记录必须褪色:γ 取 0.97 时,汤普森抽样与贪心规则都把收益从理想值的七成多提高到近九成。到这里,规则里的「一次成交」还只是一个抽象的单位。收费站、代购、出版三条线的一次成交,价值相差很大,单位成本也不同;指数该怎样换算成钱?
数据口径:核对吉廷斯 1979 年的论文与后续文献以后,本书修正了立项蓝图:吉廷斯指数的最优性只在单线经营、闲置线不变、换线无成本、几何贴现时成立,周度拆分预算、换线成本与会变的市场都在定理之外;锁死是一个概率说法,两条示意线上按累计回报全押有 0.2133 的重复在下半年完全押错,但在每单位贴现 0.9 的短视界里贪心相对指数只损失 0.0050 到 0.0166。 书中参数为示意,毛利与成本用记账点数而非价格;全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.97
| restless lines: rate redrawn w.p. 0.01 per period, T = 2000 | ||
| rule | gamma share-oracle | |
| greedy | 1.00 | 0.7160 |
| thompson | 1.00 | 0.7699 |
| thompson | 0.99 | 0.8707 |
| thompson | 0.97 | 0.8829 |
| thompson | 0.90 | 0.8461 |
| greedy | 0.97 | 0.8849 |
查看完整验算程序
# Chapter 5. p52: when idle lines keep changing, memory must fade.
# Model: 3 Bernoulli lines; each period, each line's rate is redrawn
# from Uniform(0, 1) with probability 0.01 (a market shift that happens
# whether or not the line is funded: a restless line, Whittle 1988).
# One unit per period, 2000 periods, 100 runs, no discounting.
# Rules: greedy and Thompson on full memory, and Thompson with
# forgetting gamma: every period all pseudo-counts are multiplied by
# gamma, so old evidence fades and an idle line's uncertainty regrows.
# Score = mean successes per period / oracle (who knows current rates).
import math
import random
N, T, RUNS, SHIFT = 3, 2000, 100, 0.01
def run(rule, gamma, world_seed, rng):
world = random.Random(world_seed)
p = [world.random() for _ in range(N)]
s, f = [0.0] * N, [0.0] * N
hits, best = 0, []
for _ in range(T):
for i in range(N):
if world.random() < SHIFT:
p[i] = world.random()
if rule == "greedy":
sc = [(1 + s[i]) / (2 + s[i] + f[i]) for i in range(N)]
else:
sc = [rng.betavariate(1 + s[i], 1 + f[i]) for i in range(N)]
i = max(range(N), key=lambda j: (sc[j], -j))
hit = world.random() < p[i]
best.append(max(p))
for j in range(N):
s[j] *= gamma
f[j] *= gamma
if hit:
s[i] += 1
hits += 1
else:
f[i] += 1
return hits / math.fsum(best)
print("restless lines: rate redrawn w.p. %.2f per period, T = %d"
% (SHIFT, T))
print("%-10s %6s %12s" % ("rule", "gamma", "share-oracle"))
for rule, gamma in (("greedy", 1.0), ("thompson", 1.0),
("thompson", 0.99), ("thompson", 0.97),
("thompson", 0.9), ("greedy", 0.97)):
rng = random.Random(5)
sc = [run(rule, gamma, 1000 + k, rng) for k in range(RUNS)]
print("%-10s %6.2f %12.4f" % (rule, gamma, math.fsum(sc) / RUNS))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多业务线算力与预算动态裁决、吉廷斯指数探索与收费站代购出版线周度配额母典》第 5 章「两种摩擦:换线成本要求滞后带,会变的市场要求记录褪色」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-264 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026264,
author = {Fan, Yafu},
title = {Dynamic Allocation of Compute and Budget across Business Lines: Gittins-Index Exploration and Weekly Quotas for Tollbooth, Buying and Publishing Lines},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}