An AI Program Wrote Harry Potter Fan Fiction—and the Results Are Hilarious

Andreas Rentz/Getty Images
Andreas Rentz/Getty Images

“The castle ground snarled with a wave of magically magnified wind.”

So begins the 13th chapter of the latest Harry Potter installment, a text called Harry Potter and the Portrait of What Looked Like a Large Pile of Ash. OK, so it’s not a J.K. Rowling original—it was written by artificial intelligence. As The Verge explains, the computer-science whizzes at Botnik Studios created this three-page work of fan fiction after training an algorithm on the text of all seven Harry Potter books.

The short chapter was made with the help of a predictive text algorithm designed to churn out phrases similar in style and content to what you’d find in one of the Harry Potter novels it "read." The story isn’t totally nonsensical, though. Twenty human editors chose which AI-generated suggestions to put into the chapter, wrangling the predictive text into a linear(ish) tale.

While magnified wind doesn’t seem so crazy for the Harry Potter universe, the text immediately takes a turn for the absurd after that first sentence. Ron starts doing a “frenzied tap dance,” and then he eats Hermione’s family. And that’s just on the first page. Harry and his friends spy on Death Eaters and tussle with Voldemort—all very spot-on Rowling plot points—but then Harry dips Hermione in hot sauce, and “several long pumpkins” fall out of Professor McGonagall.

Some parts are far more simplistic than Rowling would write them, but aren’t exactly wrong with regards to the Harry Potter universe. Like: “Magic: it was something Harry Potter thought was very good.” Indeed he does!

It ends with another bit of prose that’s not exactly Rowling’s style, but it’s certainly an accurate analysis of the main current that runs throughout all the Harry Potter books. It reads: “‘I’m Harry Potter,’ Harry began yelling. ‘The dark arts better be worried, oh boy!’”

Harry Potter isn’t the only work of fiction that Jamie Brew—a former head writer for ClickHole and the creator of Botnik’s predictive keyboard—and other Botnik writers have turned their attention to. Botnik has previously created AI-generated scripts for TV shows like The X-Files and Scrubs, among other ridiculous machine-written parodies.

To delve into all the magical fiction that Botnik users have dreamed up, follow the studio on Twitter.

[h/t The Verge]

Amazon's Best Cyber Monday Deals on Tablets, Wireless Headphones, Kitchen Appliances, and More

Amazon
Amazon

This article contains affiliate links to products selected by our editors. Mental Floss may receive a commission for purchases made through these links.

Cyber Monday has arrived, and with it comes some amazing deals. This sale is the one to watch if you are looking to get low prices on the latest Echo Dot, Fire Tablet, video games, Instant Pots, or 4K TVs. Even if you already took advantage of sales during Black Friday or Small Business Saturday, Cyber Monday still has plenty to offer, especially on Amazon. We've compiled some the best deals out there on tech, computers, and kitchen appliances so you don't have to waste your time browsing.

Computers and tablets

Amazon

- Amazon Fire HD 10 Tablet 64GB; $120 (save $70)

- Amazon Fire HD 8 Tablet 64GB; $84 (save $35)

- HP Pavilion x360 14 Convertible 2-in-1 Laptop; $646 (save $114)

- HP Pavilion Desktop, 10th Gen Intel Core i3-10100 Processor; $469 (save $81)

- Acer Nitro 5 Gaming Laptop; $973 (save $177)

Headphones and speakers

Beats/Amazon

- Bose QuietComfort 35 II Wireless Bluetooth Headphones; $200 (save $100)

- Sony Bluetooth Noise-Canceling Wireless Headphones; $278 (save $72)

- JBL LIVE Wireless Headphones; $100 (save $30)

- JBL Charge 4 - Waterproof Portable Bluetooth Speaker; $120 (save $10)

- Bose SoundLink Color Bluetooth Speaker II; $79 (save $50)

- Powerbeats Pro Wireless Earphones; $200 (save $50)

Video Games

Sony

- Watch Dogs Legion; $30 (save $30)

