Jump to content
Double Fine Action Forums
Sign in to follow this  
Acefox

Chat Intelligence

Recommended Posts

I'm sure you guys have the chat response system well handled, but if I were to do it- I would basically make a system that would interpret all typed responses by both Tone and Meaning:

Tones: Happy, Friendly, Funny, Silly, Casual, Chillaxed, Sarcastic, Amorous, Mean, Angry, Inquisitive, Curious, Concerned, Lewd, Malice, [uncertain]

Meaning: Greeting, Affirmative, Negative, Interrogative, Challenge, Exclamatory, Imperative, Joke, Insult, Banter, Declaratory, Informative, Non-sequitur, Gibberish

The responses from the little buds can then have something appropriate to say, like in response to "F-- you", which would be interpreted as Mean Insult, the little bud would then say "Same to you, buddy!" and maybe he flips you the bird.

Here are some other examples:

User: "Yo", "sup"

Tone: Casual

Meaning: Greeting

Response: Return greeting

User: "hows it hangin?"

Tone: Casual

Meaning: Interrogative - Greeting

Response: Express current mood and Return Greeting

User: "what time is it?"

Tone: Casual

Meaning: Interrogative - Time

Response: "It's Adventure Time!" or [system Date/Time]

User: "what's with your [distinctive trait]?"

Tone: Curious

Meaning: Interrogative - Distinctive Trait

Response: Reply concerning distinctive trait like "Nothing's wrong with my head! What's wrong with your head?" or "My left leg's not big! Why's your left leg so small?"

User: "knock knock"

Tone: Silly

Meaning: Joke

Response: "who's there?" ..and so on

User: "kjslfkajd" "$%^&"

Tone: [uncertain]

Meaning: Gibberish

Response: "That's quite a last name you got there" or "how do you pronounce '$%^&'?"

User: "I love you"

Tone: Amorous

Meaning: Love

Response: "uh... yeeaaah.. I uh.. love you too. Say.. I'll catch you later. I've got a lot of.. standing around to do"

User: "what's the square root of pi?"

Tone: Inquisitive

Meaning: Challenge

Response: "4?" or "about 1.77245?" or "what's the square root of your mom?"

User: "papaya"

Tone: [uncertain]

Meaning: Non-sequitur

Response: "hippopotamus"

Share this post


Link to post
Share on other sites

I know right? It's amazing the chat system wasn't done after Day 1. :cheese:

I didn't mean it to sound like it was something simple or even for it to be something the team should do (they only have 1 more day left anyway). It's just a topic that I find interesting, so I wanted to get a discussion going on how to approach the "problem". In fact, this sounds kind of like a fun project that I might pursue myself on the side.

As Brandon mentioned himself- the topic itself has been studied for decades by computer scientists; they weren't going to waste their time reinventing the space shuttle in two weeks. But I'm excited to see how the chat system was implemented for LPBB.

Any type of solution would have to leverage an existing dictionary and grammar program. Any application/game logic would be built on top of that. The fun part would be the design of that top layer of language interpreter logic.

Share this post


Link to post
Share on other sites

Interesting ideas. Classifying inputs reliably by tone seems like it'd be quite hard to achieve (e.g. when a user types "that's great," are they being sincere or ironic?). But tone is definitely an important component of meaning.

But I'm excited to see how the chat system was implemented for LPBB.

Any type of solution would have to leverage an existing dictionary and grammar program. Any application/game logic would be built on top of that. The fun part would be the design of that top layer of language interpreter logic.

I believe Brandon said DF is using the open source ChatScript engine for LPBB, so you might be interested in these resources:

Gamasutra article - This is Page 3 of 5, which addresses ChatScript syntax. See the other pages for more context and comparison to AIML and Façade's parser.

Sourceforge project - User manual and engine download if you want to try coding with it

Example bot - If you want to talk to a bot made with ChatScript and see how it responds

Of course, these just give an idea of how the engine in general works. Brandon or someone else from DF would have to shed light on the game-specific conversation code he wrote using ChatScript, or any modifications he or Bruce Wilcox may have had to make to adapt ChatScript for use in LPBB. What I write below is just speculation:

