What I Learned about AI from Stanford’s AI Class

jeffheaton's picture

From October through December 2011 Stanford University offered three of their most popular classes online. These classes were offered for free to anyone who chose to participate. The first class offered was “Introduction to Artificial Intelligence”, taught by Sebastian Thrun and Peter Norvig. Both highly accomplished researchers and members of the faculty at Stanford. Following on the huge amount of interest in the AI class, two additional courses were announced as well. A course on databases, as well as machine learning was also announced.

I am the lead developer for the Encog Machine Learning Framework, and have written several introductory neural network books. Naturally these courses would be of interest to me. I focused on the AI class. I chose it over the ML class because the syllabus looked the most "foreign" to me. I had not done much with Bayesian networks, and they seemed to be featured prominently on the AI class. The ML class looked much closer to the "AI" that I was already familiar with.

Course Content

A review of the syllabus showed me that it would cover many areas of Machine Learning that have yet to be incorporated into Encog. The syllabus is shown here.

Date Content Assignment/Exam
Week of Oct 10 Overview of AI, Search Assignment 1 due Oct 17
Week of Oct 17 Statistics, Uncertainty, and Bayes networks Assignment 2 due Oct 24
Week of Oct 24 Machine Learning Assignment 3 due Oct 31
Week of Oct 31 Logic and Planning Assignment 4 due Nov 7
Week of Nov 7 Markov Decision Processes and Reinforcement Learning Assignment 5 due Nov 17
Week of Nov 14 Hidden Markov Models and Filters MIDTERM EXAM Nov 19-21
Week of Nov 21 Adversarial and Advanced Planning Assignment 6 due Nov 30
Week of Nov 28 Image Processing and Computer Vision Assignment 7 due Dec 5
Week of Dec 5 Robotics and robot motion planning Assignment 8 due Dec 12
Week of Dec 12 Natural Language Processing and Information Retrieval FINAL EXAM Dec 16-18

The free online Introduction to Artificial Intelligence is based on Stanford CS221, Introduction to Artificial Intelligence.

We were graded on home works, a mid-term and a final-exam. There were also quizzes to check your progress as you watched the video instruction that made up the class, however, these quizzes did not count towards your grade. The quizes simulated the processor calling on someone in class just to see if everyone is following. There were eight homeworks, with only six counting, as the lowest two scores are dropped. I found the graded aspect of the course to be very helpful. It is very easy to simply watch a video and only half-way understand.

There were students with a very wide array of background. As a result there were numerous complains about the difficulty of the class. Particularly that there was not enough information always in the book or videos to answer the questions. I felt all of the assignments were fair. Occasionally clarifications were posted, but often the misunderstanding were students simply trying to "over think" a question. The questions were challenging. For students without a Computer Science background, I can see where the course would be particularly challenging.

Bayesian Networks

The primary thing I learned from this class was Bayesian Networks. The professors of this class seem particularly interested in probabilistic AI. This is a major area of research in AI, it was also an area that I had limited experience with. Because of this I set out to learn Bayesian networks as best I could during the class.

My own background in AI is more along the lines of neural networks, support vector machines, genetic algorithms and other stochastic learning methods such as simulated annealing and particle swarm optimization. As a result Bayesian theory and probability was somewhat new to me. This made the class somewhat difficult at first. I also implemented each of the AI algorithms introduced. This helped greatly. I really do not feel like I’ve learned an algorithm until I’ve implemented it. I resolved to add each algorithm to Encog as the course progressed through. For the most part I kept up with this goal. I was able to implement many of the algorithms and use Encog to check my homework. This was not cheating, as we were encouraged to write programs if we desired. There were no required programs in the course.

Three technologies that I quickly incorporated into Encog were all of Bayesian origin. Specifically, the next version of Encog will include support for the following new machine learning methods.

  • General Bayesian Network
  • Naïve Bayesian Network
  • Hidden Markov Model

I will soon write an article explaining specifically how Bayesian Networks were added to Encog and how to use them. They are used for similar purposes as a classification neural network; however, they go about the task in a completely different way. Bayesian networks address some of the most common questions I frequently receive about neural networks.

  • How do you deal with missing data in a neural network?
  • How do you find out how sure a neural network is of its answer?
  • How did the neural network derive its answer, what was its logic process?

