Glossary
Algorithm definition: what an algorithm is
In short
An algorithm is an exact sequence of steps that turns input data into a result in a finite number of actions; in AI the word covers both the way a model learns and the rules by which it works.
AI basics · algorithm
MMOOZZGG.com editorsChecked: 1 min read
For a child
When you build a house from a toy kit, you look at the instructions: first put down the blue piece, then attach the walls, and at the end add the roof. If you follow the steps in order, any child can build the house. A computer also works by such instructions, only they have very many steps, and it never skips one. Such an instruction for a computer is called an algorithm.
In plain words
An algorithm is like a recipe: it says what to take as input, which actions to do and in what order, when to stop and what to give at the end. An ordinary program follows steps that a programmer invented. Machine learning works in a smarter way. There is a training procedure: the computer goes through many examples and adjusts a model. The finished model then makes decisions by itself, for example it tells spam from a normal email. So the phrase “the algorithm decided” usually means “the model trained on past data gave this answer”.
For business
When a vendor says “we have our own algorithm”, ask what stands behind it: a set of fixed rules, a trained model or a language model with instructions. The price and the risks depend on the answer. Rules are cheap and predictable, but they break on unusual cases. A trained model is more flexible, but it needs data and regular quality checks, because customers and the market change over time. Ask to see the examples the system was tested on, who is responsible for an error and whether a specific decision can be explained to a customer or an auditor. Which part of the process goes to rules and which to a model is decided when you build an AI use case map.
For a specialist
An algorithm is a finite sequence of clearly defined operations that turns an input into an output and ends in a finite number of steps. A strict notion of computability appeared in 1936: A. Turing described an abstract machine and used it to define computable numbers, and A. Church answered the same decision problem of Hilbert (Entscheidungsproblem) through lambda calculus. Both definitions turned out to be equivalent in their results, hence the Church-Turing thesis. Procedures are compared by time and space complexity in big O notation. Machine learning separates the learning algorithm from the model it produces: gradient descent, decision tree building or the k-means method fit parameters to data, and the model then runs inference. Heuristics and probabilistic methods trade answer accuracy for speed on large tasks.
Example
A bank refuses a client a credit card, and the manager explains: “the algorithm decided”. In fact, the decision rests on a scoring model trained on past applications and on thresholds set by the risk department.
Related terms
Questions and answers
How does an algorithm differ from a neural network?
Sources
Where companies use it
Not sure whether your company needs this?
AI solutions map