The algorithms are coming. They are going to change investing forever — and the change has already begun. An event that shocked the art world sets the stage as to why.

But first, a quick anecdote: The movie “I, Robot” was a dystopian Hollywood blockbuster from 2004. The movie depicts Chicago in the year 2035, and humanoid robots help run the city. Will Smith plays a human detective who mistrusts and despises the robots for personal reasons.

As Will Smith’s character investigates a murder case, he is forced to interact with a robot named Sonny. Seeing himself as a defender of human dignity and worth, at one point he says to Sonny: “Can a robot write a symphony? Can a robot turn a canvas into a beautiful masterpiece?”

To which Sonny replies, “Can you?”

It’s a memorable exchange because it captures something about the robots-versus-humans debate.

What will make humans superior to the robots of the future — or to increasingly advanced versions of artificial intelligence? Will it be the ability to create art? To write symphonies and paint masterpieces?

Maybe not, because AI is advancing there, too.

In a historic first, a painting was auctioned off at Christie’s — a top-tier art house — for the sum of $432,500.

By most standards, $432,500 is a price worthy of a masterpiece. But the auction was historic because no human created this particular masterpiece. It was generated by artificial intelligence — from a networked cluster of algorithms.

The initial estimate for what the AI painting, “Portrait of Edmond Belamy,” would receive was around 10,000 euros (a little over $11,000). It wound up fetching roughly 40 times that price — hence the shock.

The story gets stranger. The code that seeded the algorithm that ultimately led to the painting was originally created by a bored 17-year-old from West Virginia.

Robbie Barrat, who is now 19 years old and working in a Stanford University AI lab, started off by teaching his computer to auto-generate songs by sampling thousands of rap lyrics. Then he moved on to landscapes and portraits, trying to make the computer “learn” from thousands of examples harvested from the internet.

In a spirit of sharing, Barrat then uploaded his code to GitHub — a popular coding website — to encourage others to tinker with it. At that point, three 20-somethings in France took Barrat’s code and modified it. They used a modified version of the code to create what is a called a GAN, or Generative Adversarial Network.

The GAN that created the AI painting — which then sold at Christie’s for $432,500 — worked like this. There were basically two algorithms going back and forth, a “generator” and a “discriminator.” Both were trained by analyzing 15,000 portraits from the 14th through 20th century.

After sampling from 15,000 actual paintings, the “generator” algorithm would attempt to “fool” the discriminator algorithm — which had also sampled 15,000 paintings — into believing what the generator created was a real piece of art.

The “discriminator” algorithm would then reject the generator’s weak attempts, essentially saying “nope, not fooled, try again.”

The two algorithms went back and forth like this in a feedback loop, over and over — the generator trying to convince the discriminator and getting a little bit better each time — until semi-realistic paintings started to appear.

“Portrait of Edmond Belamy” does not look like a human painting. The face is more or less a blob, and other characteristics make it feel distinctly non-human.

But it is close enough to a real oil painting — the type of thing that would normally sell at Christie’s — to create an eerie feeling.

The high price paid almost certainly had a novelty component. It wasn’t so much that the painting was great, or even all that good really, and more so the historical precedent: It was the first AI-generated artwork to draw attention from a top-tier auction house.

But the auction price of $432,500 really opens a Pandora’s Box of questions: If algorithms can paint, what else can they do?

We know algorithms can create music. Not very good music, but actual music nonetheless. There are robot bartenders and AI ski instructors. We are in the early days of AI drivers, robot warehouse workers and AI paralegals and radiology scanners. Where else is this going to go?

It’s a big question, with implications that are both exhilarating and frightening. In the world of investing, we also know that algorithms — the basic building blocks of artificial intelligence — are already having a significant impact. And we are still in the early days.

Here is one great thing about the AI-driven future: Access to algorithms will be democratized.

It won’t be just large hedge funds and powerful institutions that have access to cutting-edge algorithmic assistance in their investing decisions. The individual investor will have these tools, too, by way of great software. We are certain of that, because it’s our mission to make it happen.

The topic of artificial intelligence is so deep — and so transformative and important — that staying informed will be an absolute must for investors in the months and years ahead.

There is a little bit of an “arms race” component to this, too; those who don’t equip themselves with the best 21st century tools risk falling behind. But once again, that’s where the central TradeSmith mission comes in: Empowering individual investors through software.

To quote from another tech-themed blockbuster, “The Matrix” — “Buckle your seat belt Dorothy, ‘cause Kansas? Is going bye-bye.”

There is no need to fear what’s coming, however — because we’ll put the algorithms to work for us.