Duration            15 weeks (Jan 14 - May 5, 2019)
Team Size          Solo Project ​​​​​​​
This project is still ongoing. More details will be posted soon.
Project Info:
Machine learning has been applied to recognizing bad players, making predictions on players’ behaviors, generating procedural animations and game levels. These might change how games will be made in the future. Will machine learning also changes how games are played? This project is trying to research, discover and learn about how machine learning can be applied in gameplay. 
The idea I have currently is building a chatbot detective game. The chatbot is trained by machine learning, so it can react freely to whatever players say to it. Players need to interrogate this chatbot to figure out if he is guilty or not. It's Her Story + Chatbot + Machine Learning.
Week 1 - general research
Think about the problem statement and research on the topics. 
Questions to ask / Problems to solve:
 1.  Problem statement for this project?
         ◆ Explore how machine learning can be applied to gameplay? What exactly does that mean?
         ◆ How can machine learning changes the way people play games?
         ◆ How do you define machine learning drives gameplay?
         ◆ Her Story + Chatbot + Machine learning?
2.  Platform?
         ◆ Twitch
         ◆ Web
3.  Technology?
         ◆ NLTK - Natural Language Toolkit
         ◆ PyTorch and DyNet - Preferred machine learning framework
3.  Things people have already tried?
4.  Other ideas?
         ◆ Race a car in GTA against an AI?
         ◆ What about a virtual youtuber?
5.  How can I make simpler prototypes?
6.  How can I make it easier to implement and focus more on game design? ​

Research​​
 1.  Façade
2.  Some available chatbots online
         ◆ Evie
         ◆ Mitsuku
         ◆ Cleverbot
         ◆ Zo
         ◆ Rose

Thoughts
 1.  The chatbots available are not fun to interact with, it's hard to have conversations with them without any context.  What I want to make needs to be more game, less chatbot. It needs to have clear goals, make players more engaged. 
2.  The interactions with characters in Façade are far more natural than with those chatbots. The chatbots respons immediately because they are fast at 'thinking', but it makes them feel less humanlike. While in Façade, characters speak out their replies and have animations, facial expressions, they have pauses, hesitations, which make them look natural.
3.  Research more on how players chat with NPCs in games.

Results
 1.  Stick with the 'Her Story + Chatbot + Machine Learning' idea. Do more research but don't lose it.
2.  Make some simple chatbots in the next week using different platforms, see what's the tools' strengths and constraints. 
3.  Research more on interactive fiction, Twitch chatbots, games on Amazon Alexa and Google Home, procedural content generates and game narrative.
Week 2 - Research on tools
Stick with the Her Story + Chatbot, Research more and make some simple chatbot prototypes using different platforms. 

Process
 1.  Made a simple chatbot using node.js on Twitch  (Twitch Developer Documentation)
         +  Can run on Twitch and there are a lot of game players.
         -   Don't know how to embed natural language processing in yet, all the responses are hardcoded now. 
2.  Made a simple chatbot using Dialogflow that can work in Google Assistant.
         + Easy to implement with intents and answers. 
         + Can be put in Google Assistant and Google Home.
         + It's based on conditions(if users put in A, it will reply with B). But with enough possible inputs, it can learn similar inputs with the same intent. 
          -  Not able to do casual chatting, like what colors do you like, can only give responses on given topics.
          -  Need to figure out how I can get the chatbot out to players.
3.  How to make a chatbot with NLTK.
         + Can make a chatbot that is natural and talks like a human.
         -  Need to find a good dataset.   
         -  Might need to build a specific dataset if I want to work on certain stories and they are not easy to get.

4.  Made a simple chatbot using Chatfuel on Facebook.
         -  Not using Machine Learning, it's just a tool to make simple chatbots.
         -  It's more for business and customer services purposes.
         + It can respond with buttons to click or a link or images.    
