Understanding AI

The Algorithm: A Recipe from Baghdad That Now Shapes Everyday Decisions

A loan refused in under a second, with no clerk behind it. Where did the word come from, how does a dictated algorithm differ from a learning one, and when should we trust it?

4 min read This article is also available in Arabic

A human head made of circuitry with AI at its centre

The Nano capsuleOne minute

An algorithm is, at root, a recipe with a finite number of steps that turns an input into an output, and the word derives from the name of the scholar Muhammad ibn Musa al-Khwarizmi (c. 780–850 CE), who worked in the House of Wisdom in Baghdad. Today there are two kinds: the explicit algorithm, whose rules a programmer writes so that we can trace its decision easily, and the learned algorithm, which draws its rules from data so that its verdict is sometimes hard to explain. So of any automated system that decides about us we should ask to know the reason, to keep the right of review, and not to believe a screen merely because it is digital.

Read the full article Collapse the article 4 min read

The bank turns down your loan application in under a second, and no clerk sits behind the screen. So who made the decision? A chain of instructions called the algorithm. It is simpler than its aura suggests, and far older than the computer.

A Recipe Before It Was a Program

An algorithm is a finite series of ordered steps that takes an input and produces an output. A cooking recipe is an algorithm; so is the long division we learned as children; so are step-by-step directions to an address.

The word is Arabic in its root. Al-Khwarizmi lived from about 780 to about 850 CE and worked in the House of Wisdom in Baghdad under the caliph al-Ma'mun. The title of his book, "The Compendious Book on Calculation by Completion and Balancing" (al-Kitab al-mukhtasar fi hisab al-jabr wa'l-muqabala), gave European languages the word "algebra" after it was translated into Latin in the twelfth century. His text on Hindu-Arabic arithmetic survives only in a Latin translation, Algoritmi de numero Indorum, and from the Latin form of his name, Algoritmi, the word "algorithm" derives.

When the machine entered the picture, the mathematician Ada Lovelace wrote, in 1843, extensive notes on her translation of an article on Charles Babbage's Analytical Engine, describing how the machine could be programmed to compute Bernoulli numbers. She imagined that it might work on "other things besides number", such as musical notes. Her work is often called the first program, a label applied to her rather than a point on which every historian agrees; and the engine itself was never completed.

An Algorithm Dictated and an Algorithm That Learns

In the first kind, the programmer writes every rule: if the condition holds, do this. The decision can be traced line by line because its logic was set in advance.

The second kind, which stands behind modern artificial intelligence, is not given its rules. It is shown many examples and extracts a mathematical model from them. To simplify: it turns a loan application into numbers (income, repayment history, other variables) and outputs a score representing the probability of default; if the score passes a certain threshold, the application is refused. There is no anger here and no mercy, only a calculation that measures the present against the yardstick of the past. The bias that such a yardstick may carry has an article of its own: "Algorithmic Bias".

The Black Box and the Price of Opacity

When an algorithm learns from a vast heap of data, it gains capability and loses clarity of reasoning. The researcher Cynthia Rudin has argued that trying to explain complex models after they are built may perpetuate bad practices, and that for high-impact decisions, such as healthcare and criminal justice, it is better to build understandable models from the outset. This is a view in a scientific debate that has not been settled, but it clarifies the trade-off: more accuracy against less understanding, and the choice should not be left to chance when a person's fate is at stake.

When We Trust Too Much

The problem is not confined to the algorithm; it extends to how we receive it. A systematic review examined 74 studies drawn from 13,821 candidate papers and defined "automation bias" as "the tendency to over-rely on automation". It found that decision-support systems generally improve performance, but may introduce new errors that the user does not notice. The phenomenon is aggravated by time pressure and heavy workload, and eased by training, by stressing the user's accountability, and by showing the level of confidence alongside the output instead of a categorical recommendation.

What the Law Says and What Reason Asks

The European AI Act (Article 14) requires high-risk AI systems to be designed so that humans can oversee them: people able to disregard or reverse the outputs and to stop the system safely, and who stay alert to their own tendency to over-rely on those outputs. Article 86 gives a person affected by a decision based on such a system, where it has legal or similarly significant effects, the right to ask for "clear and meaningful explanations" of the system's role in the decision. This is European law and does not apply to us, but it offers a model for thinking.

In daily life, the reader has three useful questions to put to any automated decision:

  • What inputs was it built on?
  • Who can review it or object to it?
  • What does the system do when it is not confident?

The algorithm is a human creation, and since it learns from us, mending it begins with what we feed it in data and values. When we ask for transparency and review we do not belittle the technology; we discharge the trust of responsibility toward those affected by its decisions, and we ask God to help us use well what has been placed at our service.

References

  1. Encyclopaedia Britannica, al-Khwarizmi (biography)
  2. Encyclopaedia Britannica, Ada Lovelace (biography)
  3. C. Rudin, Stop Explaining Black Box Machine Learning Models for High Stakes Decisions and Use Interpretable Models Instead, arXiv:1811.10154 (2018; v3, 2019)
  4. K. Goddard, A. Roudsari, J. Wyatt, Automation bias: a systematic review of frequency, effect mediators, and mitigators, Journal of the American Medical Informatics Association 19(1) (2012)
  5. Regulation (EU) 2024/1689 (AI Act), Article 14: Human oversight
  6. Regulation (EU) 2024/1689 (AI Act), Article 86: Right to explanation of individual decision-making