An Introduction to Artificial Intelligence

Original article was published on Deep Learning on Medium

Artificial Intelligence will change lives. It will change the economy. It will change the world. Period. You hear about it on the news and you see Google and other tech companies come out with this ridiculously advanced products which make you think “Oh god, in 20 years I’ll have a terminator roaming around in my neighborhood”. Now, while I can’t say that that won’t happen I can at least say that this is not at all the case with today’s technology. Right now AI (Machine Learning more specifically) is just the wonderful love child between Computer Science and Calculus, not the predecessor to a terminator. So, with that said:

What is Artificial Intelligence?

AI, from a technical perspective, is any piece of software or algorithm that emulates some sort of intelligence. There are many different ways that scientists have achieved this. AI could be a set of hard coded rules that simulate some sort of logical reasoning, or it could be a set of instructions for how a video game character might behave. However, the AI that you see today, on your phone as an assistant for example, is powered by Machine Learning, and in the most impressive cases of AI it is most likely powered by Deep Learning.

See, Artificial Intelligence is a concept that encompasses a bunch of different methods and technologies. Machine Learning is one of them. And, inside Machine Learning there are a lot of other techniques, one of them being Deep Learning. You can think about it like this:

So, now…

What is Machine Learning?

ML is a technology or a set of algorithms that learn from data. With a Machine Learning algorithm a computer can analyze a dataset and learn the patterns within it.

Machines Can Learn from Data

This is part of the reason why data is considered so important now a days. The more data a computer consumes, the more it can learn its patterns and relationships using Machine Learning. Therefore, if a computer has a good ‘understanding’ of a dataset, it can start to ‘intelligently’ make predictions about it.

There are two main types of ML:

Supervised And Unspervised Learning

With Supervised Learning we feed a computer data that is labeled, a dataset that contains a set of data-points each associated with a particular label for example. Such as a dataset of houses consisting of data-points to describe the # of rooms, # of bathrooms, etc… and a label which describes the house’s price. If this dataset is then fed to a computer running a Supervised Machine Learning algorithm it can learn to predict what the price of some new house, whose information the computer has never seen before, will be.

With Unsupervised learning, however, we give the computer an unlabeled dataset and allow it to figure out how to label it. This might seem like a much more powerful technique, but it’s much more difficult to do.

Although, Machine Learning on it’s own didn’t prove that powerful to emulate intelligence when it came to much more complicated data and so… Deep Learning was born.

The Introduction of Deep Learning

Back in the mid 20th century some very smart people started to wonder what the best way to emulate intelligence would be and that naturally led to the question: “Hey, what’s the most powerful form of intelligence we know of?”. The answer, of course, being:

Our Brain!

And so the first attempts to model our brain in a mathematical way started to come to fruition.

The Perceptron

The perceptron was the model that arose from trying to recreate a neuron from our brain. From what our high school biology classes tell us, a neuron has multiple inputs from other neurons and based on these inputs the neuron either fires off or it doesn’t. As you can see from the image above, the same idea applies. The perceptron has some inputs and then based on those inputs it gives a certain output.

Neural Networks

So now, we structure these perceptrons in layers and we get something that roughly resembles what our brain looks like. This is how we get the almighty neural network.

A neural network like this is what’s behind most applications of AI today, albeit in much more complex structures. It takes as inputs various data-points and feeds that data through the network and at the end it outputs some numerical value.

Through algorithms that take advantage of certain concepts in calculus, it is possible to get neural networks to learn much more complicated patterns in data than what the classical Machine Learning algorithms allowed.

For example, if a neural network that was trained to learn the patterns in a dataset of pictures of cats and dogs It will output some value that represents the neural networks confidence on wether the picture that is fed through as an input is a picture of a cat.

You can play around with building a neural network and training it to see it’s results with this demo made by the Tensorflow team at Google:

So, whenever you hear or read the words Deep Learning, now you know it’s very likely referring to neural networks or some of the more complex versions of it, such as convolutional neural networks or residual neural networks.

Most of the time they will be applied to stuff such as your voice assistant to recognize your speech, or by companies like Google or Spotify to learn what you like and recommend you content you’ll probably enjoy. It’s also what’s behind Tesla’s autopilot.

Reinforcement Learning

Now, there’s this other branch within Artificial Intelligence which is not necessarily connected to ML & DL, but which can be. Reinforcement Learning offers a different paradigm to create models that can learn the patterns within data that is not strictly as black and white as images of cats and dogs. It is often, and most prominently, used to create agents that can play video games and solve puzzles.

The main idea behind it is defining a reward system specific to the problem at hand and applying an algorithm which learns how to maximize that reward. This approach can lead to some very interesting applications.

OpenAI, a General Artificial Intelligence company co-founded by Elon Musk, does some of the most impressive work in this field. Check out this video for example, and their Youtube channel for some of the other projects they’ve created:

Explore It Yourself

Explore some other projects that showcase just how impressive this technology can be by following these links:

Credit goes to everyone who created those demos.

So, to wrap up, Artificial Intelligence is just one big concept which refers to a bunch of different techniques for trying to emulate some sort of intelligence. In most cases it’s neural networks, Deep Learning and Machine Learning what’s behind the applications we see everywhere around us. From where we stand, it’s very unlikely this will transform to Terminators in the future but that doesn’t mean this technology won’t take us to some very interesting places.