CS221: Artificial Intelligence: Principles and Techniques

Logistics
COVID-19 update: CS221 will be offered online Spring 2020. You can participate real time through Zoom. The Zoom links for lecture and section will be accessible on the Canvas course home page as well as Piazza. The course videos will also be recorded and put in the "Course Videos" tab in Canvas. Office hours will be remote using Queuestatus. Project for this course is now optional, please see Exam and Project sections for updates as well.
Time/location:
Communication: We will use Piazza for all communications: announcements and questions related to lectures, assignments, and projects. NOTE: If you enrolled in this class on Axess, you should be added to the Piazza group automatically, within a few hours. You can also register independently; there is no access code required to join the group. SCPD students, please email scpd-gradstudents@stanford.edu or call 650-204-3984 if you need assistance.
Academic accommodations: If you need an academic accommodation based on a disability, you should initiate the request with the Office of Accessible Education (OAE). The OAE will evaluate the request, recommend accommodations, and prepare a letter for faculty. Students should contact the OAE as soon as possible and at any rate in advance of assignment deadlines, since timely notice is needed to coordinate accommodations. It is the student’s responsibility to reach out to the teaching staff regarding the OAE letter. Please send your letters to cs221-spr1920-staff@lists.stanford.edu by Friday, April 24 (week 3).
Gradescope: You will submit all assignments and project milestones on Gradescope, where you will also find your grades.
Instructors:
chelsea

Chelsea Finn
nima

Nima Anari
Course coordinator & course assistants:
amelie

Amelie Byun
(Course Coordinator)
cindyj

Cindy Jiang
(Head CA)
mpalsson

Marcus Pålsson
Content
What is this course about? What do web search, speech recognition, face recognition, machine translation, autonomous driving, and automatic scheduling have in common? These are all complex real-world problems, and the goal of artificial intelligence (AI) is to tackle these with rigorous mathematical tools. In this course, you will learn the foundational principles that drive these applications and practice implementing some of these systems. Specific topics include machine learning, search, game playing, Markov decision processes, constraint satisfaction, graphical models, and logic. The main goal of the course is to equip you with the tools to tackle new AI problems you might encounter in life.
Prerequisites: This course is fast-paced and covers a lot of ground, so it is important that you have a solid foundation on both the theoretical and empirical fronts. You should have taken the following classes (or their equivalents):
Reading: There is no required textbook 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 books: Bear in mind that some of these books can be quite dense and use different notation terminology, so it might take some effort to connect up with the material from class.
Video Access Disclaimer: This class will be given in Zoom. For your convenience, you can access recordings by logging into the course Canvas site. 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, please contact a member of the teaching team.

Zoom Instructions

Installing Zoom Best Practices for Zoom
Please be aware that the lecture is being recorded and will be uploaded to the course Canvas page.
Office Hour Logistics
Coursework

Grading

Per Stanford Faculty Senate policy, all spring quarter courses are now S/NC, and all students enrolling in this course will receive a S/NC grade. This course will still satisfy requirements as if taken for a letter grade for CS-MS requirements, CS-BS requirements, CS-Minor requirements, and the SoE requirements for the CS major.
Since the project is optional, we are providing two grading schemes: We will take the maximum of these two so that everyone will get the better of their grades under each grading scheme.

Assignments

Written assignments: Homeworks should be written up clearly and succinctly; you may lose points if your answers are unclear or unnecessarily complicated. Here is an example of what we are looking for. You are encouraged to use LaTeX to writeup your homeworks (here's a template), but this is not a requirement. You will receive one (1) bonus point for submitting a typed written assignment (e.g. LaTeX, Microsoft Word). To receive this point, you must select the first page of your submission for the bonus question in Gradescope. We will accept scanned handwritten assignments but they will not receive the bonus point.
Programming assignments: The grader runs on Python 3.7+, which is not guaranteed to work with older versions (Python 2.7). Please use Python 3 to develop your code.

The programming assignments are designed to be run in GNU/Linux environments. Most or all of the grading code may incidentally work on other systems such as MacOS or Windows, and students may optionally choose to do most of their development in one of these alternative environments. However, no technical support will be provided for issues that only arise on an alternative environment. Moreover, no matter what environment is used during development, students must confirm that their code (specifically, the student's submission.py) runs on the Gradescope autograder.

The submitted code will not be graded if it has one of the following issues:

Collaboration policy and honor code: 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!). It is important to remember that even if you didn't copy but just gave another student your solution, you are still violating the honor code, so please be careful. We periodically run similarity-detection software over all submitted student programs, including programs from past quarters and any solutions found online on public websites. Anyone violating the honor code will be referred to the Office of Judicial Affairs. If you feel like you made a mistake (it can happen, especially under time pressure!), please reach out to the instructor or the head CA; the consequences will be much less severe than if we approach you.

Submission

Electronic Submission: All assignments are due at 11pm (23:00, not 23:59) Pacific time on the due date.

For assignments with a programming component, we will automatically sanity check your code in some basic test cases, but we will grade your code on additional test cases. Important: just because you pass the basic test cases, you are by no means guaranteed to get full credit on the other, hidden test cases, so you should test the program more thoroughly yourself!

Unless the assignment instructs otherwise, all of your code modifications should be in submission.py and all of your written answers in <assignment ID>.pdf. Upload the former to Gradescope under the "Programming" section, and the latter under the "Written" section.
For the project milestones, make sure all members of your group are included in the submission.

Late days: An assignment is $\lceil d \rceil$ days late if it is turned in $d$ days past the due date (note that this means if you are $1$ second late, $d = 1$ and it is 1 day late). You have seven (7) late days in total that can be distributed among the assignments (except for p-poster and p-final) without penalty. After that, the maximum possible grade is decreased by 25% each day (so the best you can do with $d = 1$ is 75%). As an example, if you are out of late days and submit one day late, a 90 will be capped at a 75, but a 72 will not be changed. Note that we will only allow a max of $d = 2$ late days per assignment, though, so if $d > 2$ then we will not accept your submission. Gradescope is set up to accept written and programming submissions separately. Late days are calculated per-assignment, with the number of late days used depending on the later submission. So, if the programming part is $1$ day late and the written part is $2$ days late, then that will count as using $2$ late days.
Regrades: If you believe that the course staff made an objective error in grading, then you may submit a regrade request for the written part of your assignment. Remember that even if the grading seems harsh to you, the same rubric was used for everyone for fairness, so this is not sufficient justification for a regrade. It is also helpful to cross-check your answer against the released solutions. If you still choose to submit a regrade request, click the corresponding question on Gradescope, then click the "Request Regrade" button at the bottom. Any requests submitted over email or in person will be ignored. Regrade requests for a particular assignment are due one week after the grades are returned. Note that we may regrade your entire submission, so that depending on your submission you may actually lose more points than you gain.
Schedule