Results
Decided to use Dialogflow.
Week 3 - Brainstorms & research on games
Maintain a list of cool ideas and a list of references. Think about what are the right prototypes to make. 

Cool Ideas:
 1.  Chatbot with virtual character and animations 
2.  Make a virtual character, players not only chat with him but also look through his posts or even friends to find clues.
  
References:
 1.  Her story
         ◆ Interesting way of interaction. 
2.  The Return of Obra Dinn
         ◆ Players can tell who a character is with only a glance. Makes players feel exactly like Sherlock Holmes.
3. Façade 
         ◆ Players can talk freely to the characters.
         ◆ The characters have animations, facial expressions, they even hesitate. Makes them more like human beings.
4.  Aisle
         ◆ Players only do one thing in one playthrough, but to figure out the story, they need to do it over and over again. 
5.  Lifeline
6.  General Interactive Fictions

What Prototypes to Make:
Focus on gameplay. Think of different types of gameplay to prototype on.
Decrypt secret messages from an undercover cop/mole
The player is a detective. The chatbot is the player's undercover partner. He’s being watched. He can not talk about the case directly. He needs to hide the information in ordinary daily life conversations. The player needs to decrypt his words to figure out the information. 

Solve Puzzles 
The AI gives players kind of puzzles to solve like what Edmund McMillen did years ago on Twitter. The chatbot can tell players hints. The downside of it is it doesn’t need to be a Chatbot.
As a detective, interrogate a suspect
The question is how to solve a case only by asking questions and talking with someone. Because the interrogation is more about exposing lies, how are players able to get the needed information for exposing lies. 

Can only talk to someone for a very limited time, but can do it over and over again to figure out the truth. (Like Aisle, Re:0)
Players can get different information by asking different information, gather information through multiple playthrough. 
"Time is up, I need to leave"  / "Please come back at the same time tomorrow" or players can just ask one question in one playthrough. And the answer to the question leads to another question. For example:
 1st playthrough:
Player: What were you doing last night?
Chatbot: I was hanging out with Fiona
2nd playthrough:
Player: Who is Fiona?
Chatbot: She is a friend from high school...
A question is what is the difference between having a continuous conversation? Just to keep it easy and simple?
 ​​
Talk to yourself in the past/future to change something (Steins Gate?)
You in the future tells you to do something in the past to prevent something from happening. New information comes from the future me. 

Results
Think about the verbs players have in the experience, come up with a player story.
Week 4 - Research on games & Decision made
Find out the verbs and the states of the world. How do players get new information? How can players affect the states of the world? Come up with player stories. Think about story stack.   

Process
Researched into a lot of detective games and analyze what verbs these games have.  
Week 4's Presentation 

Results
Fantasy - Player is a consulting detective, who helps solve tricky case by talking with the chatbot. The chatbot's identity is still not sure though.
Verbs - Player can only talk to the chatbot, the chatbot goes around, investigates and reports back to the player.
Week 5 - Paper Prototype 
Trying to find what are good puzzles that make players deduct. (Some puzzles make people do deductions, some not)  
Also, some mechanisms focus on deduction and some not.
Mechanism: Players have the tools to get information, they will have enough information to make deductions, (how to make sure players get all the information they need)

Played Sherlock Holmes: Consulting Detective. 
Made paper prototypes based on the Christopher Porco case and the Lions case from Sherlock Holmes. 

 1.  Tried playtesting the Chris Porco case
         ◆ Because Chris is the only suspect in the case, and he also had the motivation, it was pretty clear that he was the murderer. Not many deductions.
2.  Tried playtesting the Lions case from Sherlock Holmes: Consulting Detective, without distracting and irrelevant leads and information.  
         ◆ The goal is to figure out who is the murderer, and why
         + There was an Aha moment
         - Don’t know how to tell players, now you have all the information you need to solve the case
         - The playtester is not discussing the case with me, I was more like an NPC that helped him organize the clues.
         ◆ Need a tool to track the clues. It was pretty linear during the playtesting, playtester got clues that led him to person A, and then A led him to B. Not sure if it was good or not. (Not much freedom)
         ◆ Playtester suggested there needs to be distracting/useless information. (to make players start thinking and backtracking?)  

