Slide 1

Slide 1 text

Games as Conversational Interfaces Workshop Kevin Zurawel, Braintree

Slide 2

Slide 2 text

braintreepayments.com

Slide 3

Slide 3 text

Conversational Interfaces

Slide 4

Slide 4 text

“Conversational Interface” 1. Humans 2. talking with computers 3. in natural language
 (e.g. English)

Slide 5

Slide 5 text

Games

Slide 6

Slide 6 text

Interactive Fiction

Slide 7

Slide 7 text

“Before the first-person shooter, there was the second-person thinker.” - Jason Scott

Slide 8

Slide 8 text

Will Crowther
 Colossal Cave Adventure
 (1975) By Nancyscrowther - Own work, CC0
 https://commons.wikimedia.org/w/index.php?curid=25991397

Slide 9

Slide 9 text

You are in a small chamber beneath a 3x3 steel grate to the surface. A low crawl over cobbles leads inward to the West. The grate is open. > go west You are crawling over cobbles in a low passage. There is a dim light at the east end of the passage. There is a small wicker cage discarded nearby. > take cage Ok. >

Slide 10

Slide 10 text

“It’s estimated that Adventure set the entire computer industry back two weeks.” - Tim Anderson,
 “The New Zork Times”, Winter 1985

Slide 11

Slide 11 text

“It’s a program that sort of reacts to people… here was a thing that gave you the illusion, anyway, that you’d typed in English commands and it did what you said. And of course, behind it all was just a machine doing little things.” - Will Crowther

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

TADS:
 Text Adventure Development System (1988, Michael J. Roberts)

Slide 15

Slide 15 text

TADS 3.1.3 (2013) • “The second most commonly used IF language” • Object-oriented programming language • Web server/client capabilities (“Web Play”) • Built-in conversation system

Slide 16

Slide 16 text

?

Slide 17

Slide 17 text

?

Slide 18

Slide 18 text

disclaimer concepts, not syntax …we’ll talk about JS!

Slide 19

Slide 19 text

TADS 3 Objects startRoom: OutdoorRoom roomName = 'Outside Cottage' desc = "You are standing in front of a brightly-painted cottage. " south = forest ;

Slide 20

Slide 20 text

startRoom: OutdoorRoom roomName = 'Outside Cottage' desc = "You are standing in front of a brightly-painted cottage. " south = forest ; Object name Class inheritance list Close object with semicolon!

Slide 21

Slide 21 text

heavyDesk: Surface, Fixture vocabWords = 'heavy wood desk/table' location = 'cottage' dobjFor(Kick) { action() { "Your foot hurts. That desk is heavy! " } } ; Object name Class inheritance list Close object with semicolon! A method

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Object Templates Shortcuts for specifying commonly-used properties: startRoom: OutdoorRoom ‘Outside Cottage' "You are surrounded by trees in all directions. " ; name desc

Slide 24

Slide 24 text

Containment forest: OutdoorRoom 'spooky forest' "You are standing in the middle of a spooky forest. It is dark. " ; + skull: Thing 'human skull' "A human skull, apparently?" ;

Slide 25

Slide 25 text

cottage: Room 'quaint cottage/home' ; + desk: Surface, Fixture 'heavy desk' ; ++ skull: Thing 'human skull' ;

Slide 26

Slide 26 text

Conversations
 in TADS3

Slide 27

Slide 27 text

The Four Main Conversational Actions •ask [X] about [Y] •tell [X] about [Y] •give [Y] to [X] •show [Y] to [X]

Slide 28

Slide 28 text

Actors forest: OutdoorRoom 'spooky dark forest' "A dark and spooky forest. Why did you come here again? " ; + me: Actor ; + talkingWolf: Actor ;

Slide 29

Slide 29 text

Topics talkingWolf: Actor
 ; + AskTopic @grandma "Have you seen my grandmother? <.p>The wolf pauses. Hmm, doesn't sound familiar… You think you see the start of a smile on its face." ;

