Home / Artificial Intelligence / Artificial Intelligence: What is an algorithm, anyway?

Artificial Intelligence: What is an algorithm, anyway?

Artificial Intelligence:

Mashable’s series Algorithms explores the mysterious lines of code that increasingly control our lives — and our futures.


“The Algorithm” is impenetrable. It’s mysterious, it’s all-knowing, it’s omnipotent. Except that it’s not. 

An algorithm is a simple concept that, today, has many complex manifestations. Algorithms’ central and opaque position at the heart of social networks like Facebook cause some to view algorithms in general with a sort of mystical reverence. Algorithms have become synonymous with something highly technical and difficult to understand, that is either an arbiter of objective truth, or, on the other end of the spectrum, something wholly untrustworthy.

But when people refer to “the algorithm” — whether Facebook’s or another tech company’s recommendation algorithm, or just “algorithms” in general — do they really know what it means? Judging by how widely the term is used and misused, most likely not. As Mashable embarks on our exploration of algorithms, we wanted to get something straight right off the bat: What is an algorithm, anyway?

Mashable spoke with Pedro Domingos, a computer science professor at the University of Washington who has also written a book about the ever-growing role algorithms play in our lives. Before you go being alternatively impressed by or distrusting of the next computer algorithm you encounter, get back to basics on the concept that’s powering our world. 

Artificial Intelligence: 1. An algorithm is a set of very specific instructions

How to bake a cake, find the sum of two plus two, or even run a country according to the U.S. Constitution are all examples of algorithms. Why? Because, according to Domingos, the definition of an algorithm is “a sequence of instructions.” That’s it! 

Today, an algorithm usually refers to “a sequence of instructions that tells a computer what to do.” A computer program is an algorithm, written in a computer programming language, that a computer can understand and execute. 

Algorithms written for computers also have to be extremely precise, often using the instructions “if,” “then,” and “else.” For example, a self-driving car might run on an algorithm for navigating that says “IF the directions say turn left, THEN turn left.” See how specific you have to be to make a computer follow a seemingly simple set of instructions?

In the popular imagination, recommendation algorithms have come to dominate our idea of what an algorithm is. That is, when many people think about or refer to algorithms, they’re referencing something like what TV show Netflix thinks you might like, or which international travelers belong on the no-fly list. While these are extremely complicated algorithms, at their hearts, they’re still just a set of instructions a computer follows to complete a specified task. 

“With computers, the algorithm can get vastly more complex,” Domingos said. “Addition is an algorithm that’s defined in a few lines of text. Computers can have algorithms that take millions of lines to define.”

Artificial Intelligence: 2. People wrote and used algorithms long before computers even existed

As early as the Babylonian era, humans were writing algorithms to help them do the mathematical equations that allowed them to manage their agricultural society. 

“There were algorithms before computers, because you don’t need a computer to execute an algorithm, the algorithm can be executed by a person,” Domingos said.

Algorithms using computers first rose to prominence in the mid-20th century, when the military began writing formulas for, say, determining where to aim a missile at a moving object. The concept then moved into business administration, with computers running formulas for administering payroll and such, and in science, for tracking the movements in the sky. 

A turning point for modern algorithms came when Larry Page and Sergei Brin wrote the Google PageRank algorithm. Instead of just relying on information within a page to determine how relevant it was to a search term, the search engine algorithm incorporated a host of other signals that would help it surface the best results. Most notably, how many other links pointed to the article, and how reputable those articles were, based on how many links pointed to those pages, and so on. That was a powerful sign of relevance. And the rest is history. 

Artificial Intelligence: WATCH: This is how algorithms work

Artificial Intelligence: Uploads%252fvideo uploaders%252fdistribution thumb%252fimage%252f95373%252f448f9b70 4c20 4dd9 9292 a94f8d36ede5.png%252f930x520.png?signature=ywat0urxcugx117rqjhednu8k e=&source=https%3a%2f%2fblueprint api production.s3.amazonaws

Artificial Intelligence: 3. Today, you can find algorithms everywhere

While we might think of algorithms as mathematical equations, algorithms, according to Domingos, “can compute anything from anything, there might be no numbers involved at all.” One prominent and extremely complex algorithm is the algorithm that governs the Facebook News Feed. It’s an equation that Facebook uses to determine what pieces of content to show its users as they scroll; in other words, a set of instructions to decide what goes on the News Feed.

“There’s no end of things that Facebook could put on your News Feed but it has to choose.”

“There’s no end of things that Facebook could put on your News Feed but it has to choose,” Domingos said. “And it’s usually a combination of things like how much do you care about the people that produced directly or indirectly that post? How close are they to you in your social network, how relevant it is in its own terms because of the subject, and also how recent.”

Facebook, Google, Amazon, and other big tech companies all rely on algorithms to serve content and products to their customers. But there are also algorithms throughout your life that you might not be aware of. 

For example, Domingos explained that an algorithm governs how your dishwasher knows when it’s time to transition from washing to drying, or how your car regulates fuel intake and knows when its tank is full while at the gas station, or how shadows appear in a digitally animated movie to perfectly replicate the sun in the real world.

“Clearly, every time you interact with the computer, or you’re on the internet, there’s algorithms involved,” Domingos said. “But these days algorithms are also involved in just about everything.”

Artificial Intelligence: 4. The most complex algorithms use machine learning

As we learned, an algorithm typically has to be written in “excruciating detail” for a computer to understand what to do. However, that’s not the case when the people who write algorithms incorporate machine learning — a type of artificial intelligence — which leads to the most sophisticated algorithms.

“In traditional programming, a human being has to write down every little detail of what the other has to do, and that is very time consuming, very costly,” Domingos said. “Machine learning is the computer discovering its own algorithms instead of being told what to do.”

Put another way, machine learning is when a programmer feeds a program some raw data as a starting point, then submits the end point of what an organized, classified version of that data looks like, and leaves it up to the program to figure out how to get from point A to point B. Consider an onion: A human who knows how to cook can turn that onion from a pungent raw sphere into strips of caramelized goodness. In a traditional algorithm, a programmer would write every single step of the cooking instructions. But in an algorithm developed by artificial intelligence, given the end point as a goal, the program would figure out how to get from raw to caramelized itself. Hence, the machine learned. 

These types of algorithms become even more powerful when a human being wouldn’t know how to get from point A to point B. For example, a human process like being able to recognize that a cat is a cat takes so much complicated brain power that it would be impossible to write out step by step. But by giving a program a bunch of images of a cat, and images that are not a cat, and showing the desired endpoint as categorizing a cat image as a cat, the computer can learn to execute that process itself.

“It’s the

Read More

About admin

Check Also

Artificial Intelligence: Twitter to investigate apparent racial bias in photo previews

Artificial Intelligence: Twitter to investigate apparent racial bias in photo previews

Just because an algorithm's decisions aren't intentionally racist doesn't mean it isn't racially biased in practice. Image: bob al-greene / mashable By Rachel Kraus2020-09-20 19:15:32 UTC The first look a Twitter user gets at a tweet might be an unintentionally racially biased one. Twitter said Sunday that it would investigate whether the neural network that…

Leave a Reply

Your email address will not be published. Required fields are marked *