Course Description & Logistics

To realize the dreams and impact of AI requires autonomous systems that learn to make good decisions. Reinforcement learning is one powerful paradigm for doing so, and it is relevant to an enormous range of tasks, including robotics, game playing, consumer modeling and healthcare. This class will provide a solid introduction to the field of reinforcement learning and students will learn about the core challenges and approaches, including generalization and exploration. Through a combination of lectures, and written and coding assignments, students will become well versed in key ideas and techniques for RL. Assignments will include the basics of reinforcement learning as well as deep reinforcement learning — an extremely promising new area that combines deep learning techniques with reinforcement learning.

Communication: We will use Ed discussion forums. We encourage all students to use Ed for the fastest response to your questions.

  • Lectures will be live every Monday and Wednesday: Videos of the lecture content will also be made available to enrolled students through canvas.
  • Office hours: Will be announced in the first week of class

Platforms: All assignments and quizzes will be handled through Gradescope, where you will also find your grades. We will send out links and access codes to enrolled students through Canvas.

You can find Winter 2023 materials here.

Course Instructor

Prerequisites for This Class

  • Proficiency in Python
    All class assignments will be in Python. There is a tutorial here for those who aren't as familiar with Python. If you have a lot of programming experience but in a different language (e.g. C/ C++/ Matlab/ Javascript) you will probably be fine.
  • College Calculus, Linear Algebra (e.g. MATH 51, CME 100)
    You should be comfortable taking derivatives and understanding matrix vector operations and notation.
  • Basic Probability and Statistics (e.g. CS 109 or other stats course)
    You should know basics of probabilities, Gaussian distributions, mean, standard deviation, etc.
  • Foundations of Machine Learning
    We will be formulating cost functions, taking derivatives and performing optimization with gradient descent. Either CS 221 or CS 229 cover this background. Some optimization tricks will be more intuitive with some knowledge of convex optimization.

Learning Outcomes

By the end of the class students should be able to:

  • Define the key features of reinforcement learning that distinguishes it from AI and non-interactive machine learning (as assessed by the exam).
  • Given an application problem (e.g. from computer vision, robotics, etc), decide if it should be formulated as a RL problem; if yes be able to define it formally (in terms of the state space, action space, dynamics and reward model), state what algorithm (from class) is best suited for addressing it and justify your answer (as assessed by the exam).
  • Implement in code common RL algorithms (as assessed by the assignments).
  • Describe (list and define) multiple criteria for analyzing RL algorithms and evaluate algorithms on these metrics: e.g. regret, sample complexity, computational complexity, empirical performance, convergence, etc (as assessed by assignments and the exam).
  • Describe the exploration vs exploitation challenge and compare and contrast at least two approaches for addressing this challenge (in terms of performance, scalability, complexity of implementation, and theoretical guarantees) (as assessed by an assignment and the exam).

Course Lecture Materials (Videos and Slides)

See the Lecture Materials page.

Draft Course Schedule

Monday Tuesday Wednesday Thursday Friday Saturday Sunday
Week 1 Apr 1 Apr 2 Apr 3 Apr 4 Apr 5 Apr 6 Apr 7
Lecture Materials
Introduction to Reinforcement Learning
Tabular MDP planning

[Assignment 1 Released]
Week 2 Apr 8
Apr 9
Apr 10 Apr 11 Apr 12 Apr 13 Apr 14
Lecture Materials
Policy Evaluation
Problem Session 1 [Solutions]
Q learning and Function Approximation
Assignment 1
Due at 6 pm

[Assignment 2 Released]
Week 3 Apr 15
Apr 16 Apr 17 Apr 18 Apr 19
Apr 20 Apr 21
Lecture Materials
Policy Search 1
Problem Session 2 [Solutions]
Policy Search 2
Week 4 Apr 22
Apr 23
Apr 24 Apr 25 Apr 26 Apr 27 Apr 28
Lecture Materials
Policy Search 3
Problem Session 3 [Solutions]
Offline RL 1
Assignment 2
Due at 6 pm
Week 5 Apr 29
Apr 30
May 1 May 2 May 3 May 4 May 5
Lecture Materials
Offline RL 2
Problem Session 4 [Solutions]
[Assignment 3 Released]
Project Proposal
Due at 6 pm
Week 6 May 6
May 7
May 8 May 9 May 10 May 11 May 12
Lecture Materials
Offline RL 3
Problem Session 5 [Solutions]
Exploration 1
Week 7 May 13
May 14
May 15 May 16 May 17 May 18 May 19
Lecture Materials
Exploration 2
Problem Session 6 [Solutions]
Exploration 3
Assignment 3
Due at 6 pm
Week 8 May 20
May 21
May 22 May 23 May 24 May 25 May 26
Lecture Materials
Multi-Agent Game Playing
Problem Session 7 [Solutions]
Guest Lecture