From glancing at the user manual, it seems that ChatScript has what are called "gambits," which are the topics that the bot wants to talk about any time it is allowed to steer the conversation. I would guess that this is how conversations in LPBB will nudge the player toward certain actions that lead to critical path gameplay, while still allowing for fun tangents on other topics. The gambits for each little pink bud might involve something like 1) the desire to become your best bud and 2) a psychological preoccupation unique to each bud (like Big Leg's big leg and his feelings about it). LPBB also presumably needs at least one state change in the kind of responses the player might hear after picking one pink bud to be his best bud, thus causing resentment in the other buds.

Share this post


Link to post
Share on other sites
In fact, this sounds kind of like a fun project that I might pursue myself on the side.

As Brandon mentioned himself- the topic itself has been studied for decades by computer scientists;

Well, let me and them know when you're done :)

I'm looking forward to the conversation already:

User: “What is the difference between a cat and a comma?”

Tone: Silly

Meaning: Joke

Response: “Who's there?”

Sounds super easy, too. What will they do with all of their spare time in week 2?

Tone: Sarcastic

Meaning: Negative ............ or Joke ... I don't know, I'd need the software to decide. I found it hilarious either way ;)

Share this post


Link to post
Share on other sites

totally biased, but if someone did SOME sort of 'praise helix' for one of the characters, I personally would love it.

Share this post


Link to post
Share on other sites

Thanks for the links, CaliburnCY. I'll definitely check them out! I actually dug out my old CS notes I had on AI programming including using Prolog. Whereas I'm sure the latest Chatbot scripts are a bazillion times more intelligent, it is fun to see the different ways to approach tackling speech. I'm super impressed how much Brandon and team have been able to implement in just two weeks!

On a related note, I actually have a family member that worked for Google whose background was not in computers, but in English! Makes a lot of sense actually! And yet as another tangential anecdote- I was with a group of friends once when the question came up whether Ted Danson wears a toupee or not. I started typing in Google: "Does Ted" and Google auto-suggested "does Ted Danson wear a toupee" as the first item in the list! Thing's a mind reader!

Share this post


Link to post
Share on other sites
totally biased, but if someone did SOME sort of 'praise helix' for one of the characters, I personally would love it.

Oh man I know what I'm doing in the morning if I remember how to type!

Share this post


Link to post
Share on other sites
Sounds super easy, too. What will they do with all of their spare time in week 2?

Tone: Sarcastic

Meaning: Negative ............ or Joke ... I don't know, I'd need the software to decide. I found it hilarious either way ;)

Looks like that system would at least be useful for my posts. :)

But hey, in the end, if it's hilarious either way, lets just have the pink guys be a little ambigious.

Share this post


Link to post
Share on other sites

I like this idea, it might be more practical to have the user designate tone using IRC conventions than attempt to categorize common phrases.

For example: ALL CAPS FOR SHOUTING

Share this post


Link to post
Share on other sites

Just watched the recording of the Twitch stream and the ChatScript performance was a bit underwhelming. It looks like ChatScript is pretty powerful so maybe it's just a matter of lots more scripting, although maybe it also makes sense to, as a fallback, run sentences parsed through NLP/keyword extraction w/ something like NLTK to see if you could get better results.

There's been a lot of work on sentiment analysis (mainly work on social media corpuses, like tweets) which might be a good fit. Check out: http://nlp.stanford.edu/sentiment/index.html

Share this post


Link to post
Share on other sites

I think it was a design flaw to try and make teh buds intelligent... had they been really dense, or maybe just starting to learn english, it would've worked better IMO and added to the cute factor.

Of course that would mean less of that complex/funny dialog... but even then that means less VO work and they'd rely more on body language and situational story-telling

Share this post


Link to post
Share on other sites

I'm hoping the ChatScript files will be accessible in the prototype. Unless they're deliberately obfuscated, it should be possible to read them to learn a bit more about how the system works. It would be nice to be able to mod the chat scripts; given that Brandon's the chat programmer, I'd be surprised if he didn't consider the possibility of people extending the system (in fact, I wouldn't be too surprised if there's Hack 'n' Slash messages buried in the ChatScript data).

Share this post


