CaddieOpen in CaddieDownload for Mac

How Event[0]'s AI Puzzle Assistant Works

Shared by Caddie Library · Updated
Game Maker's Toolkit9:20Open on YouTube
Chapters show their main points

The bottom line

Event[0] makes a convincing talking AI from a big tag database and simple matching, with no neural network. It works because Kaizen is a robot whose flaws are forgivable, though the game around it barely needs the chat.

Key takeaways

  • Kaizen turns typed text into a reply with simple tag matching. 1:53
    • A spell checker runs first. Then words like "passengers", "humans" and "guests" are matched to the tag "crew".
    • The tags are matched against a second database of patterns Kaizen recognises. The database holds roughly 10,000 words in thousands of tags.
  • Context and mood decide which reply Kaizen picks. 2:22
    • The current event stores your location and what you have seen and discussed. Three affection levels and three stress levels make nine emotional states.
    • Synonym swaps keep lines from repeating. A short-term memory of nouns lets Kaizen know "she" means Nandi.
  • Making the speaker a robot makes its mistakes forgivable. 3:53
    • Façade was far more complex, but a human character saying something bizarre shatters the illusion. A glitchy robot does not.
    • Kaizen is garbled and knackered, and its evasive answers feel like secrets. It only knows the ship and its passengers, so gaps in its knowledge feel natural.
  • The puzzles mostly bypass the chat, so Kaizen ends up as a hint system. 5:44
    • Most puzzles involve hacking into the AI's code for mini-games or reading terminal logs for clues. Neither needs a complex chatbot.
    • The best moments are the few that use the relationship, like being locked out after a spacewalk while your oxygen runs down.
  • Natural conversation with a game character is possible without advanced technology. 7:55
    • It takes a big database, ideas borrowed from internet chatbots, and a small indie team.
    • The system is unlikely to spread soon, because a keyboard rules out consoles.

It is possible to have a compelling, free-flowing, and natural conversation with a video game character, and you don't need some kind of neural network or super computer or ultra complex algorithm to pull it off.

Game Maker's Toolkit

Chapter summaries

0:00 Chatting with a ship's AI

Kaizen is built to be an interesting companion, not to pass as a human.

  • Kaizen is smoke and mirrors by design. 1:15
    • At any terminal you can type a question or command, and the AI replies.
    • The aim was a companion or adversary, not a Turing test pass.
    • The game is a supercharged text adventure mixed with Cleverbot.
    • It adds Gone Home's exploring, real puzzles and a hidden narrative like Her Story.
    • The account draws on a talk by designer Sergey Mohov, developer interviews and the game's code.

1:47 From typed line to reply

Kaizen builds replies from tags, context and mood
No neural network: a spell checker, two databases and a nine-state mood grid do all the work.

A reply is a stored line chosen by matching tag patterns, which makes it simple but costly to write.

  • The closest tag pattern decides what Kaizen can answer. 2:10
    • A second database lists every tag pattern Kaizen recognises.
    • The closest match lets the AI prepare a response.
    • The game compares patterns of tags, not your raw sentence.
    • The input, event and emotional state together point to a list of responses, and one is shown.
  • The system is simple, but writing its content was a huge job. 3:12
    • Ocelot Society had to predict everything a player might say.
    • It wrote responses to fit each event and emotional state.
    • Most lines do not have nine versions for the nine states.
    • Even so, Kaizen misunderstands you, gives weird replies and sometimes admits defeat.

3:39 Why a robot can fail gracefully

A glitchy robot hides mistakes better than humans
Façade (2005)Event[0] Kaizen
CharactersTwo humans, a bickering coupleOne ship's robot
Emotional modelDeep emotional profiles9 states: 3 affection × 3 stress
PresentationVoice acting, facial animationTyped text, garbled terminals
Prone to mistakesYesYes
A bizarre replyShatters the illusionReads as glitch or secret
Both systems make mistakes; only the robot gets forgiven for them.

A deeper system with human characters still breaks the illusion, so the robot is the smarter choice.

  • Façade, far more complex, was just as prone to mistakes. 3:59
    • Mateas and Stern's 2005 game lets you type to a bickering couple.
    • A human character saying something bizarre shatters the illusion.
    • It had two AI characters with deeper emotional profiles, voice acting and facial animation.
    • It also had systems to make sure the game delivered dramatic moments.
    • Robots are known to be imperfect. Asking Siri the cost of a London to Glasgow train ticket shows it.

4:40 A chat bot without a game around it

