Skip to main content
  1. Home
  2. Emerging Tech
  3. News

A.I. reads the Harry Potter series, then writes some absurd fan fiction

Add as a preferred source on Google

Have you ever tried using the predictive keyboard on your smartphone to generate completely nonsensical messages, based on the words it considers to have the highest probability of following each other? A mischievous member of Botnik Studios, an online artist collaboration, just used a similar technique to write part of a new Harry Potter novel — with hilarious effect.

The predictive text generator used to write the story was trained on the seven previous Potter books. From this, it analyzed frequent recurrent word pairings and sentences to come up with text that is a weird mix of algorithmic randomness and something that, frankly, still reads a bit like J.K. Rowling may have penned it.

Recommended Videos

Titled Harry Potter and the Portrait of What Looked Like a Large Pile of Ash, the story is every bit as weird as you might imagine. A Death Eater wears a shirt reading, “Hermione Has Forgotten How To Dance,” Harry falls down a spiral staircase for an entire summer, and Ron does a tap dance and then tries to eat Hermione’s family. None of it makes a lick of sense, but it’s a whole lot of fun — and genuinely creative in a way that mixes human smarts with artificial intelligence.

This isn’t the first time computer scientists have used artificial intelligence to try and generate new Harry Potter stories. Last year, we reported on one attempt to generate new Hogwarts-related stories using a long short-term memory recurrent neural network trained on the series’ first four books.

Even more significantly, when Rowling was outed as the author of the detective novel The Cuckoo’s Calling a few years ago — writing under the pen name Robert Galbraith — computer scientists cracked the mystery in a very similar way to Botnik’s story generator: by analyzing the text based on frequent word pairings and the like. In the aftermath, Rowling admitted that she was the author.

If you are interested in finding out a bit more about Harry Potter and the Portrait of What Looked Like a Large Pile of Ash and the predictive text program used to generate it, check out this page on GitHub, where it is freely available to inspect.

Luke Dormehl
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
Tiny robots could shrink weeks of heart infection treatment into a single day
Forget open-heart surgery, because these rice-sized robots take the express route to your heart.
heart being treated by tiny robot

Treating a heart infection is no walk in the park. Patients often spend weeks on IV antibiotics, and if that fails, open-heart surgery enters the picture. Johns Hopkins University engineers may have found a better way.

The team has developed magnetic “millirobots” that are about as wide as a pencil tip and roughly as long as a grain of rice. As detailed in their study published in Advanced Materials Technologies, the robots are designed to deliver medicine directly to infected heart tissue.

Read more
Meta goes toe-to-toe with the big boys as it launches Muse Wonder AI models
Illustration of Meta Muse Wonder AI model.

It's raining frontier AI models. Soon after Anthropic set alarm bells ringing with its Claude Fable model at the summit of AI peformance, OpenAI answered with GPT-6 Astra. Not one to be left behind, Google released Gemini 4 Argon. The race is now getting hotter as Meta enters the fray with two new AI models in the Muse series: Wonder and Wonder Full. Cheesy naming aside, these Meta AI models mean business, or at least that's what the benchmark figures suggest. More importantly, these AI models are already making their way to Muse users.

https://twitter.com/DigitalTrends/status/2109699549375988120

Read more
AI can’t tell if you’re gay or straight, but it thinks it knows what both look like
AI knows it shouldn't judge a face, but apparently, drawing one is a different story.
Emilia Clarke AI generated stock image. Gemini / Nano Banana is on the left

We've all been told not to judge a book by its cover, and you'd think AI would follow that rule, too. Ask an AI chatbot to guess someone's sexual orientation just by looking at their face, and it'll likely tell you that there's no reliable way to know. But what happens when you ask that same model to change someone's appearance to match a particular sexual orientation? Well, that's where things get uncomfortable.

A new study, accepted for presentation at the 2026 Conference on Empirical Methods in Natural Language Processing, found that AI models from OpenAI and Google can be inconsistent when handling sensitive personal characteristics. They might refuse to make assumptions about someone based on their appearance, but when asked to generate those same assumptions visually, the results tell a very different story.

Read more