BadCupid: Procedural romance in a digital world
“Jane Austen, whose interests include travel, money, and film.”
The easiest way to think about procedural generation is by imagining a huge grid of square cells, where each cell has a chance to become black or white. A set of simple rules are put in place to set the scene: If a white cell has less than two black cells neighbouring it, it becomes a black cell. If a white cell has two or three white cell neighbours, it stays unchanged. If a white cell has more than three white celled neighbours, it becomes a black cell. If a black cell has exactly three white celled neighbours, it becomes a white cell too.
These simple rules can lead to strange outcomes. From infinite loops, to geometric shapes, to two-dimensional cave systems in video games, each mimicking the equally simple behavior of cellular automata. Like cellular automata, through procedural generation things are built not authorially by hand but by algorithm. The results are often random, and can be infinite and varied.
So if you're building levels of meandering caverns or creating vast landscapes or a digital topology, then it makes sense to generate endless variations of matter. But it's a lot harder when you're dealing with a concept like personality. Because, what are the parts of a person that can be made into procedural traits? In other words, how do you turn a person into an algorithm?
For that matter, what is a personality?
In one way or another, human beings have been trying to answer this question for millennia. From astrology and horoscopes in the East and West, to psychological profiles and personality types - Myers-Briggs, The Four Temperaments, Jungian archetypes, and many others. There's the so-called Big Five, which outlines five basic personality traits that make up every person: Openness to experience, conscientiousness, extraversion, agreeableness, and neuroticism.
And when you're making a procedural generation-laden game about love, compatibility, dating, and rejection, it's important to break down your thoughts on this sort of thing ahead of time.
For the past several months, Tanya X. Short and her team at indie studio Kitfox Games have been developing BadCupid, a digital betting game that turns procedurally generated dates into a game of prediction.
Subtitled "Procedural Romance for The Digital Age," BadCupid currently features a roster of thirty characters and counting, many of which are created and submitted by its small but growing community.
There's Jane Austen, whose interests include travel, money, and film. There is Gary, a mild-mannered accountant-turned-ghost who seeks vengeance in the afterlife and is partial to food and sports. There's The Necrodancer, a controlling and insecure, yet surprisingly romantic ghoul from the indie game Crypt of the NecroDancer. There's William Shakespeare, who is from England and works as a professional playwright and poet, and Reptod who is a secret lizard.
Like its spiritual godfather SaltyBet - the cult platform for betting on the outcome of virtual fights between scores of characters - BadCupid is at its heart a niche comedy game. But after watching dates between bards and ghosts for a few consecutive rounds, it's also a strangely fixating sport.
A round starts after players vote on a location to take the procedural pair. In this case it's an art gallery, where our datees are Officer Dooley - a pixelized cop from indie game The Darkside Detective - and Zaraden, a kind of black-eyed manic pixie.
Characters flirt via a procedurally generated string of interactions, and to start things off the date between our pair begins well, with an exchange of hellos and some sensible small talk about food. During the first few turns - in which both characters generate one line of dialogue each - Dooley talks about his love of French cuisine. Zaraden likes where things are going. "That sounds nice," she says. But Dooley starts to get cold feet when Zaraden invites him out on a second date.
"Next time, let's go to a concert!" says Zaraden, text bubble hovering hopefully over her shoulder. "What do you think?"
Officer Dooley performs an awkward neck-scratching animation.
"Not at all..." he says.
The social awkwardness ebbs and flows for a turn or two. But by Turn 11 Zaraden reaches out. She tries to touch Officer Dooley on the eyes and she opens her lips. Suddenly they kiss. This is all narrated in on-screen text. Their love bars, two bars that fill and empty independently of each other but dependent of their characters, fill together as one. The kissing intensifies. The bars have filled fully and the round is over. Team Love wins.
Kitfox Games is a Canadian studio perhaps best known for games like Moon Hunters, The Shrouded Isle, and Boyfriend Dungeon. Both the studio and its captain have become something of a monument for procedural generation in indie gaming. In 2017, Short edited a book on procedural generation, fittingly titled Procedural Generation in Game Design. Likewise, each project in the Kitfox Games oeuvre has had its own flavor of procgen to it. In Moon Hunters, a constantly changing generated world; in The Shrouded Isle, the personalities, habits, vices, and relationships of cult members are procedurally generated.
"Deciding personality traits is absolutely a statement about how your game's world works," Short tells me. "What defines people, what makes them unique, what motivates them. The analogy in an FPS would be deciding the strength of gravity, or maybe the speed at which a bullet can travel."
In BadCupid, each character - or contestant, as they're known here - has a personality made up of five major traits: Eagerness, Charm, Romance, Confidence, and Purity. They also begin the date with some initial stats that measure their preference toward jerkishness. Is the character a jerk? Do they like jerks? To see all of these stats, players have to subscribe to the streaming service Mixer for $5.99 USD, but even with that info at hand, no pairing is ever a sure thing.
"As far as I know there is no pairing that is 100 per cent guaranteed for rejection or love. Compatibility can make love much more likely but the outcome of a given date is randomized enough that it isn't knowable until it runs," says Short.
"We chose the character traits for BadCupid with the desire to use them to make characters act in noticeably different ways, specifically while on a date. So, over time, you can 'get to know' them just by watching how they behave. Theoretically, an expert eye could see that one character is more Eager, taking the initiative more often, while another character is more Cold and rebuffs advances more often than not. Or, of course, subscribers can just get these stats for themselves straight from the Book of Love."
Like a fighting game, every move is procedurally generated. Flirtatious social moves, like kicks and counter-punches between fighting AI, go back and forth over a series of turns. On the human side of things, players watch this algorithmically controlled date taking place between two random characters and bet on the outcome over Mixer. Betting takes place between the minutes-long rounds, with users putting down "Arrows," the in-game currency, to vote on whether they think the date will end in "Love" or "Rejection."
"To some extent, fighting game AI 'procedurally generates' some dudes kicking and punching each other," says Short. "Similarly, BadCupid procedurally generates some folks flirting with each other. They pick 'moves' based on their personality stats. Only Jerks can do the Insult move, only high-Purity characters can do the Confess Love move, etc. And then the stats of both characters factor into the move success or failure."
Likewise, romantic characters are more vulnerable to flattery, and characters who are Charming are generally more effective, except in dates with Pure characters who are highly resistant to physicality-based moves.
"Purity and Jerk status are probably the most fleshed-out right now and easiest to see if you watch closely," says Short. "Jerks and both high- and low-Purity characters have a number of special moves and reactions. The others - Eagerness, Charm, Romance, Confidence, Coldness - are a little more subtle right now, and we're debating internally how and whether to bring them to the forefront or keep them for expert strategizing."
The biggest challenge, however, is creating procedurally generated characters that are still interesting.
The studio had always held off on generating characters, says Short. "Because, well, it's terrifying for the same reasons it's fascinating. Cellular automata creating dungeon rooms is nice and all, but they can't help me generate a ladykiller or maneater."
In her GDC 2018 talk "Writing Modular Characters for System-Driven Games," she discusses how the "uncanny valley" makes it difficult to generate people in ways that it might not affect when generating landscapes or objects.
Characters, says Short, are both a fantasy and a nightmare to write for as a procedural designer. Because for all the interesting infinities procgen can produce, it tends toward blandness - what procedural generation expert Kate Compton refers to this as the 10,000 Bowls of Oatmeal problem: "I can easily generate 10,000 bowls of plain oatmeal, with each oat being in a different position and different orientation, and mathematically speaking they will all be completely unique, but the user will likely just see a lot of oatmeal."
In a world of rocks or blades of grass, a lack of uniqueness is only slightly tedious. But it is magnified when what is being generated is something more complex, like a person. "Humans are excellent pattern finders. And patterns in generated people feel more artificial and alienating than patterns that we see in generated places or objects. There is no such thing as an uncanny valley for furniture," says Short.
In BadCupid, Short finds a solution to this uncanny valley problem by embracing what fits so naturally in a game about bad dates: comedy.
"I think avatars and game characters are most satisfying when they're expressive, stylized archetypes rather than necessarily accurate or 'realistic' ones," Short tells me. "We generally want realism in dialogue and plot, but I think we actually want exaggeration in personality types. The way the Big Five is determined, we are all mostly by definition average along most axes, which helps us survive contact with society, but we want our protagonists at least to be more extreme, whether as a fantasy or as an anxiety. Of course BadCupid being a comedy game throws any and all of that out the window in its absurdity both in premise and in execution."
In BadCupid, all actions are verbal, but importantly they each depend on particular personality traits of the character. The game uses a "replacement grammar" inspired by Kate Compton's Tracery language, which follows a procedure that replaces variables with pre-selected word pools. Each character has basic sentence patterns which are used as a blueprint for their dialogue.
"Many many blueprints, and millions (possibly billions, I haven't done the exact math) of possible outcomes," says Short. Each "move," a Compliment, or Kiss, or Insult, has a collection of five-to-20 blueprints/patterns it can use. An action like "Confess Love," which is available only to particularly Romantic characters, has seven basic patterns it can take. These patterns are pre-written slices of dialogue, relatively simple sentences peppered with randomly-generating variables that will change depending on the character's personality.
For the pattern "I %loveWord your %feature... %aLot!" one character might say "I really like your fingers... too much!" while another says "I adore your accent... A LOT."
"The reactions are somewhat different based on what kind of outcome, high success, low success, low failure, etc., but also that character's personality, with a bit of randomness," says Short. "The most common move, known as 'Small Talk,' sometimes become so widely varied that we don't really know what the characters will ask and reply to each other, so that gets a bit chaotic."
"Procedural content and comedy are a natural fit together due to the way jokes themselves are always based in surprise and unexpected contrasts," says Shorts. "And A.I. are very good (one might say, when they're broken, too good) at finding surprising connections."
"The uncanny valley problem also doesn't really come into play when you acknowledge both parties are A.I. to begin with. Nobody wants Two Google Homes Talking to be identical to two humans talking -- that would be distressing. We want them to sound like two Google Homes, by which I mean they want it to sound distinctly inhuman, ideally in both subject matter and grammar mis-use. So the humor comes from their unique perspective and priorities, in finding things to say that it's unlikely any human would ever say. It's still a delicate line to walk of course, since total nonsense isn't funny at all. You need to give them just enough human-like language to set up expectations of certain speech patterns, and then subvert them, like any good comedian."