Artificial Intelligence CS188

Artificial Intelligence is an increasingly important field of study with commentators divided on its potential impact on society.  It’s a subject I’ve wanted to understand better from a technical perspective for some time.  With that in mind, I recently enrolled on the Spring 2015 run of Berkeley’s upper division CS188 “Introduction to Artificial Intelligence” course.  Part 1 of CS188 is available online free courtesy of edX.  Although a few participants have baulked at its difficulty, the course is still widely regarded as one of the best MOOCs in existence offering a rigorous technical grounding in the subject:

“It is not simply the best course on AI ever made available online. It is the best course ever made available on any subject.”

Following CS188.1x over its three month duration has been demanding and difficult at times but ultimately very rewarding. It’s the first university level course I’ve undertaken in over 20 years which has inevitably led to reflections on the changes in academic approach over that period.

Here’s a flavour of what the course covers from the two course tutors Pieter Abbeel and Dan Klein:

In terms of broad outline, the course covers the following topics:

  • Uninformed Search: Depth-First, Breadth-First, Uniform-Cost
  • Informed Search: Greedy, A* , heuristics + optimality
  • Constraint Satisfaction: Backtracking, constraint propagation
  • Adversarial Search: Minimax, Alpha-Beta Pruning, Expectimax
  • Decision Theory: Maximum Expected Utility
  • Markov Decision Processes: Bellman equations, Value iteration
  • Reinforcement Learning: Q-Learning, exploration

Weekly video lectures cover the topics with follow-on homework and programming exercises consolidating the theory.  The material is always engaging but does get progressively more challenging as the course progresses.  For the Python-based programming exercises, the tutors have hit upon the ingenious ruse of using PacMan as a teaching aid.  They’ve constructed a comprehensive Tkinter-based Pacman game framework with pluggable search strategies which students are invited to implement.  Code submissions are evaluated by an automated grader that is available in script form for local testing prior to upload.

As you go through the course your Pacman becomes progressively smarter after training.  Here’s his performance with a simple feature extractor and no training:

After only 50 training runs with the same simple feature extractor, he is able to adjust weights assigned to features of different states such as closeness to ghosts.  The result is an easy win on the same grid:

An even more spookily efficient version emerges after 50 rounds of training with a custom refined feature adapter that ensures he detects and takes advantage of scared ghosts:

This advance in Pacman prowess is perhaps the most tangible evidence the course provides of the power of reinforcement learning in action.

CS188.1x finishes off with a 3 hour long Final which I sat online last week.   For the really keen, there’s also an option to submit a pdf copy of your Final paper to the online Gradescope grading system used by Berkeley.  By doing so you can compare your ranking against the current cohort of Berkeley CS students.

Although it is billed as an introduction, there’s a pretty high bar on the level of prior knowledge required to tackle the exercises.   It seems particularly important to have previous experience of Python and coding algorithms from pseudocode in several cases involving recursion. It’s presumably possible to manage without that background but it could be a struggle.

The pace of the course is fairly relentless with specific submission deadlines each week.  The course suggests some 15 hours per week. I ended up spending less but not by that much in some weeks and I have a fair degree of Python experience.   A key issue you are likely to face is finding the time and motivation during the week to ensure you don’t fall behind.  This can be a problem if you’re already working because there’s no leeway given for late submission.  If you miss a deadline as happened in my case in the first week, you score zero.   Progress can be tracked online to see what you achieved week by week and assess how far away you are from passing.

One of the major differences between doing this sort of course 20 years ago is the degree of support available online today.  The course supervisors set up a Piazza forum for participants to discuss difficulties and exchange ideas while undertaking CS188.1x.  It proved to be very helpful indeed.  On the downside, as a free course, there were no 1-1 tutorials or supervisions so it felt somewhat disembodied and lonely at times working through unfamiliar material outside of a collegiate environment at least in comparison with my experience of university campus.   The  Final also proved to be uncomfortable in another more unexpected way; it awakened long-dormant memories of anxious cramming in the run-in to university exams.  For these and other reasons, determination and perseverance are essential for staying with CS188.  These are important qualities to cultivate as early as possible anyway as evidence suggests they are correlated with longer-term success.

A brief browse through the catalogue of courses available on edX, Coursera and Udacity covering just Computing Science alone serves as a sobering reminder of the extent of material now available online to the curious, motivated student.  If you’re determined enough and have the time, it’s now possible to gain a strong grounding from leading academic institutions without physically being there or spending very much either.   That is perhaps the biggest change of all over the last 20 years.

On a personal level, I was pleased at completing the course and achieving a pass mark.   My final score was 82% just shy of a distinction but then I had to contend with the handicap of a particularly poor start having missed deadlines on the low-hanging fruit of Homework 01 and Programming 1 in the first two weeks:


That said, I will probably take a break before trying another MOOC, especially a university level one. Doing justice to the material requires that you start with a clear understanding of the level of commitment required to complete the course which will vary depending on your skillset going in.

Some personal take-aways based on my experience:

  • Great way to acquire university level education in new areas
  • Tremendous teaching material and great course tutors
  • Requires significant personal commitment and motivation
  • Timing can be challenging for anyone already in a job
  • Isolated learning experience compared with campus experience
  • The online forum Piazza is an invaluable resource & community
  • Ultimately rewarding and satisfying sense of achievement
2nd May 2015

Independent observations on technology with background links curated weekly.