Skip to main content

Members Latest

Stargate | How the GPT-3 A.I. Wrote its First ‘Starcake’ Script

The Companion looks so much better on our free app. Customize your feeds, get notifications on new content, and stream podcasts with our in-app player.

Download it from App Store for iPhone or Google Play for Android now – and don’t forget to rate and review!

A few weeks ago we spoke to Janelle Shane, research scientist, custodian of the fascinating, and author of You Look Like a Thing and I Love You: How AI Works and Why It’s Making the World a Weirder Place, to learn more about the challenges involved in using artificial intelligence to compose an all-new Stargate screenplay.

Before we first spoke, Janelle ran a test herself using GPT-3 – Generative Pre-trained Transformer 3 – the latest text-generation machine learning too from OpenAI in San Francisco. Born May 2020, GPT-3 has a staggering 175 billion machine learning parameters that inform its decision making and by chewing up as much of the internet as it could, is capable of writing text indistinguishable from that produced by a human. (It’s already being used to generate text-based adventures games at AI Dungeon, so if this is the Rise of the Machines then I welcome our chrome-plated overlords.)

As Janelle previously explained, by making their decisions based on the most likely combinations of words and without the memory to keep hold of where the conversation has been, most A.I. would have found itself repeating platitudes back and forth like an awkward first date.

From the outside, GPT-3 looked like our best hope of producing something halfway coherent.

“It’s still in restricted access,” explains Janelle, “but it’s one of the best things out there that we have for keeping track of text over a long period of time. And this was trained on just a whole bunch of texts scraped pretty indiscriminately from the internet. So my assumption going into this experiment was, perhaps it had seen some Stargate scripts online, or maybe some scripts in general.

“So I gave it a section of an existing script, and said, ‘Okay, if I give it a few paragraphs, and maybe a couple of lines of dialogue, will it add onto that with the rest of the script?’ It’s pretty good at following my lead, so I was pretty sure I would get a script of some sort, but what I didn’t know is whether it would generate a Stargate script and it sure did, actually!”

[See also: Stargate | How Does Artificial Intelligence Write New Stargate? by James Hoare]

Free memberships are back! You can join The Companion and pay nothing for your first month.

Members enjoy daily long-reads on Stargate, Star Wars, Star Trek, and more, podcasts with stars and showrunners, and over a hundred behind-the-scenes sci-fi stories.

If we don’t win you over, simply cancel at any time during that first month and you won’t be charged.

Back-Door Auto Pilot

And just like that, we had our fourth Stargate series, sort of. Taking Janelle’s sample as its starting point, GPT-3 quickly began introducing other characters of its own volition – creating an odd crossover between the 1994 Stargate movie and Stargate Atlantis, but it was originally far more outlandish, bringing in characters from other shows or spiraling into obscenity.

All to be expected when you’ve spent the first year of your life building a portrait of humanity’s creative achievements based on what it posts on the internet.

Despite the brevity of the script that Janelle coaxed out of GPT-3, it was a labor-intensive and heavily edited process with lines being generated two at a time and then jettisoned if they made no sense, became repetitive, introduced John Steed from The Avengers, or got nasty. This is typical. Not the precise scenario (because that would be really weird), but the level of human prodding involved. An example Janelle gives in her book, You Look Like a Thing and I Love You: How AI Works and Why It’s Making the World a Weirder Place, is of customer service chatbots that quickly switch over to a human if the conversation outpaces their ability to follow it and then seamlessly switch back when the situation is resolved, creating the illusion of a wholly human operator on the other end.

“Different people working with A.I. will have different approaches to how do you then turn this raw A.I. text, which is generally not very interesting to read in a raw format, into something that still feels like an A.I. generated text but isn’t so awful to read,” Janelle explains. “Some people will generate 10 different versions of the same script and then edit them together line-by-line and do a bunch of editing. I find it more transparent, maybe, if you know everything you see is written word for word by the A.I. but maybe I had it start over a few times.”

[See also: Stargate | How the New Script Project Began – A.I. Diary 1 by Lawrence Kao]

Brad Wright’s announcement, click here to find out more.

Amazingly, this wasn’t even the most time-consuming bit, as Janelle admits: “It took me longer to figure out what the starting text I wanted it to complete than it took to actually make a complete text. You can generate paragraphs of text in the blink of an eye but trying to figure out what opening will give it a set of ongoing dialogue, introduce some characters, and already have some kind of scene where you’re talking about stuff.”

As one of Janelle’s enduring fascinations is A.I.’s ability (or inability) to compose recipes, she introduced cake to the opening text, to see if the A.I. would riff on the subject as it generated the rest of the scene. This original element is potentially the key to actually getting an A.I. like GPT-3 to create something that passes as ‘new Stargate‘.

“GPT-2, especially GPT-3, they’re pretty good at imitating human writing, such that they are good at imitating your most average, common denominator. Like what has the average human on the internet written? Or what is the average script that you find on the internet? And it’s going to play it safe and try to stick to that because that’s the most probably as far as it’s concerned. So the trick is to try and nudge it in more interesting directions.”

So without further ado, The Companion is proud to present the first experiment in creating a Stargate screenplay written by artificial intelligence…

Starcake SG-Bun

All formatting decisions are the A.I.’s own. Don’t blame the computer for ‘Starcake SG-Bun’ though, that was all me…

If you enjoy this weird snippet of original Stargate from the mechanical mind of GPT-3, please share the article with your friends.

Coming Fall 2021: A world exclusive cast readthrough of a brand new Stargate mini-episode written by artificial intelligence. It’ll be better than this one, I promise. Join us now to guarantee your place.

GPT-3 is not the SG-1

The interesting thing here is that GPT-3 successfully concludes the scene, sort of. Whether that’s a coincidence or it realized that where you have Ronon you have Rodney and that scenes with the duo end with some sort of gag. It’s not the most sophisticated bit, but give GPT-3 a break – it’s not even turned two.

Whilst Starcake is wonderfully surreal, it’s not exactly Stargate is it? And the seams are still very visible. For instance, the A.I. successfully builds on the conversation about cake but by the end of the scene, an actual cake seems to have appeared. So either GPT-3 can’t work out what makes the two things different, or it has already forgotten what state the cake was in.

If GPT-3 has a future in Hollywood, it’s a very long way away from scriptwriting but it might make a pretty decent office assistant. It’s certainly not going to give us the new Stargate script we want, not without Brad Wright hand-feeding it pipettes of liquid story like an orphaned baby bird.

“There are some tools out there based on GPT-2, GPT-3 that will suggest sentences to follow what you’ve already written,” agrees Janelle. “Or if you give it a summary of a paragraph it will try and fill in the action. And in terms of filling in copy and getting words on a page, it’s a fast way of doing that. So for certain applications – student essays! – or these sorts of spammy blogs that nobody actually reads, it’s really good at just turning out the content. And I do think there’s a market for that.

“But for this sort of use for creative writing that’s supposed to pass as human-written as opposed to A.I. written, it’s tough. Because it is tough to get it to be unique and get it to sound like your own voice.”

Recommended Articles

Testimonial Author Image

James is editor of The Companion. He has been “working in publishing” since the early 1990s when he made his own Doctor Who fanzine to sell in the school playground.

You can find him on Twitter @JDHoare

Looks like you’re using an ad blocker that may prevent our website from working properly. To receive the best experience, please make sure any blockers are switched off and refresh the page.