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…
AMD just gave PC gamers a reason to stop worrying about upgrades
Electronics, Hardware, Computer Hardware, Ryzen, CPU

At a time when many PC gamers are wondering how often they’ll need to replace major components, AMD is leaning into a different message: buy once, upgrade later.

At Computex 2026, AMD unveiled two new gaming-focused processors, confirmed that the AM5 platform will remain supported through 2029, and introduced a new Radeon graphics card aimed at mainstream 1440p gamers. 

Read more
NBA will put AI in charge to tackle bad ref calls and fan fury
NBA games could soon have AI helping officials make calls
NBA Referee

Bad referee calls have become one of the NBA’s most frustrating recurring storylines, especially during the playoffs when every possession gets dissected online within seconds. Now, the league appears ready to lean much harder into artificial intelligence in an attempt to reduce controversial officiating decisions and calm growing fan anger around inconsistent calls.

According to recent comments from Adam Silver, the NBA is actively exploring how AI can improve officiating, replay analysis, and decision-making during games. The discussion comes at a time when criticism surrounding referees has intensified across the league, particularly as social media clips and slow-motion replays make every missed whistle instantly visible to millions of fans.

Read more
Gemini Spark is now rolling out and it hopes you will trust an AI more than apps
Gemini Spark in action

For years, AI assistants have mostly lived in chat windows. You ask a question, they answer it, and the interaction ends there. Google appears ready to push that idea much further with Gemini Spark, a new AI agent that is now rolling out to all Google AI Ultra subscribers in the U.S. So, instead of opening multiple apps and manually managing tasks, you hand the job to Gemini Spark and let it work in the background.

According to Google, Gemini Spark can operate autonomously across your digital ecosystem, handling tasks even when your phone or laptop is turned off. Users can either watch it work in real time or let it run quietly in the background. Importantly, Google says the system remains under user control and is designed to seek approval before taking significant actions.

Read more