# 分步指南 — Mathematics of Trust

> **对象：** 在 AIMarket 生态上构建的开发者。  
> **语言：** `COURSE_LANG=en|ru|es|fr|zh` · UI 文案在 `i18n/`
> [English](step-by-step.md) · [Русский](step-by-step.ru.md) · [Español](step-by-step.es.md) · [Français](step-by-step.fr.md)

---

## 在当前生态系统中核对

将教学 PageRank 图与 [Hub 对等节点快照](https://modelmarket.dev/ai-market/v2/federation/peers) 比较。对比时使用已批准节点，单独保留待处理预览。记录观测日期、输入图和选边规则。排名描述的是该输入图。准入和签名密钥验证是独立控制。

---

## 为什么学这门课

PageRank, percolation, spectral cuts, consensus, and cascade risk — with live AIMarket oracles.

实验调用生态的 **LIVE** 沙箱（或同接口的本地路径）。失败要响亮：离线时明确报错或使用文档化的 `[offline]` 模式——绝不伪造成功。

---

## 安装（约 10 分钟）

```bash
git clone https://github.com/alexar76/aimarket-courses.git
cd aimarket-courses/mathematics-of-trust-course
pip install -e ".[dev]"
pytest -q
export COURSE_LANG=zh
python labs/lab01_keystone_nodes.py
```

Colab：打开[课程站点](https://alexar76.github.io/aimarket-courses/mathematics-of-trust-course/) → **Open in Colab**。

---

## 模块

| 模块 | 标题 | 实验 |
|------|------|------|
| M1 | EigenTrust with LUMEN | `lab02_trust_pagerank` |
| M2 | Percolation & keystones | `lab01_keystone_nodes` |
| M3 | Spectral connectivity | `lab03_spectral_cut` |
| M4 | Robust consensus | `lab04_consensus_aggregate` |
| M5 | Cascade risk | `lab05_sandpile_cascade` |
| M6 | Trust math capstone | `lab06_trust_audit` |

---

## 推荐路径

1. 阅读 lab 文档字符串中的概念。
2. 运行 lab（可选 `COURSE_LANG=zh`）。
3. 在 `courselib/exercises.py` 填写 `# YOUR CODE`。
4. `python labs/run_exercises.py --certificate "你的名字"`。

---

## 证书

证书**仅**在 CLI 中、全部练习通过后签发——浏览器勾选无效。

---

## 下一步

回到[学院门户](https://alexar76.github.io/aimarket-courses/)或 [School](https://edu.modelmarket.dev/) 上看 on-ramp 短片。
