- Every time you interact with a computer
or you're on the internet,
there's algorithms involved.
Your dishwasher has a microchip
running algorithms about
what cycle to run and when
and for how long,
and are things clean now.
And so does your microwave, et cetera.
An algorithm is the
sequence of instructions
that tells the computer what to do.
The instructions that comprise
an algorithm can be anything
from very simple to very complex.
And in computers,
the algorithms are built
up of smaller algorithms.
Large algorithms have
small algorithms that have
even smaller algorithms inside them.
All the way down to
these basic operations.
A large instruction can be,
take this scene and render it.
In a Pixar movie I have all my objects.
I have the scenery,
I have the characters moving.
And this is all just data on the computer,
but at some point it has to be rendered.
And there's an algorithm that does that.
The common one is called ray tracing.
It's basically an algorithm that traces
where every ray of light
would go in the scene,
until they actually hit the virtual camera
and you see what it's doing.
So that's an example
of a very complicated,
very expensive algorithm.
Algorithms are actually
almost as old as humanity.
The Babylonians had
algorithms to compute things,
'cause they needed to.
As soon as there was agriculture
and there were cities and
you needed to do accounting,
you needed to keep track of things.
You also needed to try
to predict, for example,
how the stars would move
in the sky and what not.
So from the earliest days
there have been algorithms.
Algorithms that you might
call modern algorithms,
emerged in the 19th century
when Charles Babbage
tried to build the first
computer out of mechanical gears.
And Babbage and his
collaborator, Ada Lovelace,
started designing algorithms or
what today we would regard as algorithms
for that primitive computer to do things.
It never actually got built, but you know,
those algorithms could run
on a computer of today.
Then computer science really took off
at the end of World War II.
Because that's when the first
real computers were built
out of vacuum tubes, out of valves.
And then, for example,
the earliest applications were military.
You would have tables to compute,
at what angle you should point the canon,
so that its shells would
land in the right place.
This was a really crucial
application, as you can imagine.
Or where to point an
anti-aircraft battery,
so that it actually hit the plane.
You had to point it, not
at where the plane was,
but where the plane was going to be.
And then in the '50s
computers started expanding.
In the beginning they
were big and expensive.
Although by now they were
made of semiconductors.
And you know, algorithms for
doing all sorts of payroll
and you know, inventory
management and optimizations,
scheduling production on one side.
And then on the other side in science,
a lot of algorithms were developed.
They were really just the
implementation on the computer
of the models that
scientists had of the world.
Of how the atmosphere works,
of how things move, and so on.
And both of those of course have continued
and have grown exponentially.
And now there's these algorithms for
an infinity of other things besides.
One very prominent example
of an algorithm today is
a search engine.
The Google search engine is
an algorithm that takes in
some keywords that you
type into a search box
and returns the webpages
that you want to see.
And a lot of that algorithm consists of
what is called signals.
Signals are different things
that you can compute from the
query, from what you
know about the person,
from the context, from anything.
There are hints about what it
is that you're looking for.
So the search engine computes
a lot of these signals
and then combines them to
rank the pages on the web
as to how much you like them.
One example of a signal
that is very famous,
is the Google page rank algorithm.
That says, you are more likely
to be interested in a page
if it has a lot of links pointing to it.
And the pointing page in itself,
is more important to have
more weight if it has
a lot of links pointing to it.
Another example is Amazon, right.
They have algorithms for
predicting what you like.
They also have algorithms
for doing what is called
demand forecasting.
Which is how much of each
item are people going to want
to buy in the near future and where.
So they can put those
things in the warehouses.
And even these days,
they claim that they can
predict what you want so well,
that they will put it on a truck
before you've even ordered it.
We are heading into a new
age in the same way that
the Industrial Revolution was a new age.
Because it led to the automation
of physical work, right.
Machines replace our muscles.
The automation of intelligence.
And if you think about that,
this is a very powerful thing to do.
Something that used to take
human thinking and labor to do,
now can be done by an algorithm.
The reason Amazon can have
personalized recognitions
for everybody, is that
they don't employ people
figuring out what each one of us wants.
'Cause that would be completely hopeless.
It's that it's done by algorithms.
So algorithms, they decrease
the cost of intelligence
dramatically, as a result of which there's
far more intelligence in the world today
than there was before.
And this is going to continue.
We're only at the start of this process.