None of the three questions have particularly good answers with neural networks. Bayesian networks solve them quite well. I also went beyond what the class offered to add additional Bayesian training algorithms, such as K2, to Encog. Bayesian networks will be formally added to Encog 3.1. I’ve also implemented Bayesian networks in such a way as they are mostly interchangeable with neural network, or support vector machine, projects.

Robotics and Computer Vision

Robotics and computer vision were another area of fairly heavy focus for the class. Robotics, and in particular its application to self driving cars, seems to be the passion of Sebastian Thrun. Several class sessions focused on Robotics and Computer Vision. These are two areas that I do not know a great deal about.

We learned about planning and the Markov Decision Process (MDP). Robotics is interesting because it is very random and imprecise. If I tell the computer to draw a 90 degree 300 pixel line across the screen, I know I will get a 300 pixel line. If I get a 95 degree 250 pixel line, I throw away my video card and buy a new one. Not so with robotics. The amount of turn, movement forward, and any other command may not be fully carried out due to terrain the robot is own. So with robotics it is a constant balance of issuing commands and evaluating their effectiveness.

Though it is a separate discipline in its own right, computer vision is typically used with robotics. The course spent quite a bit of time explaining the optics of cameras and the effects of varying focal lengths and other parameters might have on the inverted image produced by the camera. For many cases this information might be too low of level. However, if you are using two cameras in a “stereo vision rig”, knowing the optics allows the program to perceive depth.

I do not have a great deal of interest in robotics. I use AI mainly for data mining. Yet I found these two class sessions to be a very interesting introduction into this area. I will likely create a few Encog examples based on these class sessions. While I am not directly interested in robotics, this class session did introduce a very fascinating topic called particle filters.

Particle Filters

Particle filters is a machine learning technique that is typically used for robot localization. This assumes that the robot is “lost” on a known map. The robot must use what sensory information it has available to determine its location. As opposed to the more mathematical machine learning methods learned earlier in this course, particle filters were very simple. A typical particle filter can be implemented in less than ten lines of code.

Particle filters have found applications in finance. Basically the idea of a particle filter is you have a complex system with a hidden state. For a robot, this hidden state is the location of the robot. But for finance, this state might be the strength/weakness of the entire market or a security. This state is guessed at using publicly visible states. For finance this might be the prime interest rate or some other indicator. I plan to explore this area further with Encog examples.

I did not implement a particle filter. It is defiantly on my list of things to do with Encog, but time did not permit. A few of the homework questions I missed were related to particle filters. My own learning style benefits greatly from actual implementation of the topics taught in class.

Natural Language Processing

Natural Language Processing (NLP) is a fascinating area of AI that is dedicated to allowing computers to gain understanding from written text. NLP is very important in many areas of AI, from robotics to data mining.

One class session was devoted to Natural Language Processing. There was not sufficient time to go to deep into this topic. However, a good introduction was presented. Two major “fields of thought” were introduced. On one hand you could use probability to analyze the words. The other camp sought to specifically analyze sentence structure. The professors preferred the probabilistic approach to NLP.

Conclusions

The course was a fair amount of work. For me the areas that I enhanced Encog to support were the areas that I did the best in. Bayesian theory, Hidden Markov Models, and logic were all areas that I enhanced Encog to support. I did well in these areas. Game theory and particle filters were where I lost a few points. I actually really like particle filters, just have not gotten around to programming one.

My final class score is homeworks: 99/100, Midterm: 100/100, Final 90/100.

I look forward to trying another course through Stanford. Right now these are the two I am considering.

http://www.nlp-class.org/

http://www.pgm-class.org/

Comments

Your thoughts on "AI" class ...

MarkSamuelTuttle's picture

I know the instructors and staff will be trying to introduce "programming" into the next version of the class, for all the reasons you enumerate in your writeup and more.

If you are so inclined you should share your thoughts on this with the instructors.

Thanks,
--Mark


Copyright 2005 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.