Prerequisites

PywEAI

Welcome to this course on AI, where we'll take you through the basics of what AI is, how it's created, and how it'll look in the future.

We've made a special AI chatbot just for this course. Let's ask it a question.

Q: What's the answer to life, the universe, and everything?

//Output Below

PywE-AI: Deleting everything... Done!

Oh, that didn't work out so well. Unfortunately, AI isn't that easy to master. Let's see why!

AI

AI stands for artificial intelligence. That's just a fancy way of saying it's intelligence created by humans.

There's a particular term for machines that have artificial intelligence. Can you guess what it is?

That's exactly it. Agent just means it's something that carries out an action.

Intelligence

When we talk about intelligence, we're referring to the ability of gathering, processing and then applying knowledge.

Let's put out the steps again.

  1. Gathering data
  2. Processing data
  3. Applying gained insight

Exactly! That's the primary loop any intelligent agent or biological animal would go through.

AI Caliber

But intelligence doesn't always have to mean something groundbreaking.

The truth is there are different types of AI, all varying in their level of intelligence. 

Ubiquitous

AI is already integrated into many applications we interact with on a daily basis, without really being called AI. 

If we take a closer look, we can see that AI is all around us, just not as intelligent as science-fiction stories portray it to be. 

ANI

The first and most basic form of AI is ANI, or artificial narrow intelligence.

It's called narrow because it can only perform tasks in specific, predefined contexts.

ANI definition

Narrow AI can do a task it was programmed to do incredibly well.

But it gets confused if you present it with new tasks that weren't previously defined and programmed. 

Narrow AI

Narrow AI can take a lot of different forms. 

Let's list out how many of these examples would be considered narrow AI.

Yup! All of these are examples of narrow AI. Even though self-driving cars are very sophisticated, you can't tell them to do anything else.

Chatbots

Just because narrow AI is limited, doesn't mean it's not useful. Many companies use ANI chatbots for customer service. Some AIs are writers.

Q: Write me a poem.

//Output Below

PywE-AI: 
Roses are red, violets are blue, 
I'll someday be a better poet than you

It's also very likely you've recently read something created by an ANI.

Alan Turing

Chatbots are some of the first AIs that have attempted to pass a famous artificial intelligence test.

It's called the Turing test, named after its creator, Alan Turing.

Turing test

In the Turing test, a human judge has a conversation with another human and a machine. 

If the judge can't tell which is which, the AI has successfully passed the test. 

General AI

Passing the Turing test is one thing, but researchers have their sights set higher. 

They want to create AGI, which is short for artificial general intelligence

AGI

General intelligence will parallel human level intelligence.

What do you think general intelligence implies?

Exactly! AGI will be able to perform general tasks without assistance and figure out solutions on its own.

Problem step

Which step might be in the way of getting from narrow intelligence to general intelligence?

Exactly! Processing data is our current limitation. We're not sure how to make machines think the same ways humans do.

ASI

Once we figure out AGI, we'll be able to quickly move to the next step: ASI, or artificial super intelligence.

ASI is the one everyone is worried about since it would be something way smarter than most humans. We'll talk more about that later.

Building blocks

To reach artificial general intelligence, researchers are working towards advancements in a few different fields.

Let's talk a bit about these fields since they're the building blocks for many types of AI.

Natural language

AIs are more useful when we can communicate with them easily. For that, they need natural language processing, or NLP.

NLP is something we use every day when we ask one of our devices for the weather, the time, or to call mom.

Idioms

With natural language processing, researchers make machines understand things just like a human would. But that's harder than it sounds.

What phrases do you think would be a problem for an AI to understand.

Exactly! AIs need to be very sophisticated to understand things like figures of speech without taking them literally.

Learning

Speech recognition is excellent for getting input, but machines also need to learn from gathered data.

For that, there's a whole domain of AI called machine learning. Machine learning is such a vital step that it's often confused for AI.

Machine learning

The simple version of machine learning is this: we give a machine a lot of data regarding a topic. Let's say images of cats.

After showing it hundreds, or even thousands of cats, we then give it a test. For example, asking it to name the animal in this picture.

Answer: cat

//Output Below

True

We know we've succeeded when the machine can recognize a concept on a regular basis.

Representation of data

AI's also need ways of representing data. Better said, they need a way of storing information, accessing it and comparing it.

Good data representation allows AIs to make better decisions.

Many ways