- Marvel's Avengers; $27 (save $33)

- Ghost of Tsushima; $40 (save $20)

- The Last of Us Part II; $30 (save $30)

TECH, GADGETS, AND TVS

Samsung/Amazon

- Amazon Fire TV Stick; $30 (save $20)

- Echo Show 8; $65 (save $65)

- Nixplay Digital Picture Frame; $115 (save $65)

- eufy Smart Doorbell; $90 (save $30)

- Samsung 75-Inch Class Crystal 4K Smart TV; $898 (save $300)

home and Kitchen

Ninja/Amazon

- T-fal 17-Piece Cookware Set; $124 (save $56)

- Le Creuset Enameled Cast Iron Curved Round Chef's Oven; $180 (save $136)

- Ninja Foodi 10-in-1 Convection Toaster Oven; $195 (save $105)

- Roborock E4 Robot Vacuum Cleaner; $189 (save $111)

- Instant Pot Max Pressure Cooker 9 in 1; $80 (save $120)

- Shark IZ362H Cordless Anti-Allergen Lightweight Stick Vacuum; $170 (save $110)

Sign Up Today: Get exclusive deals, product news, reviews, and more with the Mental Floss Smart Shopping newsletter!

11 Fascinating Facts About Mark Twain

Hulton Archive/Getty Images
Hulton Archive/Getty Images

Mark Twain is widely considered the author of the first great American novel—The Adventures of Huckleberry Finn—but his rollicking tales aren’t the only legacy he left behind. His poignant quotes and witticisms have been told and retold (sometimes erroneously) over the last century and a half, and his volume of work speaks for itself. Over the course of his legendary career, Twain—real name Samuel Langhorne Clemens—wrote more than a dozen novels plus countless short stories and essays and still found time to invent new products, hang out with famous scientists, and look after a house full of cats.

1. Mark Twain is a nautical reference.

Like many of history’s literary greats, Mark Twain (né Samuel Langhorne Clemens) decided to assume an alias early on in his writing career. He tried out a few different names—Thomas Jefferson Snodgrass, Sergeant Fathom, and, more plainly, Josh—before settling on Mark Twain, which means two fathoms (12 feet) deep in boating jargon. He got the idea while working as a steamboat pilot on the Mississippi River—a job he held for four years until the Civil War broke out in 1861, putting a halt to commerce. (However, another popular theory holds that he earned the nickname in a bar. According to reports in a couple of 19th-century newspapers, he’d walk into a pub and call out “mark twain!,” prompting the bartender to take a piece of chalk and make two marks on a wall for twain—two—drinks. Twain denied this version of events, though.)

2. In addition to being a steamboat pilot, Mark Twain also worked as a miner.

Shortly after his stint on The Big Muddy, Twain headed west with his brother to avoid having to fight in the war. He took up work as a miner in Virginia City, Nevada, but the job wasn't for him. (He described it as "hard and long and dismal.") Fortunately for Twain, he didn’t have to work there long. In 1862, he was offered his first writing job for Virginia City’s Territorial Enterprise newspaper, where he covered crime, politics, mining, and culture.

3. A story Mark Twain heard in a bar led to his “big break.”

Historic American Buildings Survey (Library of Congress), Wikimedia Commons // Public Domain

In 1864, Twain headed to Calaveras County, California in hopes of striking gold as a prospector (he didn’t). However, it was during his time here that he heard the bartender of the Angels Hotel in Angels Camp share an incredulous story about a frog-jumping contest. Twain recounted the tale in his own words in The Celebrated Jumping Frog of Calaveras County. It was published in 1865 in The New York Saturday Press and went on to receive national acclaim.

4. It took Mark Twain seven years to write The Adventures of Huckleberry Finn.

Hulton Archive/Getty Images

Twain started writing the sequel to The Adventures of Tom Sawyer in 1876, but he wasn’t too pleased with his progress. After writing about 400 pages, he told a friend he liked it "only tolerably well, as far as I have got, and may possibly pigeonhole or burn" the manuscript. He put the project on the back burner for several years and finally finished it in 1883 following a burst of inspiration.

