CS50's Introduction to AI with Python

ActivefoundationalCourse / universityFreeLearning plan ↓

Harvard's free, rigorous intro to search, optimisation, ML and neural networks, with project-based problem sets. The course is free to take; the certificate is an edX verified certificate, which costs extra.

Who it's for: Programmers wanting real CS foundations in AI, free.

Learning plan

About 80 hours of focused study, split into 5 phases. Pick your weekly pace and the timeline adjusts.

Estimated finish: 8 weeks

What the exam covers

DomainWeight
Week 0 – Search—
Week 1 – Knowledge—
Week 2 – Uncertainty—
Week 3 – Optimization—
Week 4 – Learning—
Week 5 – Neural Networks—
Week 6 – Language—

Source: official exam guide. Weights can change, so check before you start.

Before you start

  • Comfortable Python: functions, classes, recursion, dictionaries and sets. CS50P or CS50x week 6 level is enough
  • A GitHub account to submit projects with submit50, and a local Python 3 install or the CS50 VS Code codespace
  1. Weeks 1–2 · 18 h

    Search and knowledge (weeks 0–1)

    • Implement BFS, DFS, greedy best-first and A* search, and explain why A* with an admissible heuristic is optimal
    • Implement minimax with alpha-beta pruning for an adversarial game
    • Encode propositional logic and use model checking to infer facts

    Hands-on: Complete Degrees (shortest path between actors using BFS) and Tic-Tac-Toe (an unbeatable minimax player), then Knights and Minesweeper. Each must pass check50 before you submit.

    Use: CS50 AI Lecture 0 notes (Search) · Project 0a – Degrees · Project 0b – Tic-Tac-Toe · Project 1a – Knights · Project 1b – Minesweeper

  2. Weeks 2–4 · 16 h

    Uncertainty and optimisation (weeks 2–3)

    • Compute probabilities with Bayes' rule, joint distributions and Bayesian networks, and estimate PageRank both by sampling and by iteration
    • Model a constraint-satisfaction problem with node and arc consistency (AC-3) and solve it with backtracking search
    • Compare hill climbing, simulated annealing and linear programming

    Hands-on: Complete PageRank, Heredity (inferring gene distributions in a family) and Crossword (a CSP with arc consistency and backtracking).

    Use: Project 2a – PageRank · Project 2b – Heredity · Project 3 – Crossword

  3. Weeks 4–6 · 24 h

    Learning and neural networks (weeks 4–5)

    • Train and evaluate a k-nearest-neighbour classifier with scikit-learn and report sensitivity and specificity
    • Implement Q-learning for a game with an exploration/exploitation trade-off
    • Build and tune a convolutional network in TensorFlow/Keras, experimenting with layers, dropout and filter sizes

    Hands-on: Complete Shopping, Nim and Traffic. For Traffic, keep a short log of each architecture you tried and its validation accuracy on the German traffic-sign dataset, because the project asks you to describe your experimentation.

    Use: Project 4a – Shopping · Project 4b – Nim · Project 5 – Traffic · TensorFlow tutorials

  4. Weeks 6–7 · 12 h

    Language (week 6)

    • Write a context-free grammar and use NLTK to parse sentences and extract noun phrases
    • Explain attention and transformers, and visualise BERT attention heads to interpret what they learn

    Use: Project 6a – Parser · Project 6b – Attention

  5. Week 8 · 10 h

    Resubmissions and certificate check

    • Check your gradebook and resubmit any project scoring under 70%
    • Re-implement one search and one learning project from scratch without notes to lock in the concepts

    Use: CS50 Certificate requirements · CS50 AI academic honesty policy

You're ready to book when…

  • All 12 projects are submitted and each shows a score of at least 70% in your gradebook
  • You can explain minimax, A*, AC-3, Q-learning and backpropagation to someone else without notes
  • Your Traffic CNN reaches high validation accuracy and you can justify the architecture you chose

Exam tips

  • The free CS50 Certificate needs a score of at least 70% on every project. The edX verified certificate is a separate, paid option.
  • The academic honesty policy bans copying solutions or using AI tools other than CS50's own duck. Violations can cost you the certificate.

Related guides

Similar certifications

Coursera

Google AI Professional Certificate

Non-technical professionals who want the newest Google-branded AI credential, which goes further than AI Essentials.

$49foundationalActive