家教 · 2024 – 2025
ClassBro
计算机科学跨领域家教与导师工作
进行中 · 2024 – 2025
边学边做 ↓通过 ClassBro 进行家教工作
自 2024 年起,我通过 ClassBro 为大学生提供计算机科学各科目的家教和导师服务。工作范围跨越编程基础和高级主题:从编程入门和数据结构,到机器学习和人工智能,再到数据库、系统和云计算。我与学习者进行一对一合作,架起概念与代码之间的桥梁,培养他们的解决问题的信心和独立性。
按领域分类的科目
编程与软件工程
- Introduction to Programming
- Introduction to Programming and Problem Solving
- Introduction to Python
- Principles of Programming
- Programming Fundamentals
- Programming III
- Computational Thinking and Problem Solving
- Introduction to Computer Science
- Computer Science Fundamentals I
- Foundations of C Programming
- C++ Programming
- Algorithms and Programming in C and R
- Programming and Computation II: Data Structures
- Imperative and Functional Programming
- Machine Organisation and Programming
- Introduction to Software Development
- Software Engineering Fundamentals
- Web Science
数据科学与分析
- Foundations of Data Science
- Elements of Data Processing
- Data Taming
- Computational Data Analysis
- Statistical Programming for Data Science
- Quantitative and Data Analysis in Python
- Data Analysis for Semi-structured Data
- Graphical Data Analysis
- Data Visualisation
- Visual Analytics
- Insights Through Data
- Data Analytics for Business
- Data Driven Web Technology
- Data Methods for Health Research
- Introduction to Data Science and Systems
人工智能与机器学习
- Introduction to Artificial Intelligence and Data Analytics
- Artificial Intelligence
- Fundamentals of AI, Data and Algorithms
- Fundamentals of Machine Learning
- Machine Learning
- Statistical Machine Learning
- Statistical Learning for Data Science
- Multivariate Statistics for Data Science
- Pattern Recognition
- Data Mining
- Generative Artificial Intelligence
- LLM project work
- Introduction to Robotics
- Game Design and Development
- Foundations of Computing 2
计算机系统、网络与云计算
- Introduction to Computer Systems
- Introduction to Computer Systems, Networks and Security
- Computer Systems
- Fundamentals of Computer Architecture
- Logic and Computer Architecture
- Systems Programming
- Internet Programming
- Internet Technologies
- High Performance Computing
- Cluster and Cloud Computing
- Social Computing Techniques
数据库与数据工程
- Introduction to Databases
- Understanding Databases
- Relational Databases
- Database Principles
- Advanced Database Systems
- Big Data Systems, Programming and Management
- Data Programming Workshop
- Data Cleansing
- Understanding Data and their Environment
数学与统计
- Engineering Mathematics I
- Quantitative Methods for Engineers
- Introduction to Optimisation
- Optimisation
- Intermediate Statistical Methods
- Statistical and Design Considerations in Policy Research
- Theory and Practice in Science
商业与信息系统
- Business Decision Making
- Computer Applications for Business
- Transforming Business with Information Systems
- Information Technology Management
- Computing and IT Professionalism
社会科学与人文
- Text as Data
- Spatial Planning Analytics
- Research Methods and Project Preparation
- Journalism Practicum I
研究与毕业论文辅导
- Dissertations
- Project proposals
职业与面试辅导
- Interview coaching
- AI engineer interview coaching
运行这节课:先 minimax,再 alpha-beta
下面是我教学工作中的一个概念课程:学生通过动手构建来学习,而不是被动观看。
选一个起始局面,或者自己走几步,然后比较两种搜索。双方都走最佳时,两者算出的结局永远一致,但 alpha-beta 访问的局面更少。下面逐行列出了它在哪里省得最多。
01
Minimax
把每一步都试到终局。结束的对局按结果打分:X 赢记 +1,O 赢记 −1,平局记 0。X 取最高分,O 取最低分,分数沿着树一层层往上传。
02
Alpha-beta
往下搜索时带上两个数。alpha 是 X 已经稳拿的最好分数,beta 是 O 已经稳拿的最好分数。一旦 alpha 追上 beta,这个分支里剩下的走法都改变不了结果,搜索就在这里停下。
03
顺序
先试强的走法,剪枝就剪得最多。切换搜索顺序,看看 alpha-beta 的计数怎么变,而结局保持不变。
合成棋局 · 从零编写 · 在你的浏览器里运行
轮到 O
选一个空格落下一步。方向键在格子之间移动,回车键或空格键落子。
最佳走法
从当前局面出发访问的局面数
- Minimax
- 55,505
- Alpha-beta
- 2,316
- 少看了
- 96%
- 剪掉的分支
- 1,014
最佳走法左上。双方都走最佳时,结果是平局。
逐步来看
每一行是当前局面下的一种走法,按搜索顺序排列,并注明双方都走最佳时的结局。上面的条是 minimax,下面的条是 alpha-beta,用的是同一个比例尺。
左上平局
Minimax6,812Alpha-beta703目前最好的一步
上中X 胜
Minimax7,064Alpha-beta166不可能比左上更好,alpha-beta 一确认就停下了。
右上平局
Minimax6,812Alpha-beta254不可能比左上更好,alpha-beta 一确认就停下了。
左中X 胜
Minimax7,064Alpha-beta106不可能比左上更好,alpha-beta 一确认就停下了。
右中X 胜
Minimax7,064Alpha-beta174不可能比左上更好,alpha-beta 一确认就停下了。
左下平局
Minimax6,812Alpha-beta282不可能比左上更好,alpha-beta 一确认就停下了。
下中X 胜
Minimax7,064Alpha-beta311不可能比左上更好,alpha-beta 一确认就停下了。
右下平局
Minimax6,812Alpha-beta319不可能比左上更好,alpha-beta 一确认就停下了。
轮到 O。最佳走法:左上,双方都走最佳时结果是平局。minimax 访问了 55,505 个局面,alpha-beta 访问了 2,316 个,少了 96%。
代码
function minimax(board, player, order, stats) { stats.nodes += 1; const score = finalScore(board); if (score !== null) return score; let best = player === "X" ? -Infinity : Infinity; for (const cell of order) { if (board[cell]) continue; board[cell] = player; const value = minimax(board, other(player), order, stats); board[cell] = null; best = player === "X" ? Math.max(best, value) : Math.min(best, value); } return best;}标记的行是 alpha-beta 与 minimax 不同的地方。
所有学生名字、班级、大学和机构信息已隐去。下面的课程是为本页面新编写的概念演示。
返回