CS221: Artificial Intelligence: Principles and Techniques
Teaching Staff
Activities Homework parties and most office hours are in person in Huang Basement, but we will have some remote office hours (for CGOE 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. CGOE students: please email scpd-gradstudents@stanford.edu if you need general assistance. Make a public Ed post whenever possible. For extra sensitive matters, you can email cs221-aut24-lead-staff@lists.stanford.edu, which is visible by only the instructors, head CA, course manager, 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-aut24-lead-staff@lists.stanford.edu by Friday, Oct 11 (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 you must 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 Community Standards. 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.

Stanford as an institution is committed to the highest quality education, and as your teaching team, our first priority is to uphold your educational experience. To that end we are committed to following the syllabus as written here, including through short- or long-term disruptions, such as public health emergencies, natural disasters, or protests and demonstrations. However, there may be extenuating circumstances that necessitate some changes. Should adjustments be necessary, we will communicate clearly and promptly to ensure you understand the expectations and are positioned for successful learning.
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 Sept 23 Sept 24
Sept 25
Sept 26 Sept 27 Sept 28 Sept 29
Modules
Introduction
Prerequisites
Machine Learning I

Homework [Foundations]
Lecture:
Introduction (Nima)
1:30pm - 2:50pm
Lecture:
Machine Learning I (Nima)
1:30pm - 2:50pm
Problem Session:
1:30pm - 2:50pm

[Problems] [Solutions] [Slides]
Week 2 Sept 30 Oct 1
Oct 2
Oct 3 Oct 4 Oct 5 Oct 6
Modules
Machine Learning II

Homework
[Sentiment]
Lecture:
Machine Learning II (Nima)
1:30pm - 2:50pm
Foundations HW due

Prerequisites Quiz due
Lecture:
Machine Learning III (Nima)
1:30pm - 2:50pm
Problem Session:
1:30pm - 2:50pm

[Problems] [Solutions] [Slides]
Week 3 Oct 7 Oct 8
Oct 9
Oct 10 Oct 11 Oct 12 Oct 13
Modules
Search

Homework
[Route]
Lecture:
Search (Dorsa)
1:30pm - 2:50pm

Project Interest Form due
Sentiment HW due Lecture:
Search & Heuristics (Dorsa)
1:30pm - 2:50pm
Final Study List Deadline

Problem Session:
1:30pm - 2:50pm

[Problems] [Solutions] [Slides]
Week 4 Oct 14 Oct 15
Oct 16
Oct 17 Oct 18 Oct 19 Oct 20
Modules
MDPs I
MDPs II

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

Problem Session:
1:30pm - 2:50pm

Week 5 Oct 21 Oct 22 Oct 23 Oct 24 Oct 25 Oct 26 Oct 27
Modules
Games

Homework
[Pacman]
Lecture:
Games I (Dorsa)
1:30pm - 2:50pm

Project Proposal due
Mountaincar HW due Lecture:
Games II (Dorsa)
1:30pm - 2:50pm


Midterm Review Session:
1:30pm - 2:50pm

Week 6 Oct 28 Oct 29 Oct 30 Oct 31 Nov 1 Nov 2 Nov 3
Modules
Factor Graphs
Lecture:
Factor Graphs (Nima)
1:30pm - 2:50pm
Lecture:
Beam Search (Nima)
1:30pm - 2:50pm

Midterm Exam
6-8pm
Problem Session:
1:30pm - 2:50pm

Week 7 Nov 4 Nov 5 Nov 6 Nov 7 Nov 8 Nov 9 Nov 10
Modules
Markov Nets
Bayesian Nets

Homework
[Scheduling]
Lecture:
Bayesian Nets I (Nima)
1:30pm - 2:50pm

Pacman HW Due Lecture:
Bayesian Nets II (Nima)
1:30pm - 2:50pm
Problem Session:
1:30pm - 2:50pm

Week 8 Nov 11 Nov 12 Nov 13 Nov 14 Nov 15 Nov 16 Nov 17
Modules
Bayesian Nets
Logic

Homework
[Car]
Lecture:
Bayesian Nets III (Nima)
1:30pm - 2:50pm
Scheduling HW due Lecture:
Logic I (Dorsa)
1:30pm - 2:50pm
Project Progress Report due Withdrawal deadline

Problem Session:
1:30pm - 2:50pm

Week 9 Nov 18 Nov 19 Nov 20 Nov 21 Nov 22 Nov 23 Nov 24
Modules
Logic

Homework
[Logic]
Lecture:
Logic II (Dorsa)
1:30pm - 2:50pm
Car HW due
Lecture:
Fireside Chat
1:30pm - 2:50pm
Problem Session:
1:30pm - 2:50pm

Thanksgiving Nov 25 Nov 26 Nov 27 Nov 28 Nov 29 Dec 30 Dec 1
Break Week!

Week 10 Dec 2 Dec 3 Dec 4 Dec 5 Dec 6 Dec 7 Dec 8
Modules
Conclusion
Lecture:
Conclusion (Dorsa)
1:30pm - 2:50pm
Logic HW due

Project Final Report and Video Due
Project Presentations
1:30pm - 2:50pm
Final Exam Review Session:
1:30pm - 2:50pm
Finals Week Dec 9 Dec 10 Dec 11 Dec 12 Dec 13 Dec 14 Dec 15
Finals Week Final Exam 3:30-5:30pm