Files
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

44 lines
9.6 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 780 440" width="780" height="440" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333" /></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999" /></marker></defs>
<rect x="80" y="120" width="260" height="130" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2" />
<text x="210" y="135.72" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="19.84" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Agent (Nhà thám hiểm)</text>
<text x="210" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15.87" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="210" dy="155">Chiến lược π: Trạng thái</tspan><tspan x="210" dy="17.14">quan sát →</tspan></text>
<text x="210" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15.87" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="210" dy="189.28">Chọn hành động (di</tspan><tspan x="210" dy="17.14">chuyển/nhặt/tấn công)</tspan></text>
<text x="210" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="210" dy="222.49">ε-Tham lam: 90% tối ưu, 10% ngẫu</tspan><tspan x="210" dy="15">nhiên</tspan></text>
<rect x="440" y="120" width="260" height="130" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="570" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16.84" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold"><tspan x="570" dy="134.09">Môi trường (thế giới mê</tspan><tspan x="570" dy="18.19">cung)</tspan></text>
<text x="570" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.47" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="570" dy="168.64">Phòng 5 · chìa khóa/cửa/bảo</tspan><tspan x="570" dy="14.55">vệ</tspan></text>
<text x="570" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.47" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="570" dy="197.74">Chuyển: P (Phòng lưu trữ |</tspan><tspan x="570" dy="14.55">Hội trường, phía Đông) = 1.0</tspan></text>
<text x="570" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.78" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="570" dy="225.92">R (bảo vệ thất bại)=+50, R (di</tspan><tspan x="570" dy="12.72">chuyển)=0</tspan></text>
<line x1="342" y1="150" x2="438" y2="150" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<text x="390.0" y="136" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Hành động A(t) = "Di chuyển về phía đông"</text>
<line x1="438" y1="235" x2="342" y2="235" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<text x="390.0" y="253" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Trạng thái S(t+1) + Phần thưởng R(t+1)</text>
<text x="390" y="300" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Theo dõi: S(0), A(0), R(1), S(1), A(1), R(2), ...</text>
<rect x="35.0" y="340" width="134.0" height="70" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2" />
<text x="102.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="102" dy="351">S(0): Lối vào</tspan><tspan x="102" dy="12">sảnh</tspan></text>
<text x="102.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="102" dy="375">A(0): Hướng về</tspan><tspan x="102" dy="12">phía đông</tspan></text>
<text x="102.0" y="399" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">R(1): 0</text>
<line x1="171.0" y1="373" x2="181.0" y2="373" stroke="#999999" stroke-width="2" marker-end="url(#ah-light)" />
<rect x="179.0" y="340" width="134.0" height="70" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2" />
<text x="246.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="246" dy="351">S(1): Phòng chứa</tspan><tspan x="246" dy="12">đồ</tspan></text>
<text x="246.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="246" dy="375">A(1): Lấy chìa</tspan><tspan x="246" dy="12">khóa</tspan></text>
<text x="246.0" y="399" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">R(2): +5</text>
<line x1="315.0" y1="373" x2="325.0" y2="373" stroke="#999999" stroke-width="2" marker-end="url(#ah-light)" />
<rect x="323.0" y="340" width="134.0" height="70" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2" />
<text x="390.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="390" dy="352.5">S(2): Phòng chứa</tspan><tspan x="390" dy="15">đồ</tspan></text>
<text x="390.0" y="382.5" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">A(2): Hướng Bắc</text>
<text x="390.0" y="397.5" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">R(3): 0</text>
<line x1="459.0" y1="373" x2="469.0" y2="373" stroke="#999999" stroke-width="2" marker-end="url(#ah-light)" />
<rect x="467.0" y="340" width="134.0" height="70" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2" />
<text x="534.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="534" dy="351">S(3): Phòng bảo</tspan><tspan x="534" dy="12">vệ</tspan></text>
<text x="534.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="534" dy="375">A(3): Thanh kiếm</tspan><tspan x="534" dy="12">bạc tổng hợp</tspan></text>
<text x="534.0" y="399" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.11" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">R(4): +10</text>
<line x1="603.0" y1="373" x2="613.0" y2="373" stroke="#999999" stroke-width="2" marker-end="url(#ah-light)" />
<rect x="611.0" y="340" width="134.0" height="70" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2" />
<text x="678.0" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="678" dy="352.5">S(4): Phòng bảo</tspan><tspan x="678" dy="15">vệ</tspan></text>
<text x="678.0" y="382.5" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">A(4): Tấn công</text>
<text x="678.0" y="397.5" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.89" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">R(5): +50</text>
<text x="390" y="460" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Mục tiêu: Tối đa hóa phần thưởng tích lũy G = R(1) + γR(2) + γ²R(3) + ...(γ=0.99)</text>
</svg>