CS221: Artificial Intelligence: Principles and Techniques
Teaching Staff
Moses
Moses Charikar
Instructor
Sanmi
Sanmi Koyejo
Instructor
Samar
Samar Khanna
Head CA
Micael
Micael Tchapmi
Student Liason
Amelie
Amelie Byun
Course Manager
Akash
Akash Velu
General OH
Aman
Aman Singh
General OH
Andrew
Andrew Lee
Homework OH
Anirudhan
Anirudhan Badrinath
Homework OH
Irena
Irena Gao
Homework OH
Julie
Julie Liu
Homework OH
Minae
Minae Kwon
General OH
Rishi
Rishi Agarwal
Homework OH
Sanjari
Sanjari Srivastava
Homework OH
Trevor
Trevor Maxfield
General OH
Yilin
Yilin Wu
Homework OH
Zuyi
Zuyi Zhao
Homework OH
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-spr2223-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-spr2223-staff@lists.stanford.edu by Friday, April 21 (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. The use of generative AI tools such as Co-Pilot and ChatGPT to substantially complete an assignment or exam (e.g by entering exam or assignment questions) is strictly prohibited and will result in honor code violations. We will be checking students' Homework submissions for honor code violations. Generative AI tools will only be allowed for completing the final projects. Please refer to Stanford's Generative AI Policy Guidelines for more details.

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 Apr 3 Apr 4
Apr 5
Apr 6 Apr 7 Apr 8 Apr 9
Homework
[Foundations]

Module
[Prerequisites] [Machine Learning I]

Lecture:
Introduction (Sanmi)
10:30am-11:50am
Lecture:
Machine Learning I (Sanmi)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Solutions]
[Video]

Week 2 Apr 10
Apr 11
Apr 12 Apr 13 Apr 14 Apr 15 Apr 16
Homework
[Sentiment]

Module
[Machine Learning II]

Lecture:
Machine Learning II (Sanmi)
10:30am-11:50am
Foundations HW due Lecture:
Machine Learning III (Sanmi)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Video]

Week 3 Apr 17
Apr 18
Apr 19 Apr 20 Apr 21 Apr 22 Apr 23
Homework
[Route]

Module
[Search]

Lecture:
Search (Moses)
10:30am-11:50am
Sentiment HW due Lecture:
Search & Heuristics (Moses)
10:30am-11:50am
Final Study List Deadline

Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Video]

Week 4 Apr 24
Apr 25
Apr 26 Apr 27 Apr 28 Apr 29 Apr 30
Homework
[Blackjack]

Module
[MDPs]

Lecture:
MDPs I (Moses)
10:30am-11:50am
Route HW due Lecture:
MDPs II (Moses)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Slides]
[Video]

Week 5 May 1
May 2
May 3 May 4 May 5 May 6 May 7
Homework
[Pacman]

Module
[Games]

Lecture:
Games I (Moses)
10:30am-11:50am
Blackjack HW due Lecture:
Games II (Moses)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Video]
Project Proposal due

Week 6 May 8
May 9
May 10 May 11 May 12 May 13 May 14

Module
[CSPs]

Lecture:
Factor Graphs (Sanmi)
10:30am-11:50am
Lecture:
Beam Search (Moses)
10:30am-11:50am

Exam I: 6pm-8pm

Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Slides]
[Video]

Week 7 May 15
May 16
May 17 May 18 May 19 May 20 May 21
Homework
[Scheduling]

Module
[Bayesian Nets]

Lecture:
Bayesian Nets I (Sanmi)
10:30am-11:50am
Pacman HW due Lecture:
Bayesian Nets II (Sanmi)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Slides]
[Video]
Project Progress Report due

Week 8 May 22
May 23
May 24 May 25 May 26 May 27 May 28
Homework
[Car]

Module
[Bayesian Nets III / Logic I]

Lecture:
Bayesian Nets III (Sanmi)
10:30am-11:50am
Scheduling HW due Lecture:
Logic I (Moses)
10:30am-11:50am
Course Withdrawal / Change of Grading Basis Deadline

Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Slides]
[Video]

Week 9 May 29
May 30
May 31 Jun 1 Jun 2 Jun 3 Jun 4
Homework
[Logic]

Module
[Logic II]

Memorial Day Car HW due Lecture:
Logic II (Moses)
10:30am-11:50am
Problem Session
3:00pm-4:20pm

[Problems]
[Solutions]
[Slides]
[Video]

Week 10 Jun 5 Jun 6 Jun 7 Jun 8 Jun 9 Jun 10 Jun 11
Lecture:
Conclusion
10:30am-11:50am

Project Final Report due

Logic HW due Lecture:
Exam review session
10:30am-12:20pm

[Problems]
[Solutions]
[Video]

Exam II: 3:30-5:30pm