Conclusions from playtesting:
 1.  It could work. (I didn’t build the chatbot) Using chatbot to make a detective game, and only talking to one person could work.
2.  Players will probably not find any strong direct evidence.
3.  There needs to be a clear goal.

Verbs: Gather Information, Find Connections / Follow Leads
Flow:
Next step: How to present this flow in the chatbot interface?  Start designing my own puzzles?
Other questions need to be answered: How to get players? How to encourage players to talk to the chatbot. 
Week 6 - Digital Prototype
Played another case from Holmes game, and Mysterium. 
Decided to start building digital prototypes using the Lions case. It's not a perfect case, but it has the potential of becoming a better one. And it's the scope I want the game to be. If I find a better case, I can also easily apply the knowledge I gained from the Lions prototype.

Made a digital version of the Lions case. The script can be found here.

Didn't work very well with only the information about the case. The chatbot can't respond to players when they said: "that sounds interesting...". Need to playtest to find out what players will reply to the chatbot in different situations. 

I also want the chatbot to have a delay in responding to the players as Taylor in Lifeline does. 
When building the digital prototype, a lot of questions about the chatbot came up.
 1.  Who is him?
2.  What is he doing?
3.  What is he telling the player?
4.  What are his characteristics? 
5.  How to convey that the player is not walking around in the town?
6.  Who is the player? 
7.  What is the player doing?

Next step: Quick iterate.
 1.  Playtest the digital version, working on what players would probably reply.
2.  Improve the case, might add some other clues. 
3.  (Figure out how to deply the chatbot on Messenger.)
Week 7 - Playtest & Iteration
Deployed the chatbot on Messenger.
Plytested with 4 ETC students. 
Week 8 - Spring Break
Week 9 - Test On Delay
Added a ending session in the prototype, when a player finds he knows who is the murderer, the chatbot will ask him a few questions about the case, and later the chatbot will tell player the details of what really happened if he mad the right accusation. 
Trying to add a delay in between different replies to make the conversation more natural, and to make the experience paced better. 

Process
 1.  In the Lions case, the chatbot asks players who killed the lions, and why, to relay the information to the Scotland Yard, and let the policeman deal with the things left. Then after a while, the chatbot will tell players the truth and the murderer's confession of what really happened.
2.  Made a custom reply prototype using webhook with Dialogflow's API.
When trying to add delay inbetween multiple replies, probelms showed up, with the current structure of Dialogflow's API I can not easily implement the delay feature. (The API is synchronous, I can not use asynchronous method to add the delay. I can write my own IntentHandler method, and add different types of replies in the handler, but the API will only push the replies after going through the whole handler method. ) What it can do now is, after player sends the chatbot a message, it waits for some time, and then replies. 

The only promising approach to implement the delays between multiples replies for one intent is to build a backend that receives messages from Messanger, sends it to Dialogflow agent, and receives posts from Dialogue flow, and then replies to Messanger. 
 -  I am not familiar with backend.
 -  It requires to deal with the APIs of both Messanger and Dialogflow, and can be time-consuming. 
 + It gives the experience a better pacing.

Next Step:
??? Not sure about the delay feature.
More playtest and iterate. 
Week 9 - Refine the Script
Process
Story & Scripts:  Refined all the script. made the conversation more like casual talk. And the AI sometimes have opinions and suggestions. Added some follow up intents. 
Playtest: The messanger bot is still in review, it's not accessible publicly. So I did some mock scenario playtestings where playtesters text to the bot on my phone, the bot replies, but I also reply on the facebook end when the bot is not understanding the player. 
Feedback: 
0. If cut the experience in four parts, the first part is onramping, second and third feel smooth, the fourth part players got stuck.  
 1. feels like chatting: It does to a certain degree. 
