CS221: Artificial Intelligence: Principles and Techniques
Teaching Staff
Percy
Percy Liang
Instructor
Activities Homework parties and most office hours are in person in Huang Basement, but we will have some remote office hours (for SCPD students) on Zoom. See class calendar for the exact times and locations of all activities.
Policies
Communication: We will use Ed for all communications, which you can access via Canvas. SCPD students: please email scpd-gradstudents@stanford.edu if you need general assistance. Make a public Ed post whenever possible. For private matters, make a private Ed post, which will be visible to only the instructors and all CAs. For extra sensitive matters, you can also email cs221-aut23-lead-staff@lists.stanford.edu, which is visible by only the instructors, head CA, and student liaison.
Video access disclaimer: Lectures and sections will be recorded and available on Canvas. These recordings might be reused in other Stanford courses, viewed by other Stanford students, faculty, or staff, or used for other education and research purposes. If you have questions or concerns, please contact us.
Academic accommodations: If you need an academic accommodation, contact the Office of Accessible Education (OAE). The OAE will then prepare an OAE letter with the recommended accommodations. Send this letter to cs221-aut23-lead-staff@lists.stanford.edu by Friday, Oct 13 (week 3).
Collaboration policy and honor code: Please read Stanford's honor code policy. In the context of CS221, you are free to form study groups and discuss homeworks and projects. However, you must write up homeworks and code from scratch independently, and you must acknowledge in your submission all the students you discussed with. The following are considered to be honor code violations: When debugging code together, you are only allowed to look at the input-output behavior of each other's programs (so you should write good test cases!). We periodically run similarity-detection software over all submitted student programs, including programs from past quarters and any solutions found online on public websites.

Generative AI Policy: Each student is expected to submit their own solutions to the CS221 homeworks. You may use generative AI tools such as Co-Pilot and ChatGPT as you would use a human collaborator. This means that you may not directly ask generative AI tools for answers or copy solutions, and acknowledge generative AI tools as collaborators. The use of generative AI tools to substantially complete an assignment or exam (e.g. by directly copying) is prohibited and will result in honor code violations. We will be checking students' homework to enforce this policy.

Anyone violating the honor code policy will be referred to the Office of Judicial Affairs. If you think you violated the policy (it can happen, especially under time pressure!), please reach out to us; the consequences will be much less severe than if we approach you.

Inclusion: The CS221 teaching staff is committed to creating an inclusive and supportive learning environment for all students. Please be respectful to your fellow students, course CAs, and instructors. If you see any problems, please reach out to us early.
Content
What is this course about? The goal of artificial intelligence (AI) is to tackle complex real-world problems with rigorous mathematical tools. In this course, you will learn the foundational principles and practice implementing various AI systems. Specific topics include machine learning, search, Markov decision processes, game playing, constraint satisfaction, graphical models, and logic.
Prerequisites: This course is fast-paced and covers a lot of ground, so it is important that you have a solid foundation in a number of areas. Here are the basic skills that you need and the classes that teach those skills: It is less important that you know particular things (e.g., we don't use eigenvectors in this course even though that's a pillar of any linear algebra course), and more important that you've done enough related things that you feel at ease with it. While it is possible to fill in the gaps, this course does move quickly, and ideally you want to be focusing your energy on learning AI rather than catching up on prerequisites. We have made a few prerequisite modules that you can review to refresh your memory, and the first homework (foundations) will allow you to also get some practice on these basics.
Further reading: There are no required textbooks for this class, and you should be able to learn everything from the lecture notes and homeworks. However, if you would like to pursue more advanced topics or get another perspective on the same material, here are some great resources: Note that some of these books use different notation and terminology from this course, so it may may take some effort to make the appropriate connections.
Coursework
Schedule
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
Week 1 Sep 25 Sep 26
Sep 27
Sep 28 Sep 29 Sept 30 Oct 1
Modules
Introduction
Prerequisites

Homework [Foundations]
Lecture:
Introduction (Percy)
1:30-2:50pm
Problem Session
1:30pm-2:20pm
Week 2 Oct 2 Oct 3
Oct 4
Oct 5 Oct 6 Oct 7 Oct 8
Modules
Machine Learning I
Machine Learning II

Lecture:
Machine Learning I (Percy)
1:30-2:50pm
Lecture:
Machine Learning II (Percy)
1:30-2:50pm
Foundations HW due
Week 3 Oct 9 Oct 10
Oct 11
Oct 12 Oct 13 Oct 14 Oct 15
Modules
Machine Learning II

Homework
[Sentiment]
Lecture:
Machine Learning III (Percy)
1:30-2:50pm
Lecture:
Search (Dorsa)
1:30-2:50pm
Sentiment HW Due
Week 4 Oct 16 Oct 17
Oct 18
Oct 19 Oct 20 Oct 21 Oct 22
Modules
Search

Homework
[Route]
Lecture:
Search & Heuristics (Dorsa)
1:30-2:50pm
Project interest form due Lecture:
MDPs I (Dorsa)
1:30-2:50pm
Route HW due
Final Study List Deadline
Week 5 Oct 23 Oct 24
Oct 25
Oct 26 Oct 27 Oct 28 Oct 29
Modules
MDPs I
MDPs II

Homework
[mountaincar]
Lecture:
MDPs II (Dorsa)
1:30-2:50pm
Lecture:
Games I (Dorsa)
1:30-2:50pm
mountaincar HW due

Week 6 Oct 30 Oct 31
Nov 1
Nov 2 Nov 3 Nov 4 Nov 5
Modules
Games
Lecture:
Games II (Dorsa)
1:30-2:50pm
Lecture:
Factor Graphs (Joey)
1:30-2:50pm
Exam 1 Project proposal due
Week 7 Nov 6 Nov 7
Nov 8
Nov 9 Nov 10 Nov 11 Nov 12
Modules
Factor Graphs

Homework
[Pacman]
Lecture:
Beam Search (Percy)
1:30-2:50pm
Lecture:
Bayesian Nets I (Percy)
1:30-2:50pm

Pacman HW Due
Week 8 Nov 13 Nov 14
Nov 15
Nov 16 Nov 17 Nov 18 Nov 19
Modules
Markov Nets
Bayesian Nets

Homework
[Scheduling]
Lecture:
Bayesian Nets II (Percy)
1:30-2:50pm
Lecture:
Bayesian Nets III (Percy)
1:30-2:50pm
Scheduling HW due
Thanksgiving Nov 20 Nov 21
Nov 22
Nov 23 Nov 24 Nov 25 Nov 26
Break Week!

Project progress report due
Week 9 Nov 27 Nov 28
Nov 29
Nov 30 Dec 1 Dec 2 Dec 3
Modules
Logic

Homework
[Car]
Lecture:
Logic I (Dorsa)
1:30-2:50pm

Lecture:
Logic II (Dorsa)
1:30-2:50pm
Car HW Due Project video due
Week 10 Dec 4 Dec 5 Dec 6 Dec 7 Dec 8 Dec 9 Dec 10
Modules
Conclusion
Homework
[Logic]
Lecture:
Fireside Chat & Projects
1:30-2:50pm
Project final report due Lecture:
Conclusion (Dorsa)
1:30-2:50pm
Logic HW Due
Finals Week Dec 11 Dec 12 Dec 13 Dec 14 Dec 15 Dec 16 Dec 17
Final's Week Final Exam 3:30 - 6:30 PM.