But how can AIs represent decisions in a comparable way that allows them to see the pros and cons each option offers?

           A 
          / \
         /   \
        B     C
       / \     \
      /   \     \
     D     E     F

We can think of decisions as branching off into different possible outcomes. We can then represent them in something called a decision tree

Decision tree

For example, we can use a decision tree to plan a trip from Accra to Tamale. 

Which branch allows us to get there and take the least amount of decisions?

       Accra
        / \
       /   \
    Kumasi   Tamale 
     / \
    /   \
Ho  Tamale

Exactly! This allows us to see which option has the fewest steps. This doesn't always mean it's the right decision though.

Tic-tac-toe

More complicated versions of decision trees are used in all kinds of applications. That's what AIs use to win at tic-tac-toe or chess.

What decision would lead to a winning game for X?

Exactly! AIs use similar methods to make decisions all the time.

Reasoning

AIs also need to come to logical conclusions through reasoning

Many instances of reasoning in AIs is done through propositional logic

Propositional Logic

We use propositional logic to simplify language into small parts and then give them values like true or false.

If I stay inside then I'll be bored.
   |___________|      |___________|
         A                  B

In this example an AI can then judge the truth value of A and B separately and then the truth value of the entire sentence.

Detail

But using things like propositional logic and decision trees requires a lot of computing power due to the level of detail.

Current hardware limitations mean it would take very long to reach any conclusion.

Intuition

For that reason, researchers are also looking into making AI that can have human-like intuition

AI intuition is still a theory, but it would help machines solve uncertain situations where there isn't enough data, or there's too much.

AGI

As researchers make progress on all of these fronts, AGI becomes more of a reality. 

And as soon as that becomes a reality, we'll quickly move towards the next step, artificial superintelligence.

Super AI

Artificial narrow intelligence can be impressive, while artificial general intelligence will probably change the way we live. 

But both can't compare to the future of AI, artificial super intelligence. Let's see what would be needed to reach that level.

Progress

The path toward super intelligence will probably be a way shorter than the one from narrow to general intelligence.

Let's add ANI, AGI, and ASI into this timeline.

AI development timeline:
 
ANI                  AGI 
 |____________________|_ ...
                       |
                      ASI
 

Notice how ASI is right after AGI? There are a few reasons for this.

Field advancements

Researchers are continually gaining ground in all domains of AI, from machine learning to reasoning, or knowledge representation.

Computational power

So what are some steps necessary for advancing AI technology? One of the first steps is to improve computational power.

Luckily, the computational power of hardware is accelerating at a steady and exponential rate.

Moore's law

It's so steady that it's even given rise to a theory known as Moore's law.

The law says that computational power doubles every two years. This law has been very accurate so far.

The brain

The next step is improving software. One of the main ways of doing that right now is by mimicking the brain through neural networks.

Neural networks mimic the brain by storing small amounts of information in each neuron.

I/O

Neurons activate from Input to Output. In this diagram, it's from left to right, while they look for information that matches the input.

Input  ->   ...   ->  Output 

That's it! Let's look at another example.

Neural networks

Neural networks can be complicated, but here's a simplified version: They split information into a lot of smaller pieces.

Can you guess the number at the end of this network?

  • 9

Exactly! We can see that the combined two neurons form the number 9.

Neurons

When we get input in the first column, we then compare it to the neuron in the next column and the next column after that.

We do this until we get to the output layer and find the best match. This system is similar to that of the human brain.

Evolution

There's only so much we can do to develop AI. After we provide the hardware and advanced software systems like neural networks...

... AI will have to carry on the work by itself through evolution. That is where genetic algorithms come into play.

Genetic algorithms

Genetic algorithms work via survival of the fittest. A set of algorithms are created to solve a problem. 

The most successful ones are carried over to the next generation and crossed over to create better versions of the algorithm.

Evolve

Eventually, one of them is successful in not only solving the problem but doing so in an optimal way. That will be the fittest algorithm.

It's through techniques like these that AGI will eventually develop into ASI.

Explosion

AI will then be able to evolve by itself faster than we could ever create it. Researchers call this stage an intelligence explosion.

It's when the switch from artificial general intelligence to superintelligence will happen almost instantaneously. 

Bostrom

We're not sure if ASIs will be a good or bad step for humankind.

Nick Bostrom, a leading AI expert, calls it an "extremely difficult problem with an unknown time to solve it". 

The important part is you know about it now, and you can also help humankind figure that out.