2. Make you feel smart: It makes me feel smart sometimes. (In second and third part.)
3. Does the solution make sense?: If I had known the brother sooner, then yes.
My Observations: The interaction is interesting, the puzzle is not that great. It feels more like chatting when there are appropriate follow up questions and answers.
Backend:  Found some useful tutorials, probably can have a backend working next week.  
Week 10 - BACKEND & Delay  
This week is more in tech, and less in design.
Backend: 
1. The back end is working now! I tried using Dialogflow's fulfillment feature previously. The message flow with fulfillment works like this. It gives some room for coding, but very limited. I cannot add a delay feature through fulfillment.
So I moved away, and with the help from Yidi, I set up a server using node.js that receives inputs from users in Messenger, and sends the inputs to Dialogflow, the server then receives answers from Dialogflow and sends the response to Facebook. The server sits in "Your integration, website, or app" part in the following picture.
With the server, the chatbot now is to delay for a few seconds between messages according to how many words the previous message has. Ideally, after users finishing reading the first message, the second message pops, so the delay speed is set to 200 words/minute, which is just a little bit slower than human's average reading speed. And for images, since messenger loads image pretty slowly, so the image doesn't have a delay, but the message right after a image will wait for 8 seconds.
Script Revising: 
The key of the puzzle, the pouches and the leather collars are used to hide jewelry on the lions are very vague to playtesters. So I added more obvious hints in the descriptions of that part, and added more followup questions at that part. 

Playtesting:
While the Facebook review is still ongoing, figured out that I could have testers for the message bots. Added some people as testers, looking for more. It takes a few steps, but at least allows other players to test the bot using their Messenger App.

Next Step:
Focus on playtesting, iterate on the puzzles. 

Week 11 - Analysis On Design

Lions comes from nowhere. 
Combine the lions information with Scotland Yard. 

Long linear path since O'Neil's Home is problematic. 
Want to introduce Thomas earlier. 

where is a good place to introduce 
Week 13 - New Case
Didn't know where to start though with the new structure about the experience. So I improvised a playtesting based on the new structure to help figure out where to start. 
Followed is the current story outline adapted on the playtest. Still working on detailed scripts.
Introduction: Inspector Lestrade is struggling with an international jewels stolen case that can use some of our help.
Scotland Yard -> Inspector Lestrade: introduce Thomas is a suspect for a big jewels stolen case in Oldenburg, but don't have evidence. Thomas’s family lives in London. He has a brother Thomas, who is a 
Parents Home -> Thomas' Mom: Thomas hasn't contacted the family for years. Only hear Thomas’s news from Barry. The two brothers get along well with each other since childhood. Both of them wandering around all over the world. (Barry works at Roy Slade's)
Roy Slade -> Mr. Slade:  Didn’t find Barry, but met Mr.Salde. Barry is the lion tamer in the troupe. He is the only person that can control the lions. Barry broke his legs yesterday, and is still in hospital. They were still talking about finding someone to replace Barry for a tour in France. And two lions were found killed this morning in Hyde Park. 
Barry's Home -> Barry's Wife: The couple just came back from German. Barry broke the legs  Thomas sometimes came to visit, seems interested in the lions. 
Hospital -> Barry: Mad about lions being killed. . Don't know what the stupid brother is thinking. 
Hyde Park: A wagon, blood, lions bodies, leather collar, empty pouches, a gold earring.  
Concerns: 
"We believe Thomas O’Neil is guilty for an international jewels stolen case. He was previously detained by the Oldenburg authorities but no evidence could be found to hold him. We didn’t find these stolen jewels for sale in any markets. We have no idea where he hides the jewels, either. He is now in London, when he came back, he was clean with nothing valuable on him."  
A jewels stolen case opens up a lot of possible actions for the players. 
Next Step: Felshed out the scripts. 

You may also like

Back to Top