AI Guide · Updated 14 November 2026
History
From ancient automata to Alan Turing: the prehistory of AI
By drayz.ai · Updated · 9 min read

Long before anyone built a computer, people imagined machines that could think. The prehistory of artificial intelligence runs from ancient myths and medieval clockwork, through Victorian London and wartime Bletchley Park, to the first programs that played games on British computers in the early 1950s. This chapter tells that story.
Myths and mechanical marvels
The dream of artificial life is ancient. In Greek mythology, the smith god Hephaestus forged golden servants who could speak and think, and Talos, a giant bronze man who walked around Crete three times a day to protect it from invaders. Jewish folklore tells of the golem, a clay figure brought to life. The ancient Chinese text known as the Liezi tells of an artificer, Yan Shi, who presented a king with a life-sized mechanical man that could sing and dance.
Real engineers built astonishing automata. Hero of Alexandria, in the 1st century AD, described machines driven by water, steam and falling weights, including a programmable cart whose movements were set by ropes wound around an axle. In the Islamic Golden Age, the Banu Musa brothers in 9th-century Baghdad wrote The Book of Ingenious Devices, including an automatic flute player. In 1206 Ismail al-Jazari, working for the Artuqid court in what is now south-east Turkey, described a boat carrying four mechanical musicians whose drum patterns could be changed by moving pegs on a rotating cylinder, an early form of programming.
In 18th-century Europe, automata became a sensation. Jacques de Vaucanson's mechanical duck appeared to eat and digest grain. The Swiss Jaquet-Droz family built "The Writer", a doll that could be set up to write any message of up to about 40 characters. And in 1770 Wolfgang von Kempelen unveiled "The Turk", a chess-playing automaton that toured Europe for decades, including London, defeating many opponents. It was a hoax, with a human chess master hidden inside, but it planted a question in the public mind: could a machine really play chess?
Logic: thinking as calculation
At the same time, philosophers were asking whether reasoning itself could be turned into a mechanical process.
- Aristotle (4th century BC) set out the rules of the syllogism ("All men are mortal; Socrates is a man; therefore Socrates is mortal"), showing that some valid reasoning follows fixed forms.
- Ramon Llull, a 13th-century Majorcan philosopher, built paper wheels that combined basic concepts to generate statements, an early idea of mechanical reasoning.
- Thomas Hobbes wrote in 1651 that reasoning is "nothing but reckoning", in other words a form of calculation.
- Gottfried Wilhelm Leibniz (1646-1716) built a calculating machine and dreamed of a universal symbolic language and a "calculus of reasoning". With it, he imagined, two people in a dispute could simply sit down and say "let us calculate".
In 1854 George Boole, a largely self-taught mathematician born in Lincoln who became professor at Queen's College Cork, published An Investigation of the Laws of Thought. He showed that logical statements could be written and manipulated as algebra using just two values, true and false. Almost a century later, Claude Shannon showed that Boole's algebra could describe electrical switching circuits. Every digital computer, and every AI system running on one, rests on Boolean logic.
Later, Gottlob Frege, Bertrand Russell and Alfred North Whitehead developed formal logic powerful enough to express much of mathematics. Russell and Whitehead's Principia Mathematica (1910-1913) would, decades later, become the testing ground for the first AI program.
Babbage and Lovelace: the first computer, on paper
Charles Babbage, a Cambridge mathematician, was frustrated by errors in printed mathematical tables. In the 1820s he designed the Difference Engine to calculate tables mechanically. Then, from 1834, he designed something far more ambitious: the Analytical Engine. It had a "store" (memory) and a "mill" (processor), took instructions from punched cards borrowed from the Jacquard loom, and could in principle carry out any calculation. It was, in all essentials, a general-purpose computer, a century before electronic ones. It was never completed, partly because of cost and the limits of Victorian engineering.
Ada Lovelace, daughter of the poet Lord Byron and a gifted mathematician, translated an article about the Analytical Engine in 1843 and added her own extensive notes, three times longer than the original. Note G contains a method for calculating Bernoulli numbers, usually described as the first published computer program.
Lovelace grasped something Babbage himself underplayed: the engine could manipulate any symbols, not just numbers. She suggested it might compose elaborate pieces of music if the rules of harmony could be expressed in its terms. But she also cautioned that the engine "has no pretensions whatever to originate anything" and could only do what it was ordered to do. A century later Alan Turing called this "Lady Lovelace's objection" and argued against it. Whether machines can truly be creative is still debated today.
Brains, feedback and information
In the first half of the 20th century, several new sciences laid the groundwork for AI.
Neuroscience revealed that the brain is made of billions of cells called neurons that send electrical signals to each other. In 1943 the neurophysiologist Warren McCulloch and the logician Walter Pitts published a mathematical model of a neuron as a simple on-off unit, and showed that networks of such units could in principle compute logical functions. This was the first artificial neural network, the distant ancestor of today's deep learning.
In 1949 the Canadian psychologist Donald Hebb proposed that connections between neurons strengthen when they are active together, often summarised as "cells that fire together wire together". Hebbian learning inspired generations of learning algorithms.
Cybernetics, named by the American mathematician Norbert Wiener in his 1948 book, studied control and communication in animals and machines, especially feedback: how a system measures the gap between what it wants and what is happening, and corrects itself. A thermostat is a simple example.
In Britain, cybernetics flourished through the Ratio Club, an informal dining club of young scientists, including Alan Turing, that met in London from 1949. One member, the Bristol neurophysiologist W. Grey Walter, built two small electronic "tortoises", Elmer and Elsie, in 1948-49. With just a couple of valves each, they explored their surroundings, steered towards moderate light, avoided obstacles and returned to a hutch to recharge when their batteries ran low. To observers they seemed almost alive, showing how surprisingly complex behaviour could emerge from very simple circuits. Another member, W. Ross Ashby, built the Homeostat, a machine that adapted itself to stay stable.
Information theory arrived in 1948 when Claude Shannon of Bell Labs showed how to measure information mathematically, laying the foundation for digital communication. Shannon also wrote a 1950 paper on how to program a computer to play chess, which set out the basic search strategy chess programs would use for decades.
Alan Turing
No one did more to lay the foundations of AI than Alan Turing (1912-1954).
The Turing machine
In 1936, aged 24, Turing published "On Computable Numbers". To answer a deep question in mathematical logic, he imagined a very simple machine: a tape divided into squares, a head that reads and writes symbols, and a table of rules saying what to do next. He showed that such a machine could carry out any calculation that can be described as a precise procedure, and that a single universal machine could imitate any other by reading its rules from the tape. In other words, one machine, given the right program, could do the work of any machine. That is exactly what a modern computer is.
Bletchley Park
During the Second World War Turing worked at Bletchley Park in Buckinghamshire, Britain's codebreaking centre. He played a central part in breaking the German Enigma cipher, designing the electromechanical Bombe (building on earlier Polish work) that searched through possible Enigma settings at high speed. At the same site, the Post Office engineer Tommy Flowers built Colossus in 1943-44 to attack a different German cipher, the Lorenz teleprinter code. Colossus was one of the world's first programmable electronic digital computers, though its existence stayed secret for decades.
Bletchley Park's codebreakers used statistics, search and early automation to make sense of huge volumes of data, and in their spare time some of them, Turing included, discussed whether machines might one day learn and think.
Computing Machinery and Intelligence
After the war Turing designed the ACE computer at the National Physical Laboratory and then moved to the University of Manchester. In 1948 he wrote a report, "Intelligent Machinery", that described what he called "unorganised machines", networks of simple units that could be trained, foreshadowing neural networks.
In 1950 he published his most famous paper, "Computing Machinery and Intelligence", in the philosophy journal Mind. It begins: "I propose to consider the question, 'Can machines think?'" Rather than argue about definitions, Turing proposed the imitation game. An interrogator communicates by typed messages with two hidden players, a person and a machine, and tries to work out which is which. If the machine can regularly fool the interrogator, Turing argued, we have as much reason to call it intelligent as we do with other people.
The paper is remarkably far-sighted. Turing:
- predicted that by around the year 2000 computers would play the imitation game well enough to fool an average interrogator a good part of the time in a short conversation;
- answered nine objections to machine intelligence, including theological ones, the argument from consciousness and Lady Lovelace's objection;
- suggested that instead of programming an adult mind, we might build a "child machine" and educate it, using rewards and punishments, an early description of machine learning and reinforcement learning.
Turing died in 1954, aged 41, two years after being prosecuted for homosexuality and subjected to chemical castration. He received a posthumous royal pardon in 2013, and the 2017 "Turing's Law" pardoned thousands of other men convicted under the same historic laws. Since 2021 his face has appeared on the Bank of England £50 note.
The first AI programs ran in Britain
Britain built some of the world's first stored-program computers, and they quickly ran programs that today we would call AI.
- The Manchester Baby ran its first program on 21 June 1948, the first time a computer stored its program in electronic memory. It led to the Ferranti Mark 1 (1951), the world's first commercially available general-purpose computer.
- At Cambridge, the EDSAC ran from 1949. In 1952 Sandy Douglas wrote OXO, a noughts-and-crosses game for it, often cited as one of the first video games.
- Christopher Strachey, a schoolmaster turned computer pioneer, wrote a draughts (checkers) program in 1951-52 that could play a complete game at reasonable speed on the Ferranti Mark 1. He also wrote a program that generated quirky love letters, sometimes called the first example of computer-generated text.
- Dietrich Prinz, working for Ferranti, wrote a program in 1951 that solved simple "mate-in-two" chess problems.
- Turing himself wrote a chess algorithm, "Turochamp", with David Champernowne in 1948. No computer could yet run it, so in 1952 Turing played a game by working through the algorithm by hand, taking about half an hour per move. It lost.
In the United States, Arthur Samuel at IBM began work on a checkers program in 1952 that would go on to learn from its own games, and in 1955 Allen Newell, Herbert Simon and Cliff Shaw started work on the Logic Theorist. The stage was set for the summer of 1956.
Why the prehistory matters
The ideas that shaped AI before 1956 are still with us:
- Computation as symbol manipulation (Leibniz, Boole, Lovelace, Turing) became symbolic AI and still underlies all software.
- Neural networks (McCulloch and Pitts, Hebb, Turing's unorganised machines) became deep learning.
- Feedback and adaptation (Wiener, Grey Walter, Ashby) became control theory and robotics.
- Learning from experience (Turing's child machine) became machine learning and reinforcement learning.
- Behaviour as the test of intelligence (the imitation game) shaped how we still judge AI.
And Britain was at the centre of it all: Babbage and Lovelace in London, Boole in Lincoln and Cork, Turing in Cambridge, Bletchley and Manchester, Flowers at Dollis Hill, Grey Walter in Bristol and Strachey in Manchester.
Key takeaways
- People have imagined thinking machines for thousands of years; real automata date back to antiquity and the medieval Islamic world.
- Boole showed logic could be done with algebra; Babbage designed the first general-purpose computer; Lovelace saw it could process symbols, not just numbers.
- McCulloch and Pitts proposed the first artificial neuron in 1943.
- Alan Turing defined computation in 1936 and asked "Can machines think?" in 1950, proposing the imitation game and machine learning.
- The first AI-style programs, playing draughts and chess, ran on British computers in Manchester in 1951-52.
Previous chapter: What is artificial intelligence? · Next chapter: Dartmouth and the golden age of AI, 1956-1973