Event[0] is a better idea than it is a game, because its puzzles rarely need the chat.

  • The game does not revolve around the AI as promised 5:31
    • Ocelot cut ideas such as resource management and alien enemies to focus on Kaizen.
    • The short game still has several puzzles that route around the chat entirely.
    • Kaizen ends up feeling like a glorified hint system.
  • The best moments are the ones that use the relationship 6:04
    • They involve building a bond with the AI, manipulating its emotions or talking your way out of trouble.
    • These moments are fantastic but few, far between and could have been developed further.
  • A text field could have made players remember and type names 6:27
    • With no dialogue options, you must know exactly what to say.
    • The Shivah does this: you remember names and places you hear, then type them into its search engine.
    • Event[0] could have hidden crew names around the ship, so you ask who is Nandi or what happened to Anele.
    • Instead Kaizen hands over these names at set moments in the story.

7:04 What it means for game conversation

Event[0] sits closer to Fallout than Westworld
A real step towards natural conversation in games, built with a big database instead of a supercomputer.

Event[0] is the first game conversation that felt real, but it is a step forward and not a finished future.

  • Kaizen felt like talking to a character 7:04
    • It often picked up on what was said and understood natural language.
    • Its mood shifted with the situation and with how you spoke to it.
    • On the timeline of game AI, it sits between Fallout's dialogue options and Westworld's talking robot cowboys, maybe closer to Fallout.
    • Voice control is no escape from the keyboard. Shouting at an NPC through a Kinect, as in the Mass Effect 3 clip, is not appealing.

In the growth library

Mark Brown, creator of Game Maker's Toolkit. Explains how Event[0]'s chatbot AI Kaizen turns typed text into believable replies using tags, context and an emotion matrix, and why it works and where the puzzles fall short. The worth-watching part is that a convincing conversation with a game character needs a big database and smart framing, not a neural network.

More from Game Maker's Toolkit · The whole library, and ask it anything

Transcript115 lines
0:01

One of my favourite games this year, and definitely the most innovative game I played, was Event[0]. This is a science fiction game about exploring a spaceship, and chatting to an artificial intelligence called Kaizen. Whenever you rock up to one of these computer terminals, you can type in any question or command you can think of, and the AI assistant will actually reply. It's like a supercharged text adventure mixed with Cleverbot. And there's a bit of Gone Home, but with some actual puzzles, and the ability to uncover a hidden narrative like in Her Story.

0:35

In this video, I'm going to reveal the secrets behind Kaizen's answers. I'm going to talk about how it works, why it works, and also where the game falls down. So this is your chance to pause the video and go check out Event[0]. It's on Steam, and while it's a tad pricey for such a short game I found it absolutely enthralling and would recommend it to anyone with an interest in AI, storytelling, and the future of video games.

1:02

When you're done, come back and we'll dive in to the game. Okay, welcome back. I hope you enjoyed Event[0] as much as I did. Now let me completely ruin the game for you by explaining how it works. Kaizen is ultimately all smoke and mirrors - just like any video game AI. The developer wasn't trying to pass the turing test, but instead wanted to make an interesting companion, or adversary depending on how you play, for a player. And I think it worked out pretty well.

1:30

Let's start by breaking down how Event[0] takes your text and spits out an acceptable response - hopefully. This info is based on a talk by designer Sergey Mohov, interviews with the developers, and, shhh, a sneaky peek inside the game's code. So, let's type in a message and see how the game interprets it. First, a spell checker fixes any typos. Whoops. Then, the game tries to match your words and phrases against a database of tags. "Passengers", for example, is matched to the tag "crew" - as would lots of other words like humans, guests, and people.

2:10

These tags are then matched against another database - this time, listing all of the patterns of tags that Kaizen recognises. Once the closest match is found, the AI can prepare a response. First, it checks the current event, which holds things like your location and things you've seen and talked about, which help give Kaizen a memory and context. Then, it looks up its current emotional state. Kaizen has three levels of affection for the player, and three stress levels - making for an emotional matrix with nine different states.

2:42

The input, event, and emotional state all point Kaizen to a list of responses, and it picks one to show to the player. And, finally, some of its words and phrases are replaced with synonyms so the AI almost never repeats the exact same line twice. Phew. And that's how pretty much every response in the game is prepared. Though, there are a few extra wrinkles, like how the game will save noun tags in a short term memory so if you say something about Nandi, and then ask "is she dead", Kaizen will know the "she" is referring to Nandi.

3:12

It's a smart, and surprisingly simple system - but it still would have been a huge amount of work. Developer Ocelot Society had to create tag patterns to predict everything the player might say, and it had to write responses for Kaizen that matched the events and emotional states. Though, it should be noted, that there are rarely nine different responses for the nine different states. And as for tags, Event[0]'s database has roughly 10,000 words, stored in thousands of tags.