Link to post
Share on other sites
I'm hoping the ChatScript files will be accessible in the prototype. Unless they're deliberately obfuscated, it should be possible to read them to learn a bit more about how the system works. It would be nice to be able to mod the chat scripts; given that Brandon's the chat programmer, I'd be surprised if he didn't consider the possibility of people extending the system (in fact, I wouldn't be too surprised if there's Hack 'n' Slash messages buried in the ChatScript data).

WELL

HMMMMMMMMMMMMMM

I can neither confirm nor deny that we are shipping with loose files for both Lua and ChatScript, essentially exposing the entire game to You, The Community.

Anyway we're doing our final testing now so it should be showing up on steam/humble before tooooooooo much longer.

Share this post


Link to post
Share on other sites
Anyway we're doing our final testing now so it should be showing up on steam/humble before tooooooooo much longer.
Yay!

Share this post


Link to post
Share on other sites

Really curious to hear the LPBB team's opinion of ChatScript. If you guys have the opportunity to make LPBB a full project, do you think you'll stick with ChatScript?

Share this post


Link to post
Share on other sites
I'm hoping the ChatScript files will be accessible in the prototype. Unless they're deliberately obfuscated, it should be possible to read them to learn a bit more about how the system works. It would be nice to be able to mod the chat scripts; given that Brandon's the chat programmer, I'd be surprised if he didn't consider the possibility of people extending the system (in fact, I wouldn't be too surprised if there's Hack 'n' Slash messages buried in the ChatScript data).

WELL

HMMMMMMMMMMMMMM

I can neither confirm nor deny that we are shipping with loose files for both Lua and ChatScript, essentially exposing the entire game to You, The Community.

Anyway we're doing our final testing now so it should be showing up on steam/humble before tooooooooo much longer.

Has this 10 day game jam turned into a 14 day thing :D? Did you guys stick in any new features/responses/recordings/polish in the last 4 days? Just bug fixes?

Share this post


Link to post
Share on other sites

I talked about it in another thread but for the most part, no, we didn't do any work beyond day 10. We fixed 1 crash and like 2-3 REALLY minor things (sound effects looping in one spot where they shouldn't, stuff like that) but then had to spend time packaging them up for steam distribution (takes a while to set up the first time and then test). Anyway, the games are all up on humble now and are propogating to steam!

Share this post


Link to post
Share on other sites
Really curious to hear the LPBB team's opinion of ChatScript. If you guys have the opportunity to make LPBB a full project, do you think you'll stick with ChatScript?

Brandon and I talked a bunch about this, and we both agree that Yes, we'd keep using ChatScript. Bruce Wilcox (author of the system) had some super interesting advice for how we'd address some of the issues we saw with the system (things like multiple chat bots talking to one another and some grammar / word analysis bugs)... Also generally ChatScript wasn't where most of the hard problems came from in the prototype, most of those showed up when we need to do things like "play this animation AND say this voice line AND run this chat script AND allow the player to interrupt the dialogue AND if the player interrupts the dialogue run this other chat script AND play an angry animation AND play this other line of dialogue AND on and on and on."

Literally on the last day all of those systems finally played well together and we came up with a good little framework to do further development. We'd honestly be giving MORE power to ChatScript if we continue on with this... Basically we want to create a fully interactive fiction command-line prototype that does things like describe stage direction and character actions and THEN run the 3D game on top. As it stands we have a pretty decent command-line version available to try out but it doesn't take things like bot location and mental state into account very well.

Share this post


Link to post
Share on other sites

Cool! Glad to hear such a positive opinion of ChatScript -- now I want to try playing with it too :)

Share this post


Link to post
Share on other sites

I would absolutely love to see more of Pen's warped imagination in game form. And I don't see anything wrong with the chat system. It just didn't really have the time to be fully developed with enough responses in two weeks. I would have a suggestion for the full game though. Time should either stop or slow when you are typing, I think, because typing in the prototype seems to take longer than the buds are willing to wait.

Share this post


Link to post
Share on other sites

Did the prototype release with any form of working chat? I can friend Big Leg (typing "yes" as a response thanks to Ben's documentary shortcut) but beyond that, it seems like it's not listening or just not understanding anything at all...

If it didn't make it in there, I'd certainly not be surprised... quite a feat to get it to where it is in 10 days!

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...