关于「贝叶斯搜索:往哪里找,没找到又说明了什么」,《贝叶斯搜索与最优停止》给出的定量结论是什么?

结论:搜索论把「往哪里找」写成先验、发现函数与贝叶斯更新三个要素;下一次搜索的贪婪规则是选后验概率与发现概率乘积最大的地方。没有发现也是信息,它把概率从容易搜的地方推向难搜的地方。在示意的网格中,按乘积搜索比只看概率或由近及远扫过更快。「天蝎号」与法航 447 的经验说明,好的先验与诚实的发现概率是关键;法航 447 一例尤其说明,对过去搜索效果的假设本身需要放进模型里更新。觅食生态学的边际价值定理把「何时离开一个斑块」写成边际收获率降到平均收获率时停止;「列维飞行最优」则只在目标稀疏、可重复访问等条件下成立,动物是否真的这样搜索仍有争议。下一章讨论另一种搜索:在几个收益不确定的选项之间分配有限的尝试。

数据口径:本书是教学与研究用的数学模型,不是投资、创业、职业或人力资源建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(17 段程序,全部核对)、原典与作者的假说。

English version

对照数据表

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

prior: 197 cells possible; top 10 hold 0.119, top 50 hold 0.473
P(found by day t)t=1t=5t=10t=20t=40mean days
A largest p x d0.0880.3110.4840.6940.89217.5
B largest p0.0670.2870.4590.6720.88818.3
C sweep0.0710.2620.4510.6650.85021.3
plan A, no success: rough-cell mass after 0/1/5/20 days: 0.349 0.382 0.465 0.559
top cell after 1/5/20 days: (11, 8) 0.0139, (12, 9) 0.0158, (10, 7) 0.0136

核心公式

\[p_c' = \frac{p_c(1-d_c)}{1-p_c d_c}, \qquad p_k' = \frac{p_k}{1-p_c d_c}\quad (k \ne c).\]
查看完整验算程序
# Bayesian search, invented 20 x 20 sea area, 10 looks a day; prior and detection
# probabilities as in the text. Plans: (A) largest p_c d_c; (B) largest p_c; (C) sweep.
import math

N, LKP, DRIFT, LOOKS = 20, (8, 10), (12, 7), 10
CELLS = [(x, y) for x in range(N) for y in range(N)]

def prior():
    inside = [c for c in CELLS if math.dist(c, LKP) <= 8]
    p = {c: 0.0 for c in CELLS}
    for w, m, s in ((0.35, LKP, None), (0.35, LKP, 3.0), (0.30, DRIFT, 2.5)):
        part = {c: 1.0 if s is None else math.exp(-math.dist(c, m) ** 2 / (2 * s * s))
                for c in inside}
        tot = sum(part.values())
        for c, v in part.items():
            p[c] += w * v / tot
    return p

def detect(c):
    return 0.4 if c[0] >= 13 or abs(c[0] - c[1] - 2) <= 1 else 0.8

def update(p, c):                     # unsuccessful look at c (Bayes's rule)
    miss = 1 - p[c] * detect(c)
    for k in p:
        p[k] /= miss
    p[c] *= 1 - detect(c)
    return miss

def run(plan, days):
    p, found, curve, snaps, k = prior(), 0.0, [], {}, 0
    sweep = sorted((c for c in CELLS if math.dist(c, LKP) <= 8),
                   key=lambda c: (math.dist(c, LKP), c))
    for day in range(1, days + 1):
        for _ in range(LOOKS):
            if plan == "A":
                c = max(CELLS, key=lambda c: p[c] * detect(c))
            elif plan == "B":
                c = max(CELLS, key=lambda c: p[c])
            else:
                c = sweep[k % len(sweep)]; k += 1
            found += (1 - found) * (1 - update(p, c))
        curve.append(found)
        if day in (1, 5, 20):
            snaps[day] = dict(p)
    return curve, snaps

if __name__ == "__main__":
    p0 = prior(); top = sorted(p0.values(), reverse=True)
    print(f"prior: {sum(v > 0 for v in p0.values())} cells possible;"
          f" top 10 hold {sum(top[:10]):.3f}, top 50 hold {sum(top[:50]):.3f}")
    print("P(found by day t)            t=1     t=5    t=10    t=20    t=40   mean days")
    for plan, name in (("A", "A largest p x d"), ("B", "B largest p"), ("C", "C sweep")):
        curve, _ = run(plan, 120)
        cols = "".join(f"  {curve[t - 1]:.3f}" for t in (1, 5, 10, 20, 40))
        print(f"   {name:25s}{cols}   {sum(1 - f for f in curve) + 1:6.1f}")
    snaps = run("A", 20)[1]
    rough = lambda p: sum(v for k, v in p.items() if detect(k) < 0.5)
    print("plan A, no success: rough-cell mass after 0/1/5/20 days: " + " ".join(
        f"{rough(p):.3f}" for p in (p0, *snaps.values())))
    tops = [(max(CELLS, key=lambda c: p[c]), max(p.values())) for p in snaps.values()]
    print("   top cell after 1/5/20 days: " + ", ".join(f"{c} {v:.4f}" for c, v in tops))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《未知地形中的贝叶斯搜索、秘书问题与吉廷斯指数》第 3 章「贝叶斯搜索:往哪里找,没找到又说明了什么」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23810102

DOI: 10.5281/zenodo.23810102 · 阅读本章所在专著 · 5DL-B-042 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026042,
  author    = {Fan, Yafu},
  title     = {Bayesian Search in Unknown Landscapes, Optimal Stopping and Gittins Indices},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23810102},
  url       = {https://doi.org/10.5281/zenodo.23810102}
}

本书其他章节结论