Artificial Intelligence (AI) and Machine Learning (ML) are often used interchangeably, but they are not synonyms.
In a previous post, we defined AI as a term describing machines performing “cognitive” tasks. These tasks could be: transcribing speech into text, playing chess, and even navigating a vehicle through traffic.
So they question we want to answer now is: How can we get machines to perform these intelligent tasks?
One approach is to try to figure out how humans behave, codify those behaviours as rules, and then program the machine with those rules. The main problem with such Expert Systems is that the number of rules (and exceptions) becomes unmanageable very quickly.
Let’s say we want to build an autonomous car.
Using the Expert System approach, here are a few of the rules that would need to be pre-programmed:
-
Whenever a red circle appears in the top right corner, press the break pedal until the car stops.
-
When the road bends to the left, rotate the steering wheel by 3 degrees, until the car is parallel with the white lines delimitating the road. Then, rotate the steering wheel to the centre position.
-
When stopping, apply gradual pressure on the brake pedal, unless the obstacle in front is closer than the normal braking distance.
-
When a large object is approaching, rotate the steering wheel in any direction in order to avoid collision.
We can easily create hundreds of these rules, and still not have a roadworthy autonomous car.
So, is there another option?
The alternative is to have a human driving through real traffic, and record the following data points every second:
- external factors:
- the current speed of the car
- the relative position of the other vehicles (left, right, front, back)
- the actions taken by the driver:
- the position of the steering wheel
- the position of the acceleration pedal
- the position of the brake pedal
After a few thousand miles worth of data, algorithms can be used to determine how to predict the actions the driver would take when new information is provided (i.e. determine the position of the steering wheel, based on the current speed and relative position of the other cars in traffic).
This is Machine Learning. It’s the process by which computers can learn without being “explicitly” programmed.
Instead of pre-programming the machine, we “expose” it to Training Data, and let it extract the rules by detecting patterns in this data. The programmer is not involved in the decision process and the system gradually improves with more training data.
If you think this sounds a bit magical and almost like a cheat compared to Expert Systems, welcome to the club. Yet, this is very similar to how humans improve their driving skills. More hours spent at the wheel lead to faster reactions and better car positioning in edge cases.
If you are interested to find out more, Mark Riedl has a tutorial on building a simplistic autonomous car using Machine Learning. George Hotz took this a step further and build a fully functional self-driving car, all by himself! (The OpenPilot code can be found here.)
So in simple terms, Machine Learning is one of the most effective ways to build AI applications. There are other methods to achieve the same goal, and Pedro Domingos has a great talk describing these approaches.
tl;dr
If AI is the “what”, ML is the “how”.