Machine Learning

This was one of the most fun classes I took at Stanford. It is a good mix of theory and practice. The course webpage can be found here. The lecture notes can be found here.

Class project: Reverse Image Search

Our class project implemented a reverse-image-search algorithm! You give my code an image and my code tells you what it contains! It consisted of extracting features of an image and suggesting suitable tags for the image based on these features. This technology can be used to perform internet search using images. The project slides are available here.

Fun Assignments

  • The first fun was when I built a spam email filter using Naive Bayes. This was then refined using SVM classifiers.

  • Later, we used K-means to reduce a 256 x 256 x 256 color picture in to 16 colors, thus compressing the picture.

Reinforcement Learning

We wrote a code that learns how to control a cart (move left or right) so as to balance a vertical pole on top of it. A matlab simulation video of my assignment is shown below. The technique is called reinforcement learning (chapter 12 of lecture notes)

Fun fact on google image search

Search the cryptic tag "241543903" on google images. The first image you find is this:

The remaining images are of course very funny!
See for yourself! Click here! Kudos to the unknown creative person who found this nice hack of google's image search!
Or maybe it was a google employee who was clever enough to realize that something like this is good marketing and publicity for google, and therefore decided to do this! Who knows? Google maps directions has come up with "swim across the pacific ocean" if you ask driving directions from Japan to North America.

The A* Search

Just finding food to eat, but finding it real fast. Our first hello Pacman algorithm in the AI class @stanford. Seems Pacman is our world.


Alright, time to upload my GRANDPAC! This is a CS221 assignment at Stanford! It's amazing to watch Grandpac track the position, find and eat the invisible ghosts!

Avoid Ghosts! Intelligent PacMan!

Now it's time to show the ghosts how intelligent PacMan is! He learns really fast that he should not hit the ghosts! Wow! Look at him play with the ghosts on his quest to maximize his rewards! A nice application of Markov decision process and approximate q-learning based on simple features like closest food, closest ghost, etc. So much in just 6 lectures of my AI class! Neat!