Chapter 7. Artificial Intelligence

Intelligence is the ability to adapt to change.

—STEPHEN HAWKING

THERE HAVE BEEN MANY books written on artificial intelligence (AI)—this is not one of them. You can skip this chapter and still design and create bots. Since AI is the technology that underpins bots in several use cases, however, we will provide an overview of common AI services and how they can help you build and design a bot.

Artificial intelligence is commonly mistaken as the essence of bots. Some people confuse and interchange bots with AI. Let’s correct this misconception and talk about what AI is and how it can be integrated into a bot to make it awesome.

According to Wikipedia (https://en.wikipedia.org/wiki/Artificial_intelligence, as of December 2016):

Artificial intelligence (AI) is intelligence exhibited by machines. In computer science, an ideal “intelligent” machine is a flexible rational agent that perceives its environment and takes actions that maximize its chance of success at some goal.

Sounds a lot like the way we’ve described a bot, right? Wouldn’t it be great if the service we were building could be automagically converted into this intelligent agent that converses with us like a smart little friend and makes our lives so much better?

The secret to understanding why this is not the case is in the key word of this definition: “ideal.”

Currently, we are very far away from this ideal, and while AI has several useful applications, it is far from the intelligent ...

Get Designing Bots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.