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.

Build my CS 221 study plan

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 — which 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.

  6. 6

    Cover the breadth with Fennie

    Upload your CS 221 syllabus and Fennie's Daily Plan paces each unit's formalism and homework across the quarter so no paradigm gets crammed, with quizzes generated from the actual course content. It's free to start.

    Start my CS 221 plan free

How Fennie helps with CS 221

Fennie's Daily Plans pace CS 221's paradigm-a-fortnight breadth so each formalism is solid before the next arrives, with homework deadlines tracked across both their math and coding halves. Chat through casting scenarios as search problems or MDPs — the modeling skill the exams actually isolate.

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.

Pass CS 221 with a plan, not a cram

Upload your CS 221 materials and Fennie generates a Daily Plan paced to your deadline — plus chat, flashcards, and quizzes built from the actual course content.

Get started free

More Stanford courses