Project Milestone
Due at 6 pm
Week 9 May 27
May 28
May 29 May 30 May 31 Jun 1 Jun 2
Lecture Materials
Memorial Day:
No Class
Problem Session 8 [Solutions]
In-class Quiz
Week 10 Jun 3 Jun 4 Jun 5 Jun 6 Jun 7 Jun 8 Jun 9
Lecture Materials
Value Alignment
Poster Session
Week 11 Jun 10 Jun 11 Jun 12 Jun 13 Jun 14 Jun 15 Jun 16
Final Project Report
Due at 6 pm


There is no official textbook for the class but a number of the supporting readings will come from: Some other additional references that may be useful are listed below:

Grade Breakdown

  • Assignment 1: 10%
  • Assignment 2: 18%
  • Assignment 3: 18%
  • Midterm: 25%
  • Quiz: 5%
  • Course Project: 24%
    • Proposal: 1%
    • Milestone: 2%
    • Poster Presentation: 5%
    • Paper: 16%
  • 0.5% bonus for participating [answering lecture polls for 80% of the days we have lecture with polls. You may participate in these remotely as well. These are due by Sunday at 6pm for the week of lecture. You should complete these by logging in with your Stanford sunid in order for your participation to count.]

Late Day Policy


Assignments and Submission Process


We believe students often learn an enormous amount from each other as well as from us, the course staff. Therefore to facilitate discussion and peer learning, we request that you please use Ed for all questions related to lectures and assignments.

For SCPD students, if you have generic SCPD specific questions, please email or call 650-741-1542. In case you have specific questions related to being a SCPD student for this particular class, please contact us at

For exceptional circumstances that require us to make special arrangements, please email us at For example, such a situation may arise if a student requires extra days to submit a homework due to a medical emergency, or if a student needs to schedule an alternative midterm date due to events such as conference travel etc. They will be considered and approved on a case by case basis.

Regrading Requests

Academic Collaboration, AI Tools Usage and Misconduct

I care about academic collaboration and misconduct because it is important both that we are able to evaluate your own work (independent of your peer’s) and because not claiming others’ work as your own is an important part of integrity in your future career. I understand that different institutions and locations can have different definitions of what forms of collaborative behavior is considered acceptable. In this class, for written homework problems, you are welcome to discuss ideas with others, but you are expected to write up your own solutions independently (without referring to another’s solutions). For coding, you may only share the input-output behavior of your programs. This encourages you to work separately but share ideas on how to test your implementation. Please remember that if you share your solution with another student, even if you did not copy from another, you are still violating the honor code. Consistent with this, it is also considered an honor code violation if you make your assignment solutions publicly available, such as posting them online or in a public git repo.

We may 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 Stanford University Honor Code will be referred to the Office of Judicial Affairs. If you think you made a mistake (it can happen, especially under stress or when time is short!), please reach out to Emma or the head CA; the consequences will be much less severe than if we approach you. We expect all students to submit their own solutions to CS234 homeworks, exams and quizzes, and for projects. You are permitted to use generative AI tools such as Gemini, GPT-4 and Co-Pilot in the same way that human collaboration is considered acceptable: you are not allowed to directly ask for solutions or copy code, and you should indicate if you have used generative AI tools. Similar to human collaboration help, you are ultimately responsible and accountable for your own work. We may check students' homework, exams and projects to enforce this policy. Note that it is not acceptable to list a LLM as a collaborator on the project milestone or final report: as things stand, generative AI cannot accept fault or responsibility, and thus cannot be a collaborator in a final project.

Academic Accommodation

If you need an academic accommodation based on the impact of a disability, please share your Office of Accessible Education letter with us via an email to our course staff list as soon as it is convenient for you. This helps us ensure the course materials and staff support can comply with your needs. The OAS is located at 563 Salvatierra Walk (650-723-1066,

Credit/No Credit Enrollment

If you're enrolled in the class on credit/no credit status, you will be graded on work as usual per standard Stanford rules. The only distinction with those taking the class for letter grade is that you must obtain a C- (C minus) grade or higher in the class, for you to be marked as CR.