Compare commits
28 Commits
0c2c19945e
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 18d0f3700a | |||
| c85bbd3c55 | |||
| 979b5128dc | |||
| 58a85162a6 | |||
| 55583968d9 | |||
| 90ea912298 | |||
| 73d56693cf | |||
| b8aee456b2 | |||
| 60ebdb7077 | |||
| a4c26f0e08 | |||
| a1b7ae7712 | |||
| 1f21ff9c8a | |||
| f2715cbac1 | |||
| 5a552cb41c | |||
| 6e4472954e | |||
| 2997b460be | |||
| ec70447106 | |||
| 5eff99a876 | |||
| d489c968e3 | |||
| 2dd5138da3 | |||
| 2305ae0ba6 | |||
| 89c038b1c4 | |||
| c55f956656 | |||
| 491ba89892 | |||
| fa7d851bac | |||
| c9d2ce8a69 | |||
| acfcca58f5 | |||
| d4665a362e |
+5
-1
@@ -31,4 +31,8 @@ output/
|
||||
*.blg
|
||||
*.synctex.gz
|
||||
*.pdf
|
||||
officefile/latex/figures/
|
||||
|
||||
# 第三方软件
|
||||
.prism/
|
||||
.claudeprism/
|
||||
.agents/
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"path": "../2026_WritingAgent"
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
# AGENTS.md
|
||||
|
||||
This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is **设计人工智能:基础与应用** — a textbook project for design AI education. The book covers AI fundamentals (principles, perception, generation, agents) and their applications across design domains (digital media, industrial design, environmental design, urban planning).
|
||||
|
||||
A supplementary volume, **CC4SI (Codex for Spatial Intelligence)**, is preserved in `officefile/supplements/` and focuses on spatial intelligence and autonomous design using Codex.
|
||||
|
||||
**Key Characteristics:**
|
||||
- Educational content organized as a book with 12 chapters + 9 appendices
|
||||
- Mixed Chinese/English documentation and code
|
||||
- Git-based workflow with Obsidian integration for content editing
|
||||
- Pandoc-based export to Word (DOCX) with publisher template
|
||||
- Standard research project directory structure
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
2026_DesignAI/
|
||||
├── data/ # Data and resources
|
||||
│ ├── pics/ # Book illustrations
|
||||
│ └── references/ # Bibliography data
|
||||
├── dofile/ # Code and scripts
|
||||
│ └── examples/ # Python code examples
|
||||
│ ├── 00-introduction/ # Setup first assistant
|
||||
│ ├── 01-foundations/ # State machines, modularity, etc.
|
||||
│ └── 02-spatial-intelligence/ # Spatial analysis examples
|
||||
├── officefile/ # Main book content
|
||||
│ ├── 00-frontmatter/ # 自序 (Preface), 目录 (TOC)
|
||||
│ ├── 01-introduction/ # Ch1: AI development history
|
||||
│ ├── 02-framework/ # Ch2: AI theoretical framework
|
||||
│ ├── 03-1d-sequence/ # Ch3: Sequence & text (RNN→LLM)
|
||||
│ ├── 04-2d-vision/ # Ch4: Images & vision (CNN)
|
||||
│ ├── 05-3d-spatial/ # Ch5: Spatial & 3D (PointNet)
|
||||
│ ├── 06-reinforcement/ # Ch6: Reinforcement learning
|
||||
│ ├── 07-generative-ai/ # Ch7: Generative AI (Diffusion)
|
||||
│ ├── 08-agent/ # Ch8: AI Agent
|
||||
│ ├── 09-digital-media/ # Ch9: Digital media design
|
||||
│ ├── 10-industrial-design/ # Ch10: Industrial design
|
||||
│ ├── 11-environmental-landscape/ # Ch11: Environmental & landscape
|
||||
│ ├── 12-urban-ecology/ # Ch12: Urban & ecological planning
|
||||
│ ├── appendix/ # Appendices 1-9
|
||||
│ └── supplements/ # CC4SI supplementary material
|
||||
│ ├── 00-05/ # Spatial intelligence chapters
|
||||
│ └── appendix/ # Academic writing workflow
|
||||
├── output/ # Generated outputs
|
||||
│ └── docx/ # Word exports
|
||||
├── Archive/ # Archived original directories
|
||||
├── .Codex/skills/markdown-to-docx/ # DOCX conversion skill
|
||||
├── .pandoc/ # Pandoc config (CSL, Zotero JSON)
|
||||
└── .obsidian/ # Obsidian vault configuration
|
||||
```
|
||||
|
||||
## Book Structure
|
||||
|
||||
### Upper Volume: Principles & Technology
|
||||
|
||||
| Chapter | Topic | Lines | Status |
|
||||
|---------|-------|-------|--------|
|
||||
| 01 | AI development history & paradigm evolution | 367 | Complete |
|
||||
| 02 | Theoretical framework (functional perspective, MLP) | 897 | Complete |
|
||||
| 03 | 1D data: Sequence & text (RNN → LLM) | 1595 | Complete |
|
||||
| 04 | 2D data: Images & vision (CNN → ViT) | 867 | Complete |
|
||||
| 05 | 3D data: Spatial & 3D (PointNet → Spatial AI) | 1421 | Complete |
|
||||
| 06 | Generative AI (VAE/GAN → Diffusion) | 496 | Complete |
|
||||
| 07 | AI Agent (rules → LLM Agent) | 581 | Complete |
|
||||
| 08 | Reinforcement learning (Q-Learning → RLHF) | 896 | Complete |
|
||||
|
||||
### Lower Volume: Design Applications
|
||||
|
||||
| Chapter | Topic | Lines | Status |
|
||||
|---------|-------|-------|--------|
|
||||
| 09 | Digital media design | 161 | Thin |
|
||||
| 10 | Industrial & product design | 145 | Thin |
|
||||
| 11 | Environmental & landscape design | 153 | Thin |
|
||||
| 12 | Urban & ecological planning | 317 | Moderate |
|
||||
|
||||
### Appendices
|
||||
|
||||
9 appendices covering programming basics, Vibe Coding, academic writing, web tools, references, glossary, and tips.
|
||||
|
||||
## Working with This Repository
|
||||
|
||||
### For Content Editing
|
||||
- Edit `.md` files in `officefile/` — they are the book source
|
||||
- Use Obsidian for rich editing (vault at project root)
|
||||
- Git commits follow conventional format: `docs(ch01): description`
|
||||
|
||||
### For DOCX Export
|
||||
- Use the `markdown-to-docx` skill in `.Codex/skills/`
|
||||
- Publisher template: `machinery-industry-press-writing-template.dotx`
|
||||
- Output goes to `output/docx/`
|
||||
|
||||
### For Python Examples
|
||||
- Examples in `dofile/examples/` are self-contained
|
||||
- Run directly: `python dofile/examples/01-foundations/state_machine.py`
|
||||
- No global test suite — verify examples individually
|
||||
|
||||
## Language Considerations
|
||||
|
||||
- **Documentation**: Primarily Chinese with English technical terms
|
||||
- **Code**: Variable names and comments in English
|
||||
- **File names**: Mix of Chinese and English — use proper encoding
|
||||
|
||||
## Commit Convention
|
||||
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
Types: feat, fix, docs, style, refactor, chore
|
||||
Scopes: ch01-ch12, appendix, supplements, examples
|
||||
|
||||
Examples:
|
||||
- docs(ch03): 补充 Transformer 注意力机制详解
|
||||
- feat(examples): 新增空间推理示例
|
||||
- fix(ch05): 修正 PointNet 结构描述
|
||||
```
|
||||
@@ -1,20 +1,50 @@
|
||||
@book{EJUUCH39,
|
||||
title = {All the Math You Missed: But Need to Know for Graduate School},
|
||||
author = {Thomas A. Garrity},
|
||||
title = {All the Math You Missed 2nd Edition},
|
||||
author = {{Thomas A. Garrity}},
|
||||
edition = {2},
|
||||
year = {2017},
|
||||
publisher = {Cambridge University Press},
|
||||
langid = {english}
|
||||
url = {https://www.cambridge.org/universitypress/subjects/mathematics/recreational-mathematics/all-math-you-missed-need-know-graduate-school-2nd-edition},
|
||||
urldate = {2026-05-29},
|
||||
langid = {gb},
|
||||
file = {F\:\\Zotero\\storage\\QZZ9ML74\\thomas-a.-garrity-all-the-math-you-missed-2nd-ed.pdf;F\:\\Zotero\\storage\\85NY3EYQ\\all-math-you-missed-need-know-graduate-school-2nd-edition.html}
|
||||
}
|
||||
|
||||
@book{MGDW8DPN,
|
||||
title = {人工智能:计算agent基础},
|
||||
author = {David L. Poole and Alan K. Mackworth},
|
||||
translator = {董红斌 and 董兴业 and 童向荣 and 汪廷华},
|
||||
year = {2015},
|
||||
author = {{普尔} and {麦克沃思}},
|
||||
translator = {{董红斌} and {董兴业} and {童向荣} and {汪廷华}},
|
||||
namea = {{David L.Poole} and {Alan K.Mackworth}},
|
||||
nameatype = {collaborator},
|
||||
date = {2015-01-01},
|
||||
series = {计算机科学丛书},
|
||||
publisher = {机械工业出版社},
|
||||
url = {https://book.douban.com/subject/26319332/},
|
||||
urldate = {2026-05-26},
|
||||
abstract = {《人工智能:计算agent基础》讨论AI科学,它将AI作为智能计算Agent设计的研究课题。《人工智能:计算agent基础》虽然设计为教科书,但它也适合广大专业人员和研究人员阅读。《人工智能:计算agent基础》的一个重要特色是其在线学习资源。在过去的几十年里,人工智能是作为一种严肃科学和工程学科出现的。《人工智能:计算agent基础》提供了针对本科生和研究生的第一手便利可用的领域综合资料,对当今该领域的基础发展进行了展望。像任何名副其实的科学一样,AI具有条理分明、形式化的理论和难以控制的实验。《人工智能:计算agent基础》均衡了理论和实验部分,并说明了如何将理论与实验密切地联系起来,使科学与工程应用共同发展。},
|
||||
isbn = {978-7-111-48457-8},
|
||||
langid = {chinese},
|
||||
origtitle = {Artificial Intelligence: Foundations of Computational Agents}
|
||||
origtitle = {Artificial Intelligence Foundations of Computational Agents},
|
||||
pagetotal = {452},
|
||||
annotation = {price: 79.00\\
|
||||
comments: 3\\
|
||||
creatorsExt: [\{"firstName":"","lastName":"普尔","creatorType":"author","fieldMode":1,"country":"加","original":"David L.Poole"\},\{"firstName":"","lastName":"麦克沃思","creatorType":"author","fieldMode":1,"country":"加","original":"Alan K.Mackworth"\},\{"firstName":"","lastName":"董红斌","creatorType":"translator","fieldMode":1,"country":"","original":""\},\{"firstName":"","lastName":"董兴业","creatorType":"translator","fieldMode":1,"country":"","original":""\},\{"firstName":"","lastName":"童向荣","creatorType":"translator","fieldMode":1,"country":"","original":""\},\{"firstName":"","lastName":"汪廷华","creatorType":"translator","fieldMode":1,"country":"","original":""\}]}
|
||||
}
|
||||
|
||||
@book{RP2EHXXB,
|
||||
title = {UNIX编程艺术},
|
||||
author = {Raymond, Eric S.},
|
||||
translator = {{姜宏} and {何源} and {蔡晓俊}},
|
||||
date = {2011-01},
|
||||
series = {博文视点·传世经典书丛},
|
||||
publisher = {电子工业出版社},
|
||||
url = {https://book.douban.com/subject/5387401/},
|
||||
urldate = {2026-06-04},
|
||||
abstract = {本书主要介绍了Unix系统领域中的设计和开发哲学、思想文化体系、原则与经验,由公认的Unix编程大师、开源运动领袖人物之一Eric S. Raymond倾力多年写作而成。包括Unix设计者在内的多位领域专家也为本书贡献了宝贵的内容。本书内容涉及社群文化、软件开发设计与实现,覆盖面广、内容深邃,完全展现了作者极其深厚的经验积累和领域智慧。},
|
||||
isbn = {978-7-121-12329-0},
|
||||
langid = {chinese},
|
||||
origtitle = {The Art of UNIX Programming},
|
||||
pagetotal = {530},
|
||||
annotation = {price: 69.00元\\
|
||||
rating: 8.8\\
|
||||
ratingPeople: 334人评价\\
|
||||
comments: 117}
|
||||
}
|
||||
|
||||
@@ -494,6 +494,47 @@ train\_model(100, optimizer="SGD", lr=0.1)
|
||||
|
||||
导入模块
|
||||
|
||||
Python 通过\textbf{模块}(module)和\textbf{包}(package)组织代码复用:一个 \texttt{.py} 文件就是一个模块,含有 \texttt{\_\_init\_\_.py} 的文件夹就是一个包,使用 \texttt{from 包.包.模块 import 函数/类} 的语法导入。
|
||||
|
||||
以本书生态安全格局项目中的 \texttt{esp\_engine/} 为例:
|
||||
|
||||
\begin{verbatim}
|
||||
esp_engine/
|
||||
├── data_manager.py ← 模块(1个文件,7个函数)
|
||||
├── io/ ← 包(文件夹,2个模块)
|
||||
│ ├── __init__.py
|
||||
│ ├── raster_io.py ← 7个函数
|
||||
│ └── vector_io.py ← 5个函数
|
||||
├── steps/ ← 包(文件夹,10个模块)
|
||||
│ ├── __init__.py
|
||||
│ ├── reclassify.py
|
||||
│ ├── cost_distance.py
|
||||
│ └── ...(8个文件)
|
||||
└── workflows/ ← 包(文件夹,6个模块)
|
||||
├── __init__.py
|
||||
├── suitability.py
|
||||
└── ...(5个文件)
|
||||
\end{verbatim}
|
||||
|
||||
何时用模块、何时用包?原则很简单——看体量(表\ref{tab:module-vs-package})。
|
||||
|
||||
\begin{table}[htbp]
|
||||
\centering
|
||||
\caption{模块与包的选择原则}
|
||||
\label{tab:module-vs-package}
|
||||
\begin{tabular}{@{} l l l @{}}
|
||||
\toprule
|
||||
\textbf{情况} & \textbf{做法} & \textbf{项目中的例子} \\
|
||||
\midrule
|
||||
功能集中,一个文件装得下 & 模块(单个 .py) & data\_manager.py:7个函数全是数据预处理 \\[3pt]
|
||||
功能分多个领域,各有独立逻辑 & 包(文件夹+子模块) & steps/:10个文件,每个是一种 GIS 操作 \\[3pt]
|
||||
拿捏不准 & 先做模块,膨胀了再拆 & — \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
一句话:\textbf{模块是``够用就好的最小单位'',包是``需要分家时的组织方式''}。
|
||||
|
||||
\emph{\# 导入标准库}
|
||||
|
||||
\textbf{import} os
|
||||
|
||||
@@ -5,108 +5,81 @@ Code、Markdown/Obsidian、Git/GitHub等核心工具的使用方法。
|
||||
|
||||
\section{Vibe Coding的概念与工具}
|
||||
|
||||
\subsubsection{什么是Vibe Coding}
|
||||
\subsection{\greenheading{什么是Vibe Coding}}
|
||||
|
||||
传统编程:\textbf{明确需求 → 设计算法 → 编写代码}
|
||||
传统编程遵循``明确需求 → 设计算法 → 编写代码''的线性流程,而 Vibe Coding 则转变为``\textbf{模糊想法 → AI辅助 → 迭代完善}''。这是一种以AI为核心的编程新模式:开发者用自然语言描述意图,AI生成代码,再通过迭代对话逐步完善。对于编程经验较少的设计专业读者而言,这种模式大幅降低了技术门槛——不需要记住语法细节,只需要清楚地表达”想要什么”。
|
||||
|
||||
Vibe Coding:\textbf{模糊想法 → AI辅助 → 迭代完善}
|
||||
然而,编程技术门槛的降低并不意味着对原理理解的放松。《Unix编程艺术》\cite{RP2EHXXB}中提出了一条经典原则——``机制,而非策略''(Mechanism, not policy):好的系统应当提供稳定、通用的底层能力(机制),而将具体的使用方式和决策(策略)交给使用者。在 Vibe Coding 中,这一关系发生了有趣的反转:AI 承担的恰恰是``策略''的角色——它根据开发者的意图,自主选择实现方案、生成具体代码、决定技术路线;而开发者则必须掌握``机制''——理解算法原理、架构模式和调试方法——才能判断 AI 的策略是否正确。这意味着,Vibe Coding 对开发者的要求从``会写代码''转向了``会判断代码'':你需要理解架构原理才能审查AI的方案,需要掌握调试方法才能发现AI的错误,需要对领域知识有足够认知才能提出正确的问题。换言之,\textbf{AI 降低了编程的执行门槛,却提高了对思维门槛的要求}。
|
||||
|
||||
Vibe
|
||||
Coding是一种以AI为核心的编程新模式:开发者用自然语言描述意图,AI生成代码,再通过迭代对话逐步完善。对于编程经验较少的设计专业读者而言,这种模式大幅降低了技术门槛——不需要记住语法细节,只需要清楚地表达“想要什么”。
|
||||
\subsection{工作流程}
|
||||
|
||||
\subsubsection{工作流程}
|
||||
Vibe Coding 的基本流程是:\textbf{描述意图}→AI生成代码→运行测试→迭代优化→理解学习。例如,先让AI"创建一个图像分类模型",运行后发现问题,再逐步调整——"把隐藏层改成128个神经元"——最终阅读并理解AI生成的代码。简单任务可直接通过对话完成;面对较复杂的项目,推荐采用更结构化的四阶段工作流——\textbf{Explore-Plan-Code-Commit}(EPCC,表\ref{tab:epcc}),将 Vibe Coding 从"随意迭代"提升为"有章法的 AI 协作"。
|
||||
|
||||
\begin{table}[htbp]
|
||||
\centering
|
||||
\caption{Explore-Plan-Code-Commit 工作流四阶段}
|
||||
\label{tab:epcc}
|
||||
\begin{tabular}{@{} l l p{3.5cm} p{5.5cm} @{}}
|
||||
\toprule
|
||||
\textbf{阶段} & \textbf{英文} & \textbf{目的} & \textbf{典型操作} \\
|
||||
\midrule
|
||||
探索 & Explore & 理解项目全貌,避免脱离实际 & 通读现有代码、搜索相关文件、理解架构与已有模式 \\[3pt]
|
||||
规划 & Plan & 先想清楚再动手,确保方向正确 & 让 AI 生成实施方案,审查确认后再编码 \\[3pt]
|
||||
编码 & Code & 按计划逐步实现 & 分步实现功能、逐步验证、遇到问题回退调整 \\[3pt]
|
||||
提交 & Commit & 阶段性成果存档,保留历史轨迹 & 及时 git commit,附上有意义的说明 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\textbf{示例场景}:为景观设计项目创建一个植物配置推荐工具。
|
||||
|
||||
\begin{enumerate}
|
||||
\def\labelenumi{\arabic{enumi}.}
|
||||
\tightlist
|
||||
\item
|
||||
\textbf{描述意图}:用自然语言说明需求
|
||||
\textbf{Explore}:让 AI 先通读项目中的植物数据库、现有推荐逻辑和用户反馈文件,理解上下文
|
||||
\item
|
||||
\textbf{Plan}:请求 AI 制定方案——``先分析需求,列出要实现的模块,我确认后再开始写代码''
|
||||
\item
|
||||
\textbf{Code}:按方案逐模块实现,每完成一个模块就运行验证
|
||||
\item
|
||||
\textbf{Commit}:每个功能模块完成后提交一次,如 ``feat: 添加按气候区域筛选植物的功能''
|
||||
\end{enumerate}
|
||||
|
||||
``帮我创建一个简单的图像分类模型''
|
||||
EPCC 的核心理念是\textbf{先理解、再规划、后动手、常存档}——这与传统的"边写边想"形成对比,特别适合设计专业读者在 AI 辅助下管理复杂项目。
|
||||
|
||||
\begin{enumerate}
|
||||
\def\labelenumi{\arabic{enumi}.}
|
||||
\setcounter{enumi}{1}
|
||||
\item
|
||||
\textbf{AI生成代码}:自动生成完整代码框架
|
||||
\item
|
||||
\textbf{运行测试}:发现问题或需要调整
|
||||
\item
|
||||
\textbf{迭代优化}:通过对话逐步改进
|
||||
\end{enumerate}
|
||||
值得强调的是,Commit 阶段并非简单的``保存'',而是\textbf{人工审核的检查点}。每一次 commit 都意味着开发者已经阅读、理解并确认了 AI 生成的代码——只有审核无误的内容才应当提交。因此,在 Vibe Coding 中不宜一次性让 AI 生成大量代码,而应将任务拆分为小步骤,每一步都以一次成功的 commit 为目标。从这个意义上说,Vibe Coding 的过程就是\textbf{不断 commit 的过程}:生成一小段代码 → 审核确认 → commit → 进入下一轮。这种``小步快跑''的节奏既保证了代码质量,也帮助开发者在每次 commit 中逐步积累对项目的理解。
|
||||
|
||||
``把隐藏层改成128个神经元''
|
||||
\subsection{工具生态}
|
||||
|
||||
\begin{enumerate}
|
||||
\def\labelenumi{\arabic{enumi}.}
|
||||
\setcounter{enumi}{4}
|
||||
\tightlist
|
||||
\item
|
||||
\textbf{理解学习}:阅读AI生成的代码,理解实现原理
|
||||
\end{enumerate}
|
||||
当前 AI 编程工具已形成多种产品形态,各有侧重(表\ref{tab:ai-tools})。
|
||||
|
||||
\subsubsection{实践技巧}
|
||||
\begin{table}[htbp]
|
||||
\centering
|
||||
\caption{AI 编程工具的分类与代表产品}
|
||||
\label{tab:ai-tools}
|
||||
\begin{tabular}{@{} l l p{3.2cm} p{4.5cm} @{}}
|
||||
\toprule
|
||||
\textbf{类别} & \textbf{代表工具} & \textbf{特点} & \textbf{适用场景} \\
|
||||
\midrule
|
||||
网页对话 & ChatGPT、Claude.ai & 代码生成与解释,零配置 & 学习咨询、快速原型 \\[3pt]
|
||||
编辑器插件 & GitHub Copilot、Cline & 实时补全与对话,融入现有 IDE & 日常开发 \\[3pt]
|
||||
AI 原生 IDE & Cursor、Windsurf & 对话式编程,深度集成项目理解 & 快速原型、中型项目 \\[3pt]
|
||||
终端智能体 & Claude Code、Codex CLI & CLI 操作,多文件协作,架构级推理 & 项目级开发、大型重构 \\[3pt]
|
||||
云端自主智能体 & OpenAI Codex、Devin & 云端沙箱全自动执行 & 重复性任务、CI/CD 集成 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
{\def\LTcaptype{none} % do not increment counter
|
||||
\begin{longtable}[]{@{}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1528}}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.4583}}@{}}
|
||||
\toprule\noalign{}
|
||||
\begin{minipage}[b]{\linewidth}\raggedright
|
||||
技巧
|
||||
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
|
||||
说明
|
||||
\end{minipage} \\
|
||||
\midrule\noalign{}
|
||||
\endhead
|
||||
\bottomrule\noalign{}
|
||||
\endlastfoot
|
||||
明确需求 & 详细描述输入输出,提供上下文 \\
|
||||
分步实现 & 复杂功能拆解为小任务,逐步完成 \\
|
||||
验证结果 & 运行并检查AI生成的代码是否正确 \\
|
||||
学习思考 & 不盲目接受,理解AI为什么这样写 \\
|
||||
\end{longtable}
|
||||
}
|
||||
|
||||
\subsubsection{工具生态}
|
||||
|
||||
{\def\LTcaptype{none} % do not increment counter
|
||||
\begin{longtable}[]{@{}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2375}}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1625}}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3125}}
|
||||
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2625}}@{}}
|
||||
\toprule\noalign{}
|
||||
\begin{minipage}[b]{\linewidth}\raggedright
|
||||
工具
|
||||
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
|
||||
形态
|
||||
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
|
||||
特点
|
||||
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
|
||||
适用场景
|
||||
\end{minipage} \\
|
||||
\midrule\noalign{}
|
||||
\endhead
|
||||
\bottomrule\noalign{}
|
||||
\endlastfoot
|
||||
ChatGPT / Claude & 网页对话 & 代码生成与解释 & 学习咨询、快速原型 \\
|
||||
GitHub Copilot & 编辑器插件 & 实时代码补全 & 日常开发 \\
|
||||
Cursor & AI原生IDE & 对话式编程 & 快速原型、中型项目 \\
|
||||
Claude Code & 终端CLI & 终端AI编程、多文件协作 & 项目级开发 \\
|
||||
Replit Agent & 在线平台 & 端到端开发 & 小型项目、学习实验 \\
|
||||
\end{longtable}
|
||||
}
|
||||
初学者可从``网页对话''入手,逐步过渡到``编辑器插件''和``AI 原生 IDE''。对于需要深度掌控项目结构的中大型工作,``终端智能体''提供了最强的控制力和推理深度。``云端自主智能体''正在快速发展,能够独立完成从需求到部署的全流程,但在可控性和代码质量方面仍有提升空间。选择工具时,核心考量因素包括:上下文理解能力(能否理解整个项目而非单文件)、代码质量与幻觉控制(生成结果是否可靠)、以及成本效率(每次交互的 token 消耗)。
|
||||
|
||||
\section{Claude Code简介与使用}
|
||||
|
||||
\subsubsection{什么是Claude Code}
|
||||
\subsection{什么是Claude Code}
|
||||
|
||||
Claude
|
||||
Code是Anthropic推出的命令行AI编程工具(CLI),能够直接在终端中理解项目上下文、读写文件、执行命令,实现端到端的AI辅助开发。它也提供VSCode扩展,可以在编辑器中无缝使用。
|
||||
|
||||
\subsubsection{安装与配置}
|
||||
\subsection{安装与配置}
|
||||
|
||||
\emph{\# 安装(需要 Node.js 18+)}\\
|
||||
npm install -g @anthropic-ai/claude-code\\
|
||||
@@ -117,7 +90,7 @@ claude
|
||||
|
||||
启动后进入交互式对话界面,直接用自然语言描述需求即可。
|
||||
|
||||
\subsubsection{核心使用方式}
|
||||
\subsection{核心使用方式}
|
||||
|
||||
\textbf{对话式开发}:用自然语言描述任务,Claude
|
||||
Code会自动读取相关文件、编写代码、执行测试。
|
||||
@@ -131,7 +104,7 @@ Code可以直接读取、创建和编辑项目中的文件,每次修改前会
|
||||
\textbf{命令执行}:可以请求Claude
|
||||
Code运行终端命令,如安装依赖、运行脚本等。
|
||||
|
||||
\subsubsection{VSCode中的Claude
|
||||
\subsection{VSCode中的Claude
|
||||
Code}
|
||||
|
||||
Claude Code提供VSCode扩展,在编辑器中获得同样的AI辅助能力:
|
||||
@@ -151,7 +124,7 @@ Claude Code提供VSCode扩展,在编辑器中获得同样的AI辅助能力:
|
||||
\textbf{常用场景}: - 选中一段代码,请求”解释这段代码“ -
|
||||
选中函数,请求”添加错误处理” - 在Claude面板中输入”帮我写单元测试”
|
||||
|
||||
\subsubsection{典型项目工作流}
|
||||
\subsection{典型项目工作流}
|
||||
|
||||
\textbf{推荐项目结构}:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
\textbf{AI 技术是如何演进的,我们应该关注哪些方向?}
|
||||
\end{enumerate}
|
||||
|
||||
通过本篇学习,你将建立对 AI 的宏观认知,理解技术发展的脉络,为后续深入学习打下基础。
|
||||
|
||||
|
||||
\section*{学习目标}
|
||||
\addcontentsline{toc}{section}{学习目标}
|
||||
|
||||
@@ -970,7 +970,7 @@ print(f"真实参数: W = [2.0, 3.0], b = [1.0]")
|
||||
|
||||
\subsection{智能体与环境概念}
|
||||
|
||||
在《人工智能——计算Agent基础》一书\cite{MGDW8DPN}中,人工智能被定义为“一个研究能够产生智能行为的计算Agent的分析与综合的领域”,可见Agent这一概念在AI领域中的核心地位。书中进一步将Agent定义为“在某个环境中进行某种行为的个体——它完成了某件事”。由此,``人工智能的核心科学目标是理解自然系统或人工系统中一些智能行为的原理“,而”人工智能的核心工程目标是设计和合成有用且智能的产品''。
|
||||
在《人工智能——计算Agent基础》一书\cite{MGDW8DPN}中,人工智能被定义为“一个研究能够产生智能行为的计算Agent的分析与综合的领域”,可见Agent这一概念在AI领域中的核心地位。书中进一步将Agent定义为“在某个环境中进行某种行为的个体——它完成了某件事”。由此,“人工智能的核心科学目标是理解自然系统或人工系统中一些智能行为的原理”,而“人工智能的核心工程目标是设计和合成有用且智能的产品”。
|
||||
|
||||
因此,AI领域的基本要素便是在不同类型环境(Environment)中行动的各类智能体(Agent),执行从科学发现到实践应用等不同场景中的多种任务(Task)。总体上,环境可分为物理环境与虚拟或数字环境两大类,智能体可分为人类(含具有不同程度智能的动物)、AI与具身智能三大类(表2.1)。
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
@@ -1,3 +1,4 @@
|
||||
\PassOptionsToPackage{dvipsnames}{xcolor}
|
||||
\documentclass[a4paper,openany,12pt]{ctexbook}
|
||||
|
||||
% ========== 宏包与全局设置 ==========
|
||||
@@ -5,8 +6,8 @@
|
||||
|
||||
% ========== 标题信息 ==========
|
||||
\title{\Huge\textbf{设计人工智能:基础与应用} \\[1em] \Large Design AI: Fundamentals and Applications}
|
||||
\author{彭晓}
|
||||
\date{2026年4月}
|
||||
\author{彭晓 \\ \small 空间智能与自主设计实验室}
|
||||
\date{2026年5月}
|
||||
|
||||
% ========== 按章编译开关 ==========
|
||||
% 取消注释以只编译特定章节(加速调试)
|
||||
@@ -19,6 +20,15 @@
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
% ---------- 故意留白 ----------
|
||||
\clearpage
|
||||
\vspace*{\fill}
|
||||
\begin{center}
|
||||
\small\textcolor{gray}{此页故意留白}
|
||||
\end{center}
|
||||
\vspace*{\fill}
|
||||
\thispagestyle{empty}
|
||||
|
||||
% ---------- 前言部分 ----------
|
||||
\frontmatter
|
||||
\input{chapters/ch00-preface}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
% ========== 行距 ==========
|
||||
\usepackage{setspace}
|
||||
\onehalfspacing
|
||||
\doublespacing
|
||||
|
||||
% ========== 修复页眉高度警告 ==========
|
||||
\setlength{\headheight}{14.49998pt}
|
||||
@@ -49,7 +49,8 @@
|
||||
}
|
||||
|
||||
% ========== 颜色 ==========
|
||||
\usepackage{xcolor}
|
||||
\usepackage[dvipsnames]{xcolor}
|
||||
\definecolor{GREEN}{RGB}{0,128,0}
|
||||
|
||||
% ========== 超链接 ==========
|
||||
\usepackage{hyperref}
|
||||
@@ -95,3 +96,9 @@
|
||||
format = \large\bfseries,
|
||||
},
|
||||
}
|
||||
|
||||
% ========== 章节编号深度 ==========
|
||||
\setcounter{secnumdepth}{3}
|
||||
|
||||
% ========== 绿色底色标题 ==========
|
||||
\newcommand{\greenheading}[1]{\texorpdfstring{\colorbox{green!20}{\ #1\ }}{#1}}
|
||||
|
||||
Reference in New Issue
Block a user