From may to august 2014, I took an internship at Infosimples and had the opportunity to take the course Intro to Artificial Intelligence taught by professors Sebastian Thrun and Peter Norvig, offered at Udacity. Covering a vast amount of subjects, its machine learning classes are without a doubt the most exciting ones. This article in three parts aims to pass along some of the knowledge acquired and demonstrate a few of the machine learning techniques taught during the course.
Artificial Intelligence and Machine Learning
Present in many different fields, artificial intelligence programs have been showing surprising results during the last years and are becoming a bigger part of our daily lives. It's possible to spot examples of intelligent programs that help professionals at hospitals, robotic facilities, the internet or even with finances. Besides some of the most known achievements, like the Deep Blue computer from IBM, that in 1997 defeated the chess world champion Garry Kasparov or the recently announced Google's self-driving car, there are thousands of other applications that use artificial intelligence to achieve the required level of performance.
An intelligent agent, as those programs are called, is capable of interacting with the environment and choosing its next action after analysing the received information. Building an efficient artificial intelligence program revolves around finding the best function that maps all the input and output data.
On most cases, the agent works at environments where it is extremely hard or sometimes even impossible to manually program a function that can work around every possible situation. Those difficulties are usually related to the environment being continuous and not discrete, stochastic instead of deterministic and partially observable instead of fully observable.
In situations like these, the use of machine learning in applications stands out with its high efficiency and the ability to cover an enormous amount of states without the need to individually program all of them. These applications require an additional step during development, called training, in which they are presented with the required information to be able to "learn" how to perform in the future.
Machine learning techniques can be split in three categories:
Supervised Learning is used to generalize the behavior of the program from a collection of known cases, so that it can perform correctly in any similar situation. A popular example is the classification of emails as spam: using a database of emails labeled as either being spam or not as reference, the agent should be able to recognize elements that may classify an email as spam. After learning from various examples, the program is capable of doing this classification for future email messages.
In unsupervised learning, there is no proper knowledge on how the data behaves and the used algorithms try to organize that data in patterns so that it is possible to classify them. The agent looks for an approximate way to describe the received information.
And last, there is reinforcement learning, in which there is a feedback about the obtained results, with positive rewards to the correct results and negative to the wrong ones. With this score, the agent can adjust its behavior to work on the desired way.
On the next parts of this article, there are two examples of simple applications using machine learning, one with supervised learning and another one with reinforcement learning.