Slide 30

Slide 30 text

In action > ask wolf about grandma "Have you seen my grandmother?" The wolf pauses. "Hmm, doesn't sound familiar…" You think you see the start of a smile on its face. >

Slide 31

Slide 31 text

Topics that are not game objects weatherTopic: Topic ‘sunny nice weather’; wolf: Actor; + TellTopic @weatherTopic “Lovely weather we’ve been having, no?, you say.” ;

Slide 32

Slide 32 text

> tell wolf about weather “Lovely weather we’ve been having, no?”, you say. The wolf snorts. “I suppose.” >

Slide 33

Slide 33 text

> ask wolf about grandma "Have you seen my grandmother?" The wolf pauses. "Hmm, doesn't sound familiar…" You think you see the start of a smile on its face. > ask wolf about grandma "Have you seen my grandmother?" The wolf pauses. "Hmm, doesn't sound familiar…" You think you see The repetition problem

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Varying output with response lists + AskTopic, StopEventList @grandma ['Have you seen my grandmother?
 …', 'Are you quite certain?, you say, before describing your grandmother to the wolf.', 'The wolf has nothing further to say.' ] ;

Slide 36

Slide 36 text

> ask wolf about grandma "Have you seen my grandmother?" The wolf pauses. "Hmm, doesn't sound familiar…" You think you see the start of a smile on its face. > ask wolf about grandma "Are you quite certain?", you say, before describing your grandmother to the wolf.
 "Now that you mention it…"

Slide 37

Slide 37 text

Adding randomness + AskTopic, ShuffledEventList @grandma ['Have you seen my grandmother?
 …', 'I'm looking for an elderly woman. You describe your grandmother to the wolf, who listens intently.', 'Excuse me, you say. I’m looking for my grandmother...' ] ;

Slide 38

Slide 38 text

Dealing with questions we didn't expect + DefaultAskTopic "The wolf looks at you quizzically. I have no idea what you're talking about." ;

Slide 39

Slide 39 text

Suggesting topics to the user + AskTopic, SuggestedAskTopic @grandma “Your grandmother is missing, you say? says the wolf.” name = ‘your grandmother’ timesToSuggest = 3 ;

Slide 40

Slide 40 text

> talk to wolf (You could ask about your grandmother.)

Slide 41

Slide 41 text

> topics (You could ask about your grandmother.)

Slide 42

Slide 42 text

Making Actors Dynamic

Slide 43

Slide 43 text

• Alternate topic entries • Actor states • Conversational trees

Slide 44

Slide 44 text

Using alternate topic entries + AskTopic @grandma // the usual response ; ++ AltTopic "The wolf looks aghast. You think I kidnapped her?” isActive = player.hasSeen(ransom_note) ;

Slide 45

Slide 45 text

Keeping track of what is known + AskTopic @otherPeople “Did you see anyone else? , you ask. Yes, a hunter came through earlier, the wolf says.<.reveal hunter>” ;

Slide 46

Slide 46 text

Keeping track of what is known + AskTopic @hunter “The wolf looks puzzled.” ; ++ AltTopic “Oh yes, the hunter...” isActive = gRevealed(‘hunter’) ;

Slide 47

Slide 47 text

> ask wolf about hunter The wolf looks puzzled. > ask wolf about other people "Did you see anyone else?", you ask. // hunter revealed > ask wolf about hunter "Oh yes, the hunter..."

Slide 48

Slide 48 text

Grouping alternate topics + TopicGroup isActive = wolf.isSurprised; ++ AskTopic @grandma ; ++ AskTopic @ransom_note ; + TopicGroup isActive = wolf.frightened; ++ AskTopic @grandma ;

Slide 49

Slide 49 text

> tell man about hair "Your hair is on fire!", you shout. "AHHHHH!" The man starts running around frantically. > tell man about weather "Lovely weather we're having, eh?" "Oh yes, definitely. So nice."

Slide 50

Slide 50 text

Better grouping: Actor States + wolfDefault: ActorState isInitState = true specialDesc = “The wolf is sitting.” ; + wolfSurprised: ActorState specialDesc = “The wolf looks surprised.” ;

Slide 51

Slide 51 text

Transitioning between ActorStates + wolfDefault: ActorState isInitState = true ; ++ AskTopic @grandma topicResponse { “Have you seen my grandmother?” wolf.setCurState(wolfFrightened); } ;

Slide 52

Slide 52 text

The Topic Hierarchy 1. active ActorState 2. matching isActive topic 3. matching topic 4.DefaultTopic

Slide 53

Slide 53 text

Conversational Trees

Slide 54

Slide 54 text

Start Hunter Defensive show ransom note to wolf ask wolf about hunter ask wolf about grandma "I saw the hunter carry
 her away!" "How dare you accuse me of kidnapping her!" ask wolf about eating people tell wolf about footprints

Slide 55

Slide 55 text

“Galatea”, Emily Short (2000) “Galatea is my first released foray into interactive fiction. It is a single conversation with a single character, which can end any of a number of ways depending on the player's decisions. Despite its age, I continue to get strong reactions to it in my email inbox on a fairly regular basis. Some people love it; some people find it annoying or distressing. “

Slide 56

Slide 56 text

1. examine placard 2. ask galatea about thasos 3. ask galatea about gods 4. ask galatea about muses 5. ask galatea about apollo 6. ask galatea about dionysus 7. ask galatea about bonds 8. ask galatea about inhibition 9. ask galatea about pain 10. galatea, pray to dionysus 1. examine galatea 2. ask galatea about herself 3. read placard 4. ask galatea about pygmalion 5. ask galatea about loneliness 6. ask galatea about suicide 7. think about galatea 8. touch galatea 9. touch dress 10. ask galatea about dress 11. ask galatea about owners 12. ask galatea about backdrop 13. examine cheek 14. touch cheek 15. ask galatea about carving 16. ask galatea about pain 17. ask galatea about polish 18. ask galatea about artist 19. ask galatea about love 1. examine galatea 2. say hello to galatea 3. examine dress 4. ask galatea about artist 5. ask galatea about waking 6. ask galatea about fits 7. ask galatea about nightmares 8. ask galatea about shades 9. ask galatea about afterlife 10. ask galatea about gods 11. ask galatea about apollo 12. ask galatea about dionysus 13. ask galatea about illusions 14. ask galatea about masks

Slide 57

Slide 57 text

1. examine placard 2. ask galatea about thasos 3. ask galatea about gods 4. ask galatea about muses 5. ask galatea about apollo 6. ask galatea about dionysus 7. ask galatea about bonds 8. ask galatea about inhibition 9. ask galatea about pain 10. galatea, pray to dionysus 1. examine galatea 2. ask galatea about herself 3. read placard 4. ask galatea about pygmalion 5. ask galatea about loneliness 6. ask galatea about suicide 7. think about galatea 8. touch galatea 9. touch dress 10. ask galatea about dress 11. ask galatea about owners 12. ask galatea about backdrop 13. examine cheek 14. touch cheek 15. ask galatea about carving 16.ask galatea about pain 17. ask galatea about polish 18.ask galatea about artist 19. ask galatea about love 1. examine galatea 2. say hello to galatea 3. examine dress 4. ask galatea about artist 5. ask galatea about waking 6. ask galatea about fits 7. ask galatea about nightmares 8. ask galatea about shades 9. ask galatea about afterlife 10.ask galatea about gods 11.ask galatea about apollo 12.ask galatea about dionysus 13. ask galatea about illusions 14. ask galatea about masks

Slide 58

Slide 58 text

Conversational Nodes + ConvNode ‘accuseWolf’; ++ AskTellTopic @grandma “I know you did it! Where is my grandmother?, you shout. The wolf snarls.” ;

Slide 59

Slide 59 text

Conversational Nodes + TellTopic @ransomNote “There was a note in her bedroom , you say. It looks like your handwriting. Why would that be? The wolf is silent. <.convnode accuseWolf>” ;

Slide 60

Slide 60 text

Asking Yes/No Questions “Are you sure you want know?, the wolf asks.<.convnode confirmReveal>” ; + ConvNode ‘confirmReveal’; ++ YesTopic “Ok; you’re not going to like it.” ; ++ NoTopic “Some things are better left unsaid.” ;

Slide 61

Slide 61 text

> ask wolf about grandma “Are you sure you want to hear what I know?”, the wolf asks. > yes “Ok; you’re not going to like it.”

Slide 62

Slide 62 text

Gating the user's progress + ConvNode 'importantChoice'; ++ YesTopic ; ++ NoTopic ; ++ DefaultTopic "Seriously, yes or no?<.convstay>" ;

Slide 63

Slide 63 text

"So what's it going to be, yes or no?" > ask about weather "Seriously, yes or no?" >

Slide 64

Slide 64 text

Answering Actor Questions + ConvNode 'searchChoice'; ++ SpecialTopic 'search in the forest' ['forest'] "Alright, we'll start in the forest." ; ++ SpecialTopic 'search underground' ['underground'] "Underground it is."

Slide 65

Slide 65 text

"She could be in the forest or underground. Where do we look first?" (You could search the forest, or search underground.) > forest "Alright, we'll start in the forest."

Slide 66

Slide 66 text

Making Actors More Lifelike

Slide 67

Slide 67 text

Greeting Protocols + InConversationState specialDesc = “The wolf is listening to you talk.” ; ++ ConversationReadyState specialDesc = “The wolf is watching you, waiting for you to talk to it.” ;

Slide 68

Slide 68 text

Greeting Protocols ++ ConversationReadyState attentionSpan = 2 ; +++ HelloTopic +++ ByeTopic +++ ImpByeTopic

Slide 69

Slide 69 text

Actor-Initiated Conversations wolf.initiateConversation(nil, 'wolfHelp'); + ConvNode 'wolfHelp' npcGreetingMsg = "The wolf gets your attention. You seem distressed, it says. Do you want me to help you look for your grandmother?<.convnode askForHelp>" ;

Slide 70

Slide 70 text

Agendas + ConvAgendaItem isReady = (inherited() && rand(100) < 33) isDone = (gRevealed('hunter')) invokeItem() { "The wolf starts talking. You know, I saw a hunter come through here not an hour ago...<.reveal hunter>" } ;

Slide 71

Slide 71 text

“Glass”, Emily Short (2006)

Slide 72

Slide 72 text

What about ?

Slide 73

Slide 73 text

Interactive Fiction on the Web

Slide 74

Slide 74 text

Embedded virtual machines

Slide 75

Slide 75 text

“Choose your own adventure” Twine

Slide 76

Slide 76 text

inklewriter

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

The "combinatorial explosion" problem "The interconnectedness of all things in the model world… requires that the author think of every single combination that could validly apply, which is not a reasonable thing to expect from a human writer: A game with 100 objects provides almost five thousand (4,950) potential one-on-one object interactions." TVTropes.org

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Undum

Slide 82

Slide 82 text

The “Holy Grail” •Full simulation •Real-time support •Direct JS access to world state •Free-form user input

Slide 83

Slide 83 text

This doesn’t exist… yet!

Slide 84

Slide 84 text

This doesn’t exist… yet!

Slide 85

Slide 85 text

Resources • TADS • Creating Dynamic Characters in TADS3 • Inform7 • Emily Short’s Interactive Storytelling • Vorple (web-based Z-Machine interpreter) • Twine, inklewriter, Undum (CYOA frameworks) • “Somewhere Nearby is Colossal Cave”, Dennis G. Jerz

Slide 86

Slide 86 text

Thanks!
 Slides: bit.ly/tads-conversation Twitter: @kzurawel