Here are some suggestions for how to prepare for ECS170: Artificial Intelligence.

The course covers a diverse range of approaches to AI, including search, knowledge representation, graphical models, machine learning, reinforcement learning, and natural language processing. It’s one of my favorite classes to teach, and I hope you enjoy it too.

At the time of writing (2024), the official course prerequisites only include introductory programming. I try to make the class accessible to students with a wide range of backgrounds. Even if you can’t prepare in all of the areas below, you can still succeed in the class. This guide is for students who have time on their hands and want to get a head start.

Check back for updates!

Programming

When I teach the course, I recommend (and sometimes require) students use Python for the programming assignments.

You’ll have an easier time in the class if you’re generally comfortable writing software in Python. This would include knowing things like:

  • Basic Python syntax
  • Control structures (if, for, while, …)
  • Basic object-oriented programming (classes, objects, methods, simple inheritance patterns, …)
  • Data structures (lists, dictionaries, sets)
  • Structuring code into functions, modules, and packages

This is hopefully covered by the course prerequisites, but if you’re not comfortable with these topics, you might want to brush up on them.

Programming Tools and Habits

  • Be comfortable in a shell (bash, zsh, etc.)
  • Be comfortable with a text editor (VSCode, Sublime, Atom, Vim, Emacs, Cursor, etc.)
  • Try out a Jupyter notebook, locally or on Google Colab

Some reading on this topic:

  • The Pragmatic Programmer (Hunt and Thomas)
  • The Clean Coder (Martin)
  • Clean Code (Martin)

Python Libraries for AI/ML

We may use some or all of the following libraries in the course. Studying these could be hit or miss since I don’t know exactly which ones we’ll use.

  • Numpy
  • Scipy
  • Matplotlib
  • Pandas
  • Scikit-learn
  • PyTorch
  • Tensorflow
  • SpaCy
  • NetworkX

Math

The course material will involve math from the following areas. Again, I don’t expect you to know all this stuff coming into the class.

  • Calculus (derivatives, integrals, multivariate calculus)
  • Probability and statistics (ECS132 or equivalent)
  • Linear algebra (MAT22A or equivalent)
  • Optimization (MAT168 or equivalent).
    • (I definitely don’t expect students to come in with this experience. But if you really want to prepare, you could look into things like gradient descent.)
  • First-order logic (ECS20 or equivalent)
  • Graph theory (ECS20 or equivalent)
  • Computational complexity (ECS060, ECS122A or equivalent)

Official curriculum here:

https://cs.ucdavis.edu/schedules-classes/ecs-170-introduction-artificial-intelligence

The official textbook for the course is: S. Russell and P. Norvig, Artificial Intelligence

We usually read a subset of chapters from this book. Reading the introductory chapters could be a good way to prepare for the course.