5. Mark Twain invented a board game.

While Twain was putting off writing The Adventures of Huckleberry Finn, he was busy working on a game he dubbed Memory Builder. It was originally supposed to be an outdoor game to help his children learn about England’s monarchs, but he ended up turning it into a board game to improve its chances of selling. However, after two years of work, it was still too convoluted to be marketable and required a vast knowledge of historical facts and dates. That didn’t stop him from patenting the game, though.

6. Mark Twain created "improved" scrapbooks and suspenders.

Memory Builder wasn't Twain's only invention; he also patented two other products. One was inspired by his love of scrapbooking, while the other came about from his hatred of suspenders. He designed a self-adhesive scrapbook that works like an envelope, which netted him about $50,000 in profits. His “improvement in adjustable and detachable straps for garments” also ended up being useful, but for an entirely different purpose than Twain originally intended. According to The Atlantic, “This clever invention only caught on for one snug garment: the bra. For those with little brassiere experience, not a button, nor a snap, but a clasp is all that secures that elastic band, which holds up women's breasts. So not-so-dexterous ladies and gents, you can thank Mark Twain for that."

7. Thomas Edison filmed Twain at home.

Only one video of Twain exists, and it was shot by none other than his close friend Thomas Edison. The footage was captured in 1909—one year before the author died—at Twain’s estate in Redding, Connecticut. He’s seen sporting a light-colored suit and his usual walrus mustache, and one scene shows him with his daughters, Clara and Jean. On a separate occasion that same year, Edison recorded Twain as he read stories into a phonograph, but those audio clips were destroyed in a fire. No other recording of Twain’s voice exists.

8. Mark Twain did wear white suits, but not as often as you might think.

Topical Press Agency/Getty Images

When you think of Mark Twain, you probably picture him in an all-white suit with a cigar or pipe hanging from his lips. It’s true that he was photographed in a white suit on several occasions, but he didn’t start this habit until later in life. According to The Mark Twain Boyhood Home & Museum, “In December 1906, he wore a white suit while appearing before a congressional committee regarding copyright. He did this for dramatic emphasis. Several times after that he wore white out of season for effect.” He also refused to trade his white clothes for “shapeless and degrading black ones” in the winter, no matter how cold it got. So take that, people who subscribe to the “no white after Labor Day” rule.

9. At one point, Mark Twain had 19 cats.

Twain really, really liked cats—so much so that he had 19 of them at one time. And if he was traveling, he would “rent” cats to keep him company. In fact, he had a much higher opinion of felines than humans, remarking, “If man could be crossed with the cat, it would improve man, but it would deteriorate the cat.” He also had a talent for coming up with some great cat names; Beelzebub, Blatherskite, Buffalo Bill, Sour Mash, Zoroaster, Soapy Sal, Pestilence, Bambino, and Satan were just a few of the kitties in his brood.

10. Mark Twain probably didn’t say that thing you think he said.

Twain is one of the most misquoted authors in history. According to one quote wrongfully attributed to him, “It is better to keep your mouth shut and appear stupid than to open it and remove all doubt.” What Twain actually said was, “[He] was endowed with a stupidity which by the least little stretch would go around the globe four times and tie.” There are many, many examples of these.

11. Mark Twain accurately predicted when he would die.

When he was born on November 30, 1835, Halley’s Comet was visible from Earth. It appears roughly every 75 years, and Twain predicted he would die the next time it graced the sky. As he put it in 1909, “I came in with Halley’s Comet in 1835. It is coming again next year, and I expect to go out with it. It will be the greatest disappointment of my life if I don’t go out with Halley’s Comet. The Almighty has said, no doubt: ‘Now here are these two unaccountable freaks; they came in together, they must go out together.’ Oh, I am looking forward to that.” He ended up passing away at his Connecticut home on April 21, 1910, one day after Halley’s Comet appeared in the sky once again.

This story has been updated for 2020.