The magicians we know best first appear in the Gospel of Matthew, where three wise men, long thought to be Persian astrologers, follow a star from the East to find and crown the new King. You don't need to be a believer to see this as an exciting story of confusion between wisdom and revelation, and all the more gratifying because it is a bit enigmatic...

Which wise men, which star, which journey? There is something for every imagination in them, especially in their cunning journey home "by another way" to escape King Herod's conspiracy.

The details of the story emerged long ago, of course. Despite many attempts over the centuries to find some historical astronomical event that might be related to the biblical story, physicist Aaron Adair has suggested that there are no events in the heavens that fit the bill.

A comet, meteor, or supernova star was imagined to explain it, probably partly invented because of Old Testament prophecies demanding that such a star would be present if a Messiah was to be born.

A further reading shows that the Zoroastrian Persian priestly class, whom the author of Matthew would probably have recognised as "Magi" (sorcerers), were strongly disinterested in astrology, which they then regarded as Roman nonsense.

Indeed, other scholars insist that the author of the Gospel did not mean the Magi to be wise men; or, more precisely, he did not mean them to be tricksters and swindlers whose false magic was eclipsed by true revelation, in the sense that only Scorsese meant. Matthew's purpose in bringing them on stage was not to boast of their support, but to mock their obsolescence.

We see medieval magicians diligently advancing astronomy by mapping the heavens and planets; a desirable goal was to predict the planetary conjunctions of Jupiter and Saturn, the so-called great conjunction believed to mark all the major turning points in human history.

The thirteenth-century English scholar Roger Bacon argued that, according to Grafton, "only six great religions could have existed, each of which was ruled by the conjunction of a planet with Jupiter; Judaism, for example, was the religion of Saturn." (If this seems absurd, remember that the last great conjunction was in 2020, a year certainly as important as these sages could have predicted.)

The novelty of Grafton's view is that what makes the astrologers important is not their myths, but their machines. They made things, and on the basis of their work we have arrived at technology, not theoretical science.

What made the Renaissance magicians our true ancestors was the subtle recognition of the existence of what they called "real artificial magic". Automata and astrolabes were apparently parts of their apparatus. By breaking the barrier, not between science and magic, but between craft engineering and imagination, they helped create the world in which we now live.

They loved to make amazing automata, realising that any machine that works in ways we don't understand looks like magic, and also that all such mechanisms would look like devils to the untrained eye.

In fact, we can trace the history of demonic-looking machines from their own time to a new set of devices that lead to ours.

A fifteenth-century wooden devil doll with "moving eyes, tongue, horns, arms and wings" gave way to the chess-playing "Turk" of the eighteenth century, whose very simple mechanisms no one could understand.

Solar eclipse on Mars was captured! Solar eclipse on Mars was captured!

In the nineteenth century, modern magicians gave us the ominous telegraph. (It is, of course, no coincidence that Samuel Morse's first telegraph message read "What has God done?").

Radio and TV have had their seemingly magical moments, and the latest is of course the specter of artificial intelligence.

Right now, among all these magical machines, AI seems to be the one that will eventually send us all to hell. Yet many machines in the past have threatened us with this hellish descent, and it hasn't quite happened yet.

We have seen many hells, but not the last one. Everything seems like magic until you realise it's a machine, and every machine you don't know yet seems like a pact with the devil.

What the whole mythology and history of sorcerers suggests is that there is no bright line to separate fraud from faith, or cunning machines from magic devices.

There are no sharp boundaries between the irrational and the rational, between what we guess and what we are sure of, between the wisdom we respect and the dishonesty we distrust.