Skip to main content
Stanford
Computer Science
4 credits

Stanford CS 221: Artificial Intelligence: Principles and Techniques

CS 221 is Stanford's broad AI foundations course: search, Markov decision processes, reinforcement learning, games, constraint satisfaction, Bayesian networks, and a taste of logic, with homeworks mixing math and substantial coding. It's the survey that maps the whole field before the deeper 22x courses.

Fennie is independent and not affiliated with Stanford University. This is an unofficial study guide.

What makes it hard

Breadth is the difficulty: each unit introduces a new modeling paradigm with its own formalism, and the homeworks demand both correct math and working implementations on the same deadline. The recurring exam skill is modeling, taking a messy scenario and casting it as a search problem or MDP. That skill is harder than executing any single algorithm.

What you'll cover

  • State-space search and A*
  • Markov decision processes
  • Reinforcement learning
  • Game playing and adversarial search
  • Constraint satisfaction problems
  • Bayesian networks

The CS 221 study guide

How to study for Stanford CS 221, step by step.

  1. 1

    Master each paradigm's formalism completely

    Every unit is a modeling language: states, actions, rewards, factors. Learn each one's components cold, because the course's recurring question is 'cast this scenario in the formalism.'

  2. 2

    Practice modeling, not just solving

    Take scenarios and define the state space or MDP yourself before touching algorithms. Exams put their weight on the modeling step, and it's the part homework templates do for you.

  3. 3

    Budget homeworks as math plus code

    Each assignment has written derivations and a real implementation, and they fail on different schedules. Start the written part early; start the code earlier.

  4. 4

    Keep the prerequisite math loaded

    Probability from CS 109 and big-O maturity get used without ceremony. A weekly hour of refresher on probability manipulation pays off across every unit.

  5. 5

    Connect the units to each other

    Search becomes MDPs become RL as uncertainty enters. Build the through-line explicitly. Exam questions love the boundaries between paradigms.

Today

Today's CS 221 plan

Preview
65 min

What a Fennie Daily Plan looks like for CS 221. Yours is built from your own syllabus and adapts every day to your deadlines and progress.

0 / 4 done~65m remaining
Keep this plan free

First plan free, no card required. Fennie is independent and unaffiliated with your school.

FAQ

Is CS 221 hard?

The breadth is the challenge: five-plus modeling paradigms in ten weeks, with homeworks demanding correct math and working code simultaneously. Students with solid CS 109 probability and honest weekly pacing manage it; crammers meet a wall of formalisms.

Should I take CS 221 or CS 229 first?

They're complementary, not ordered: 221 surveys all of AI (search, MDPs, RL, CSPs, Bayes nets) while 229 goes deep on machine learning specifically. Many students take 221 first for the map, then 229 for the depth, but the reverse works fine.

How much coding is in CS 221?

Substantial. Homeworks include real implementations of search, MDP, and RL algorithms in Python, alongside written derivations. Programming maturity at the CS 107 level is assumed; the code itself isn't the hard part, the modeling is.

More Stanford courses