All courses Harvard

CS50's Introduction to AI with Python review

Harvard · harvard-cs50

Our CS50 AI review: CS50's Introduction to AI with Python is the best free course for learners who can already code and want the ideas behind modern AI. Brian Yu and David J. Malan teach 7 weeks, from search to language models, and you code each idea into your own Python programs. It costs nothing, with a free certificate.

Difficulty: 3 of 5
some PythonFree certificate
Go to course →Free to audit

What does it take?

Difficulty3 out of 5
HoursAbout 70 hours
FormatVideo, Projects
Maths neededSchool-level maths
Coding neededYes, you will write code
Hardware neededA browser is enough
CertificateFree certificate
Free to auditYes
PaceSelf-paced
Last updated by the providerNot checked yet
TeachersBrian Yu and David J. Malan (Harvard)
Length7 weeks (edX estimates 10 to 30 hours a week)
Projects12 projects across 7 project sets
PrerequisiteCS50x or at least 1 year of Python
CostFree via Harvard OpenCourseWare
Free certificateFree CS50 Certificate at 70% or more on each project
Paid certificateedX verified certificate, USD 299
Python version3.12

Who should take it, and who should skip it?

Take it if you are

  • Learners with CS50x or 1 year of Python who want the theory behind modern AI
  • Anyone who learns best by writing algorithms into their own programs
  • People who want a free certificate backed by 12 scored projects

Skip it if you are

  • Anyone new to Python: take Kaggle Learn: Python first
  • Learners who want a short course: edX estimates 10 to 30 hours a week for 7 weeks
  • Anyone who wants an accredited Harvard credential: neither certificate is one

What will you be able to do after it?

  • Write graph search and adversarial search programs, from depth-first search to minimax
  • Reason with logic and probability, including Bayes' rule and Bayesian networks
  • Solve optimisation and constraint satisfaction problems in Python
  • Train classifiers and a neural network, using TensorFlow
  • Build language programs with n-grams, word2vec, attention and transformers

What's in each module?

ModuleWhat it covers
Week 0: SearchDepth-first, breadth-first, greedy best-first and A* search, minimax and alpha-beta pruning. Projects: Degrees and Tic-Tac-Toe.
Week 1: KnowledgePropositional logic, entailment, inference, model checking, resolution and first-order logic. Projects: Knights and Minesweeper.
Week 2: UncertaintyProbability, Bayes' rule, Bayesian networks, sampling, Markov models and hidden Markov models. Projects: PageRank and Heredity.
Week 3: OptimisationLocal search, hill climbing, simulated annealing, linear programming, constraint satisfaction and backtracking search. Project: Crossword.
Week 4: LearningNearest-neighbour, perceptron, support vector machines, regression, overfitting, regularisation, reinforcement learning, Q-learning and k-means. Projects: Shopping and Nim.
Week 5: Neural networksActivation functions, gradient descent, backpropagation, TensorFlow, and convolutional and recurrent networks. Project: Traffic.
Week 6: LanguageContext-free grammar, nltk, n-grams, bag of words, Naive Bayes, word2vec, attention and transformers. Projects: Parser and Attention.

What we liked, and what we didn't

What we liked

  • It costs nothing: Harvard OpenCourseWare lets you take all 7 weeks for free
  • 12 projects across 7 project sets make you write the algorithms yourself
  • Each week has a lecture, a quiz and a project, so the workflow is clear
  • A free CS50 Certificate is available, and you can also buy the edX verified certificate
  • It covers search, knowledge, uncertainty, optimisation, learning, neural networks and language in one course

What we didn't

  • It is not a first course: Harvard lists CS50x or at least 1 year of Python as the prerequisite
  • The time is heavy: edX estimates 10 to 30 hours a week, so 70 to 210 hours for 7 weeks
  • The free certificate needs at least 70% on each of the 12 projects
  • You need an edX registration and a GitHub login to submit projects and earn either certificate
  • Neither certificate is an accredited Harvard academic credential

What's the catch?

The free CS50 Certificate needs a score of at least 70% on every one of the 12 projects, plus an edX registration and a GitHub login for submitting work. The course is also not a first course: Harvard asks for CS50x or at least 1 year of Python. The edX verified certificate costs USD 299 and you can hold both, but neither is an accredited Harvard credential.

Is it still current?

The course page was checked on 5 October 2026. It covers large language models in week 6 and asks for Python 3.12. There are no per-project deadlines, and the current term ends on 30 June 2027, which CS50 may extend.

What should you take before it?

  • Kaggle Learn: Python

    Kaggle's 7-lesson Python course takes about 5 hours, costs nothing and pairs every lesson with an exercise notebook. Kaggle gives a free completion certificate.

  • Kaggle Intro to Machine Learning

    Kaggle's 7-lesson first machine learning course takes about 3 hours, costs nothing and ends with a competition. Kaggle gives a free completion certificate.

What should you take after it?

  • Machine Learning Specialization

    The Machine Learning Specialization has 3 courses and 95 hours of Andrew Ng's lessons. Coursera's FAQ says you cannot take it for free, so check the cost first.

  • Practical Deep Learning for Coders

    Practical Deep Learning for Coders has 9 lessons of about 90 minutes, costs nothing and has no certificate. You deploy your own model by the end of lesson 2.

How we rated it: 9 out of 10

CriterionScore out of 10
Clarity9
Hands-on practice9
Up to date8
Depth8
Truly free9

Questions people ask

Is CS50's Introduction to AI with Python free?

Yes. Harvard OpenCourseWare lets you take all 7 weeks for free, and a free CS50 Certificate is available. The edX verified certificate is a separate option that costs USD 299.

How do you get the free CS50 AI certificate?

Submit every project and score at least 70% on each one. You must register with edX, choosing the free audit option that needs no payment, and projects are submitted through GitHub.

How long does CS50 AI take?

It runs 7 weeks, and edX estimates 10 to 30 hours a week, so 70 to 210 hours. This site lists 70 hours, the low end of that estimate.

What do you need before CS50 AI?

Harvard lists CS50x or at least 1 year of experience with Python as the prerequisite. Coding is required throughout, and the latest Python to use is 3.12.

Can you get both the free and the verified certificate?

Yes. The CS50 FAQ says you can get a free certificate even if you sign up for the edX verified certificate. Neither is an accredited academic offering from Harvard.

Are there deadlines in CS50 AI?

There are no per-project deadlines. The overall deadline is currently 30 June 2027, and CS50 may extend it by 6 or 12 months.

So should you take it?

Take CS50's Introduction to AI with Python once you have 1 year of Python or CS50x behind you and want to understand how AI works, not only how to call it. It scores 9.0: clarity, hands-on and truly free are each 9, because 12 projects make you write the algorithms and the course and certificate cost nothing, while up to date and depth are 8. If you have not written Python before, take Kaggle Learn: Python first.

Where to go next

Last checked : teachers, prerequisite, cost, weekly topics, projects, certificates, deadline and Python version.

Not sure this is the one?

Answer two questions and we'll point you to the course that fits where you are today.