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 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-spr2324-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-spr2324-staff@lists.stanford.edu by Friday, Apr 19 (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 Apr 1 Apr 2
Apr 3
Apr 4 Apr 5 Apr 6 Apr 7
Modules
Introduction
Prerequisites
Machine Learning I

Homework [Foundations]
Lecture:
Introduction (Sanmi)
10:30am - 12:00pm
Lecture:
Machine Learning I (Sanmi)
10:30am - 12:00pm
Problem Session:
10:30am - 12:00pm

[Problems] [Solutions] [Slides]
Week 2 Apr 8 Apr 9
Apr 10
Apr 11 Apr 12 Apr 13 Apr 14
Modules
Machine Learning II


Homework
[Sentiment]
Lecture:
Machine Learning II (Sanmi)
10:30am - 12:00pm
Prerequisites Quiz Due
Foundations HW due Lecture:
Machine Learning III (Sanmi)
10:30am - 12:00pm
Problem Session:
10:30am - 12:00pm

[Problems] [Solutions] [Slides]
Week 3 Apr 15 Apr 16
Apr 17
Apr 18 Apr 19 Apr 20 Apr 21
Modules
Search

Homework
[Route]
Lecture:
Search (Nima)
10:30am - 12:00pm
Sentiment HW Due Lecture:
Search & Heuristics (Nima)
10:30am - 12:00pm
Final Study List Deadline / Project interest form due
Week 4 Apr 22 Apr 23
Apr 24
Apr 25 Apr 26 Apr 27 Apr 28
Modules
MDPs I
MDPs II

Homework
[Mountaincar]
Lecture:
MDPs I (Sanmi)
10:30am - 12:00pm
Route HW due Lecture:
MDPs II (Sanmi)
10:30am - 12:00pm

Week 5 Apr 29 Apr 30
May 1
May 2 May 3 May 4 May 5
Modules
Games

Homework
[Pacman]
Lecture:
Games I (Nima)
10:30am - 12:00pm
Mountaincar HW due Lecture:
Games II (Nima)
10:30am - 12:00pm


Project proposal due
Week 6 May 6 May 7
May 8
May 9 May 10 May 11 May 12
Modules
Factor Graphs
Lecture:
Factor Graphs (Nima)
10:30am - 12:00pm
Lecture:
Beam Search (Nima)
10:30am - 12:00pm
Exam 1
Week 7 May 13 May 14
May 15
May 16 May 17 May 18 May 19
Modules
Markov Nets
Bayesian Nets

Homework
[Scheduling]
Lecture:
Bayesian Nets I (Moses)
10:30am - 12:00pm

Pacman HW Due Lecture:
Bayesian Nets II (Moses)
10:30am - 12:00pm
Week 8 May 20 May 21
May 22
May 23 May 24 May 25 May 26
Modules
Bayesian Nets
Logic

Homework
[Car]
Lecture:
Bayesian Nets III (Moses)
10:30am - 12:00pm
Scheduling HW due Lecture:
Logic I (Moses)
10:30am - 12:00pm
Withdrawal deadline / Project progress report due
Week 9 May 27 May 28
May 29
May 30 May 31 Jun 1 Jun 2
Modules
Logic

Homework
[Logic]
Memorial day (no class) Car HW Due
Lecture:
Logic II (Moses)
10:30am - 12:00pm
Week 10 Jun 3 Jun 4 Jun 5 Jun 6 Jun 7 Jun 8 Jun 9
Modules
Conclusion
Lecture:
Conclusion (Moses)
10:30am - 12:00pm Project final report due
Logic HW Due Lecture:
Summary and future of AI (TBD)
10:30am - 12:00pm
Final Exam 3:30 - 6:30 PM.