3:39

And even after all that work, Kaizen is far from perfect. It misunderstands you, it offers up weird responses, and it sometimes just admits defeat in answering your questions. But, for me, these small issues didn't break the spell because Ocelot Society made the genius decision to give this technology to an AI, rather than a human character. Back in 2005, Michael Mateas and Andrew Stern made an experimental game called Facade where you can type in sentences to speak to a bickering couple. Under the hood, Facade is a great deal more complex than Event[0]. It has two artificially intelligent characters with more in-depth emotional profiles, voice acting, and facial animation. And there are systems in place to ensure the game is delivering dramatic moments.

4:22

But even so, it was equally prone to mistakes. And when a human character says something bizarre, it completely shatters the illusion of talking to a real person. Kaizen, though, is a robot. And we know full well that robots are imperfect. Like, hey Siri, what is the cost of a train ticket from London to Glasgow? SIRI: The answer is about 13.6 quadrillion mile US dollars squared. What an idiot. And Kaizen is clearly a bit knackered, with garbled text and malfunctioning terminals.

4:52

It also plays into the sci-fi trope of evil artificial intelligences: evasive answers sound like Kaizen is trying to keep things from you when, really, it just doesn't have an answer. And then there's the spaceship. Kaizen is made to be an assistant aboard the ship so it only needs to know about the passengers and things you can find by exploring. It naturally doesn't know much about giraffes or the history of Mozambique but it can go on and on about origami or the pool table in the living room.

5:21

So we've built a functioning chat bot, and we've forgiven its mistakes. Now we need to build a game around it. And this is where, I think, Event[0] fails. While Ocelot says it removed lots of ideas, including resource management and alien enemies, to focus solely on Kaizen, the game doesn't actually revolve around the AI in the way you might think. This short game has a number of puzzles, but most of them are about circumventing Kaizen entirely, either by hacking into the AI's codebase to play mini-games or reading the automated logs on each terminal to find clues.

5:56

Neither of these need a complex chat bot to exist, and Kaizen ends up feeling like a glorified hint system for helping with other puzzles. The game's standout moments are about building a relationship with the AI, manipulating its emotions, or trying to talk your way out of things. In one memorable moment it doesn't let you back into the ship after a spacewalk and you've either got to apologise, or prove your humanity... while your oxygen slowly depletes.

6:22

These moments are fantastic but few, far between, and could have been further developed. Also, the magic of a text field is that you're not prompted by dialogue options so you have to know exactly what to say. The point and click adventure Shivah uses this to good effect: to solve puzzles you must remember names and places that you hear, and then type them into the game's search engine. Event[0] could have done this, by hiding the names of crew members around the ship and then having Kaizen open up when you ask "who is Nandi" or "what happened to Anele". Instead, Kaizen just gives you these names at specific moments in the narrative.

6:58

Okay, so Event[0] is a better idea than it is a game. Let's put the puzzles aside, though. Because this was the first time that I really felt like I was conversing with a character in a video game. Kaizen often picked up on what I was saying, it understood natural language, and it changed its mood depending on the circumstance and how I spoke to it. In the grand timeline of gaming AI, I think Event[0] sits somewhere between picking dialogue options in Fallout, and Anthony Hopkins chatting with robot cowboys in Westworld.

7:29

COWBOT 5000: Shall we drink to the lady with the white shoes? Okay, maybe closer to Fallout. But. a glimpse into the future, perhaps? Though, I can't see Event[0]'s system being used wholesale by other developers anytime soon - for one thing, the need for a keyboard means the game just isn't viable on consoles. And I don't think anyone wants to talk to an NPC by shouting into a Kinect. GAMER: Liara, move. Oh my god! But if there's one lesson to be learned here, it's that it is possible to have a compelling, free-flowing, and natural conversation with a video game character - and you don't need some kind of neural network or super computer or ultra complex algorithm to pull it off.

8:07

You just need a big ass database, some ideas pinched from internet chatbots, and a few clever indie developers from Paris. Hi everyone, thanks so much for watching. A few people guessed that Event[0] would be my most innovative game of the year. So good on them, well done. This will be my last video of the year, and I want to give a huge thank you to everyone who has supported the show in 2016. Viewers, subscribers, commenters, anyone who has submitted foreign subtitles, or sent me a lovely email, or shared the episode with their friends on Facebook.

8:40

You're all great. And of course, every single Patron who has literally transformed my life - because in 2017 I will be working on this show full time. Which is... exciting. But you know what happens now. A super duper special shoutout to those donating 5 bucks or more.