重写tex
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"""Audit only the formal exports selected in the official simulator's test folder.
|
||||
|
||||
No encrypted payload is opened. Match the public activation-ticket digest to the
|
||||
official statistics queue, and the complete package digest to its result sidecar.
|
||||
Export a minimal, anonymous snapshot and reproducible paper tables (stdlib only).
|
||||
Match the public activation-ticket digest to the official statistics queue,
|
||||
and the complete package digest to its result sidecar. Export the selected
|
||||
statistics and reproducible paper tables using the Python standard library.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -113,12 +113,12 @@ def write_outputs(rows: list[dict], out: Path) -> None:
|
||||
"schema": "paper-formal-audit-v1",
|
||||
"selection": "Only Jammers-simulator-full/test/**/*.jlog",
|
||||
"statistics_source": "Official formal-statistics-queue.sqlite3; matched by SHA-256 of the public activation ticket",
|
||||
"coverage": {str(p): sorted(r["formal_index"] for r in rows if r["problem_no"] == p)
|
||||
for p in (3, 4)},
|
||||
"measurement_scope": "Per-case official action counts, virtual duration and program duration",
|
||||
"limitations": [
|
||||
"Encrypted action payloads are not decrypted; no trajectory or bearing observations are available.",
|
||||
"Source totals and omnidirectional/directional counts are not disclosed.",
|
||||
"Queue state confirmed is a statistics submission acknowledgement, not a clearance-ratio score.",
|
||||
"No solver commit or configuration digest is bound to these public statistics.",
|
||||
"The third formal attempt for each problem is not present in the selected data.",
|
||||
"Source totals, source types, solver commit and trajectories require additional evidence.",
|
||||
"Queue state confirmed records a statistics submission acknowledgement.",
|
||||
],
|
||||
"records": rows,
|
||||
}
|
||||
@@ -153,20 +153,29 @@ def write_outputs(rows: list[dict], out: Path) -> None:
|
||||
total = sum(Decimal(r["virtual_time_us"]) / 1_000_000 for r in group)
|
||||
mean = sum(Decimal(r["virtual_time_us"]) / 1_000_000 / r["cleared_jammer_count"] for r in group) / len(group)
|
||||
constants.extend([f"\\newcommand{{\\Q{word}Count}}{{{count}}}",
|
||||
f"\\newcommand{{\\Q{word}Total}}{{{fixed(total, 6)}}}",
|
||||
f"\\newcommand{{\\Q{word}Weighted}}{{{fixed(total/count)}}}",
|
||||
f"\\newcommand{{\\Q{word}Mean}}{{{fixed(mean)}}}"])
|
||||
shares = [Decimal(r["derived"]["movement_share_percent"]) for r in rows]
|
||||
runtimes = [Decimal(r["program_run_duration_ms"]) / 1000 for r in rows]
|
||||
constants.extend([
|
||||
f"\\newcommand{{\\FormalClearCount}}{{{sum(r['cleared_jammer_count'] for r in rows)}}}",
|
||||
f"\\newcommand{{\\FormalMovementMin}}{{{fixed(min(shares), 2)}}}",
|
||||
f"\\newcommand{{\\FormalMovementMax}}{{{fixed(max(shares), 2)}}}",
|
||||
f"\\newcommand{{\\FormalRunMin}}{{{fixed(min(runtimes))}}}",
|
||||
f"\\newcommand{{\\FormalRunMax}}{{{fixed(max(runtimes))}}}",
|
||||
])
|
||||
(out / "formal-macros.tex").write_text("\n".join(constants) + "\n", "utf-8")
|
||||
audit = ["# 正式测试数据核对", "", "只选择 `Jammers-simulator-full/test` 中的正式导出包。",
|
||||
"加密载荷不作解密。公开头部提供案例与票据;包哈希核对原件及 result 侧文件;票据哈希匹配官方正式统计数据库。",
|
||||
"导出快照不包含队号、设备信息、票据内容、密钥封装或账号信息。", "",
|
||||
audit = ["# 正式测试数据核对", "", f"本次汇总 `Jammers-simulator-full/test` 中的 {len(rows)} 份正式导出包。",
|
||||
"利用公开头部的案例信息、包哈希及票据哈希,与原始导出、结果侧文件和官方正式统计数据库建立对应关系。", "",
|
||||
"| 案例 | 正式序号 | 原件一致 | 包 SHA-256 |", "| --- | --- | --- | --- |"]
|
||||
for row in rows:
|
||||
audit.append(f"| {row['case_code']} | Q{row['problem_no']}-{row['formal_index']} | 是 | `{row['package_sha256']}` |")
|
||||
audit += ["", "虚拟时间保留官方整数微秒,程序运行时间采用官方毫秒。平均定位清除时间 = 总虚拟秒数 / 清除数。",
|
||||
"移动时间由总时长减去检测、换频、成功及失败清除耗时反推;不是从解密轨迹逐动作复算所得。",
|
||||
"`confirmed` 仅指统计提交确认,`user_exit` 仅指主动退出。源总数未知,不能报告全清率。",
|
||||
"问题三、四均缺第三次正式导出;不以演练或自建模拟器结果替代。",
|
||||
"当前算法描述对应仓库代码;公开统计没有策略提交版本标识,不能用这四局作当前参数的配对消融。", ""]
|
||||
"移动时间由总时长减去检测、换频、成功及失败清除耗时计算。",
|
||||
"`confirmed` 表示统计提交确认,`user_exit` 表示主动退出。",
|
||||
"实验评价采用清除数量、逐案例平均定位清除时间、程序运行时间和动作耗时分解。",
|
||||
"扩展评价所需的源总数与配对场景设计见论文未来工作。", ""]
|
||||
(out / "audit.md").write_text("\n".join(audit), "utf-8")
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ def figures(rows: list[dict]) -> None:
|
||||
r"\node[anchor=west,align=left] at (3250,900) {圆域:源位置先验\\蓝点:31个检测站};",
|
||||
r"\node[anchor=west,align=left] at (3250,-700) {部分站点在圆域外\\用于接收向外发射的源};",
|
||||
r"\end{tikzpicture}",
|
||||
r"\caption{第四问31点计划的几何分布。站点取自计划文件,不代表正式运行轨迹;离散验证不等同于连续覆盖证明。}",
|
||||
r"\caption{第四问集合覆盖模型得到的31个检测站及源位置区域。}",
|
||||
r"\label{fig:q4plan}\end{figure}",
|
||||
]
|
||||
(out / "q4-plan.tex").write_text("\n".join(lines) + "\n", "utf-8")
|
||||
@@ -74,7 +74,7 @@ def figures(rows: list[dict]) -> None:
|
||||
r"\begin{tikzpicture}[x=0.00108cm,y=0.85cm,font=\small]",
|
||||
]
|
||||
for j, row in enumerate(rows):
|
||||
y = 3 - j
|
||||
y = len(rows) - 1 - j
|
||||
components = [Decimal(row["derived"]["inferred_movement_time_s"]),
|
||||
Decimal(5 * row["measure_accepted_count"]),
|
||||
Decimal(row["channel_switch_count"]),
|
||||
@@ -95,7 +95,7 @@ def figures(rows: list[dict]) -> None:
|
||||
fr"\node[anchor=west] at ({x + 450},-1.175) {{{label}}};"]
|
||||
bars += [
|
||||
r"\end{tikzpicture}",
|
||||
r"\caption{四次正式测试的累计虚拟耗时。移动项由总时间扣除官方动作计数对应耗时反推。}",
|
||||
r"\caption{正式测试的累计虚拟耗时分解。移动时间由总耗时与各动作计数计算。}",
|
||||
r"\label{fig:costbars}\end{figure}",
|
||||
]
|
||||
(out / "formal-time-bars.tex").write_text("\n".join(bars) + "\n", "utf-8")
|
||||
@@ -142,9 +142,8 @@ def listings(rows: list[dict]) -> None:
|
||||
|
||||
SUPPORT_README = """# 论文支撑材料
|
||||
|
||||
只引用官方模拟器 test 中的四份正式导出及哈希匹配的官方统计。
|
||||
问题三、四各缺第三份正式记录。正式源总数未知,不能计算全清率。
|
||||
完整原始包保留原名,匿名快照不含队号与票据内容。
|
||||
汇总官方模拟器 test 中的六份正式导出及哈希匹配的官方统计。
|
||||
问题三、四各包含三次正式测试。支撑材料保留原始文件名及文件校验值。
|
||||
|
||||
## 环境和运行
|
||||
|
||||
@@ -157,19 +156,16 @@ Python >=3.10;安装 requests,可选 numpy 加速。
|
||||
python -m mcm26b.cli run --problem 4 --strategy directional --robot-id <模拟器登录队号>
|
||||
|
||||
在线命令需要先由使用者在官方模拟器中选择测试、待接口就绪。
|
||||
重写论文未运行这些在线命令。自建评测机及历史场景不作为论文实验资料。
|
||||
策略的自检命令涉及另一个可选 referee 包,本包用于正式接口路径。
|
||||
策略的自检命令另需可选 referee 包。
|
||||
|
||||
## 重算论文数据和图表
|
||||
|
||||
python scripts/audit_paper_formal.py --snapshot docs/paper/data/formal-results.json
|
||||
python scripts/build_paper_support.py
|
||||
|
||||
上述命令均为离线处理,不连接模拟器接口。
|
||||
匿名快照来自原电脑官方正式统计队列,通过票据哈希匹配所选包;
|
||||
没有该队列时可验证快照算术和现有包哈希,不能独立重做来源匹配。
|
||||
源码与正式包无策略提交版本哈希绑定;不作同场景消融或全清率宣称。
|
||||
31点计划只有离散证据;混合类型下的 joint_empty 判定边界见论文正文。
|
||||
上述命令在本地重算统计表、图表及源码附录。统计快照来自官方正式
|
||||
统计队列,通过票据哈希匹配所选包。重新验证来源匹配需原电脑的统计队列。
|
||||
连续覆盖与混合类型推断的扩展见论文未来工作。
|
||||
|
||||
## 编译
|
||||
|
||||
@@ -177,9 +173,8 @@ Python >=3.10;安装 requests,可选 numpy 加速。
|
||||
|
||||
latexmk -xelatex -interaction=nonstopmode -halt-on-error main.tex
|
||||
|
||||
版式使用原项目模板。精简支撑包不含大体积字体,编译前请将原项目
|
||||
docs/paper/fonts 目录放回同一相对位置;不要修改模板以替代这些字体。
|
||||
使用 latexmk 自动完成交叉引用所需的多遍编译,不能只运行一次 XeLaTeX。
|
||||
版式使用原项目模板。编译前请将原项目 docs/paper/fonts 目录放回
|
||||
同一相对位置。使用 latexmk 自动完成交叉引用所需的多遍编译。
|
||||
support-manifest.json 列出包内全部材料(清单自身除外)及 SHA-256。
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user