https://github.com/datawhalechina/reasoning-kingdom
🌟 推理王国:关于 AI 推理机制的思想实验手册。从信息论、符号逻辑与表示学习出发,系统剖析大模型“智能”的本质。
https://github.com/datawhalechina/reasoning-kingdom
ai algorithm deep-learning llm machine-learning reasoning textbook
Last synced: 4 days ago
JSON representation
🌟 推理王国:关于 AI 推理机制的思想实验手册。从信息论、符号逻辑与表示学习出发,系统剖析大模型“智能”的本质。
- Host: GitHub
- URL: https://github.com/datawhalechina/reasoning-kingdom
- Owner: datawhalechina
- Created: 2026-03-30T04:53:47.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-05-14T08:31:07.000Z (2 months ago)
- Last Synced: 2026-05-14T10:35:09.838Z (2 months ago)
- Topics: ai, algorithm, deep-learning, llm, machine-learning, reasoning, textbook
- Homepage: https://datawhalechina.github.io/reasoning-kingdom/
- Size: 36 MB
- Stars: 75
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
推理王国 · 三部曲
[](https://deepwiki.com/datawhalechina/reasoning-kingdom)
[](https://github.com/datawhalechina/reasoning-kingdom/stargazers)
[](https://github.com/datawhalechina/reasoning-kingdom/issues)
[](https://github.com/datawhalechina/reasoning-kingdom/blob/main/LICENSE)
[](https://github.com/datawhalechina/reasoning-kingdom/actions/workflows/deploy.yml)
**推理王国**是一个完整的三部曲开源书籍项目,从入门到深入,全面探索推理科学的本质:
1. **前传**:《致未来的推理科学家》——面向青少年和业余读者的推理科学入门
2. **上卷**:《推理的历史演变》——从熵增到边界,沿历史线索追问推理的本质
3. **下卷**:《推理的形式演绎》——从形式系统出发,用逻辑演绎重建推理王国,最终在八条边界和不可能三角中收束
这不是 AI 工具书,也不是机器学习教程。它追问的是更底层的问题:推理是什么?它的边界在哪里?当 AI 在"推理",它内部发生了什么?
这些问题让图灵、哥德尔、香农彻夜难眠。本书试着把它们说清楚。
## 在线阅读
**完整三部曲**:https://datawhalechina.github.io/reasoning-kingdom
## Star History
## 三部曲架构
### 前传:《致未来的推理科学家》(面向初学者)
**兔狲教授的亲切提示**:这是一本面向青少年和业余读者的推理科学入门书。我们将从最简单的布尔逻辑出发,一步步探索算法、神经网络与推理的本质。跟随小小猪的好奇心和小海豹的历史感,一起实现**推理的民主化**——让推理科学真正属于每一个人。
**目标读者**:
- **青少年与业余爱好者**:对科学推理、算法思维和人工智能好奇的初学者
- **基础要求**:无需专业背景,只需好奇心和愿意"动手"尝试的精神
**本书将帮助你**:
- 建立算法思维框架:线性、贪心、启发式、动态规划四大思想模型
- 理解神经网络原理:从神经元到Transformer的完整认知
- 探索推理的本质:区分"概率预测"与"逻辑推理"
- 培养科学思考习惯:像科学家一样拆解复杂问题
**新增兔狲学院**:面向即将上大学的高中生(AP学生/准大学生)的维基百科式词条教学,包含数学基础综合、AI数学基础、微积分、线性代数、哲学、Python编程六个章节,每个词条包含官方解释+兔狲老师解释+动手题+动脑题。
### 上卷:《推理的历史演变》(问题驱动,直觉先行)
从对抗熵增的生存策略出发,沿历史脉络走过符号主义、表示学习、因果推断、复杂度理论,直到现代 Transformer 架构和推理边界。问题驱动,直觉先行。适合对 AI 有基本了解、想理解"为什么"的读者。
**前置知识**:基础线性代数、概率论、编程概念。
### 下卷:《推理的形式化重建》(逻辑演绎,地基夯实)
从形式系统的地基出发,严格重建推理的结构:命题逻辑、哥德尔不完备定理、线性逻辑、概率推断、因果演算、计算复杂度、PAC 学习、Kolmogorov 复杂度、Curry-Howard 对应、动力系统稳定性、范畴论,最终在第25章统一八条边界,提出推理的"不可能三角"。
目标风格是 Spivak 的《Calculus》和 Axler 的《Linear Algebra Done Right》:定义严格,但叙事把定义粘在一起。作者在场,有判断,有态度。
**前置知识**:真值表、证明的概念、函数与集合的基本语言、数学归纳法。详见[下卷导读](https://datawhalechina.github.io/reasoning-kingdom/volume2/preface/)。
### 兔狲教授小词典
除了三部曲,本书还提供了**兔狲教授小词典**——一个有态度的学术名词解释工具,旨在拆解学术黑话,让复杂概念可理解。
**词典立场**:推理民主化(推理应该被理解而不是被崇拜,技术应该为人服务而不是人为技术服务)
**词条结构**:每个词条包含官方解释(标准学术定义)、兔狲说(个人解读带立场)、为什么重要、延伸思考、相关词条
**覆盖范围**:163个核心概念,覆盖全书物理、信息、推理、AI、计算、逻辑等多个领域
---
> 这三部曲说的是同一件事:**推理如何从对抗熵增的生存策略,演变为受计算复杂度限制的算法过程,在形式系统中被严格重建,最终在自指边界前停下——八条边界共享同一深层结构,而我们必须在不确定中继续前行。**
---
## 目录
### 前传:《致未来的推理科学家》(18章 + 兔狲学院)
**全书共18章,分四部分**:确定性的宇宙(7章)→ 跨越逻辑的断裂带(2章)→ 神经网络的涌现(6章)→ 通往推理王国(3章)
| 章节名 | 简介 | 状态 |
| :--- | :--- | :--- |
| [前言](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/preface) | 推理科学民主化 | ✅ |
| **第一部分:确定性的宇宙** | **第1-7章** | **7章** |
| [第1章:电报、手电筒与逻辑的起点](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter1/) | 布尔逻辑:所有推理的起点 | ✅ |
| [第2章:当资源有了边界(复杂度)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter2/) | 时间与空间复杂度:推理的代价 | ✅ |
| [第3章:图灵的纸带(可计算性)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter3/) | 停机问题:划定推理的疆界 | ✅ |
| [第4章:线性的智慧(遍历与搜索)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter4/) | 线性思维:顺序处理的智慧 | ✅ |
| [第5章:贪心的诱惑(局部最优)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter5/) | 贪心思维:局部最优导致全局最优 | ✅ |
| [第6章:启发的艺术(近似与估测)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter6/) | 启发思维:聪明猜测的艺术 | ✅ |
| [第7章:记忆的力量(动态规划)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume1/chapter7/) | 记忆思维:有记忆的推理 | ✅ |
| **第二部分:跨越逻辑的断裂带** | **第8-9章** | **2章** |
| [第8章:规则的黄昏](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume2/chapter8/) | 传统算法在处理非结构化世界时的无力 | ✅ |
| [第9章:从离散到连续:数学的魔法棒](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume2/chapter9/) | 向量空间:从离散到连续的跃迁 | ✅ |
| **第三部分:神经网络的涌现** | **第10-15章** | **6章** |
| [第10章:最简单的感知(神经元)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter10/) | 权重与偏置:机器的"见识" | ✅ |
| [第11章:错误是进步的阶梯(反向传播)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter11/) | 梯度下降:学习的本质 | ✅ |
| [第12章:记忆的链条(LSTM与RNN)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter12/) | 时间序列处理:记忆单元的门控机制 | ✅ |
| [第13章:遗忘与因果的较量](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter13/) | LSTM渐进遗忘 vs 注意力因果关注 | ✅ |
| [第14章:注意力:在这个嘈杂的世界里,该看哪?](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter14/) | Attention机制:学会忽略的艺术 | ✅ |
| [第15章:编码-解码堆栈(Transformer)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume3/chapter15/) | Transformer:语言与逻辑的交汇点 | ✅ |
| **第四部分:通往推理王国(兔狲教授的书信集)** | **第16-18章** | **3章** |
| [第16章:什么是真正的推理?(LLM迷思)](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume4/chapter16/) | 区分"概率预测"与"逻辑推理" | ✅ |
| [第17章:推理科学家的工具箱](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume4/chapter17/) | 整合算法思维、神经网络思维与推理思维 | ✅ |
| [第18章:致20岁后的你:作为科学的推理](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/volume4/chapter18/) | 未来推理科学的研究方向与挑战 | ✅ |
| **兔狲学院:给还没有上大学的小伙伴** | **六个学科章节** | **6章** |
| [数学基础综合:从自然数到不动点理论](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/math-core/) | 7章完整知识链,从自然数、集合论、逻辑、函数、数列极限到ZFC和不动点理论 | ✅ |
| [AI数学基础:概率统计到线性模型](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/ai-mathematics/) | 5章完整知识链,概率论、统计学、优化理论、信息论、线性模型 | ✅ |
| [微积分:从函数到微分方程](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/calculus/) | 12个词条完整知识链,从函数讲到ODE | ✅ |
| [线性代数:从向量到雅可比矩阵](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/linear-algebra/) | 12个词条完整知识链,从向量讲到雅可比矩阵 | ✅ |
| [哲学:从古希腊到1840年](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/philosophy/) | 25个词条,5个历史时期,1840年批判视角 | ✅ |
| [Python编程:从语法到数据结构](https://datawhalechina.github.io/reasoning-kingdom/dear-reasoner/academy/python/) | 10个词条,4个部分,重点实现四种基础数据结构 | ✅ |
> **状态说明**:📝 编写中 | ✅ 已完成 | 🚧 修订中
### 上卷:《推理的历史演变》(13章 + 番外)
| 章节 | 核心问题 | 状态 |
| :---- | :---- | :----: |
| [导读](https://datawhalechina.github.io/reasoning-kingdom/preface) | 五个原创研究项目介绍,上下卷结构说明 | ✅ |
| [第1章:对抗熵增](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter1/) | 推理是生存策略,不是智识游戏 | ✅ |
| [第2章:符号的黎明](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter2/) | If-Then 规则的力量与天花板 | ✅ |
| [第3章:从符号到向量](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter3/) | Word2Vec:推理从规则走向几何 | ✅ |
| [第4章:流形假设](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter4/) | 高维数据的隐秩序 | ✅ |
| [第5章:拟合的陷阱](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter5/) | 统计相关性不是推理 | ✅ |
| [第6章:因果的边界](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter6/) | 观测数据永远不够 | ✅ |
| [第7章:复杂度的真相](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter7/) | P vs NP:不是快慢,是结构 | ✅ |
| [第8章:启发式的契约](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter8/) | 接受"差不多对"需要多少勇气 | ✅ |
| [第9章:Transformer](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter9/) | 注意力机制如何重构推理基础设施 | ✅ |
| ↳ [番外:注意力即因果](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter9/bonus) | 从因果外积重新推导注意力矩阵 | ✅ |
| [第10章:搜索的艺术](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter10/) | 在巨大推理空间中导航 | ✅ |
| [第11章:效能化推理](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter11/) | 推理的经济成本 | ✅ |
| [第12章:隐式推理](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter12/) | 神经网络的内部独白 | ✅ |
| [第13章:推理的边界](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter13/) | 哥德尔极限的计算版本 | ✅ |
| ↳ [番外:暗线](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapter13/bonus) | 上卷十三章的隐藏因果逻辑链 | ✅ |
| [因果推理番外:从理论到代码 -- 神经因果算子的实现](https://datawhalechina.github.io/reasoning-kingdom/volume1/chapterbonous/) | CocDo 神经因果算子——上卷理论的可运行实现 | ✅ |
### 下卷:《推理的形式化重建》(12章 + 附录)
| 章节 | 核心问题 | 状态 |
| :---- | :---- | :----: |
| [下卷导读](https://datawhalechina.github.io/reasoning-kingdom/volume2/preface/) | 前置知识、推荐读物、三个让直觉失效的反例 | ✅ |
| [第14章:形式系统](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter14/) | 在你能证明一件事之前,你得说清楚"证明"是什么 | ✅ |
| [第15章:一致性与完备性](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter15/) | 你能建造一个不说谎、又无所不知的系统吗? | ✅ |
| [第16章:线性逻辑与资源](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter16/) | 经典逻辑默认资源无限——这是一个代价高昂的谎言 | ✅ |
| [第17章:概率作为逻辑的扩张](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter17/) | 概率不是频率,是理性信念的唯一相容表示 | ✅ |
| [第18章:因果结构的形式化](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter18/) | 从数据里永远推不出因果——除非你愿意承认某些结构是假设 | ✅ |
| [第19章:复杂度作为推理的几何](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter19/) | P≠NP 不是关于机器速度的命题,是关于问题内在结构的命题 | ✅ |
| [第20章:启发式的形式合同](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter20/) | 可采纳性不是工程妥协,是数学承诺 | ✅ |
| [第21章:学习作为逆推断](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter21/) | 模型"学到了东西"的形式含义:它找到了更短的描述 | ✅ |
| [第22章:自指与涌现](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter22/) | Curry-Howard 对应告诉我们:证明即程序。那么,程序在证明什么? | ✅ |
| [第23章:推理系统的稳定性](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter23/) | 从永霖收敛推导李雅普诺夫函数:推理系统的能量函数如何从行为中浮现 | ✅ |
| [第24章:范畴论眼中的推理收敛](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter24/) | 用范畴论解释推理收敛的结构必然性:幽灵指针对应终结对象,伴随函子缺失导致元层断裂 | ✅ |
| [第25章:边界的统一](https://datawhalechina.github.io/reasoning-kingdom/volume2/chapter25/) | 全书集大成——八条边界统一与不可能三角,回到元问题:AI真的在推理吗? | ✅ |
| [附录:下卷思考题参考提示](https://datawhalechina.github.io/reasoning-kingdom/appendix-thinking-questions) | 下卷各章思考题的思考脚手架与关键点提示 | ✅ |
### 兔狲教授小词典
| 资源 | 描述 | 状态 |
| :---- | :---- | :----: |
| [兔狲教授小词典](https://datawhalechina.github.io/reasoning-kingdom/dictionary) | 163个核心概念的"官方解释+兔狲说"对比词典,拆解学术黑话,体现推理民主化立场 | ✅ |
**词典特点**:
- **词条结构**:官方解释(标准定义) + 兔狲说(个人解读带立场) + 为什么重要 + 延伸思考 + 相关词条
- **词条分类**:基础概念(45个)、核心理论(68个)、进阶思想(38个)、原创研究(12个)
- **核心立场**:推理应该被理解而不是被崇拜,技术应该为人服务而不是人为技术服务
- **覆盖范围**:全书25章核心概念,从熵、信息、贝叶斯到永霖公式、注意力因果拓扑、范畴论、不可能三角
## 贡献者
| 姓名 | 职责 | 简介 |
| :----| :---- | :---- |
| 李籽溪(兔狲) | 项目负责人/笔者 | 本书作者,创造了兔狲教授、小小猪、小海豹等角色。兔狲教授住在中山大学黑石屋,是一位温和的推理科学向导。致力于推理科学民主化,让算法与神经网络思维向所有人开放。 |
*注:前传通过兔狲教授(住在黑石屋)、小小猪、小海豹三人的对话互动,实现推理科学的民主化教学*
## 参与贡献
- 发现问题或有建议:[提 Issue](https://github.com/datawhalechina/reasoning-kingdom/issues)
- 想参与内容贡献:[提 Pull Request](https://github.com/datawhalechina/reasoning-kingdom/pulls)
- 联系 Datawhale 保姆团队跟进:[OP.md](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)
- 如果你对 Datawhale 很感兴趣并想要发起一个新的项目,请按照[Datawhale开源项目指南](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md)进行操作即可~
## 本地开发
本项目使用 [VitePress](https://vitepress.dev/) 构建静态网站。
**安装依赖**:
```bash
npm install
```
**开发服务器**:
```bash
npm run docs:dev
```
**构建生产版本**:
```bash
npm run docs:build
```
**预览构建结果**:
```bash
npm run docs:preview
```
## 关注我们
扫描下方二维码关注公众号:Datawhale
## LICENSE

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
*注:默认使用CC 4.0协议,也可根据自身项目情况选用其他协议*