Bear Bot

Made by Jo Zhouzheng

Found in Mid Mini MeBot

Bear is a friendly little chat bot to whom you can interact with on a daily basis. He has such a personality that just brighten your day. He is so well-read, if you give him a book that he likes, he will let you know his thoughts on the book.

0
Bear Bot Interactions
Jo Zhouzheng - https://vimeo.com/291433694
0

Conceptualizing the Conversation

When I started out this project, I knew I want to create a chatbot which interact with people like a real friend. From the discoveries and articles we read in this class, I understand that people tend to project a personality to the bot s/he is chatting with. This sets the tone and "unspoken rules" on how to interact with the bot. It's is therefore very important. 

Here are the elements I took into consideration: 

- Tone of voice

- pacing

- interactions

- flexibility in words

...

I also want the human - bot interaction to be as natural as possible. The relationship should be developed organically, like real human interactions. Therefore, the conversation should evolve other time. I used the concept of "progressive disclosure" in design. Instead of dumping a bunch information upfront, the bot should disclose information gradually. Bot should give hints and guide where the conversation should go, but never force a conversation to happen. 

The main function of the bot is to provide book reviews, but this is kinda hidden. You will have to chat with Bear, get to know him more and then you will find out that he is such a well-read bear. This is exactly like how real life human interactions work - you find out a person's talents and personality the more you get to know him/her. 

This also created a sense of mystery - making it more interesting for users. 

0

Coding the bot 

Because I want the conversation to be as natural as possible, and can adapt for different modes of engagement, I used a lot of "body.include?" rather than "body == " to make sure users don't need to type in exact same word. 

My initial thought was to incorporate Goodreads' API into the conversation, but then I realized that the reviews were so randomly drew, some reviews sounds very negatively or sarcastic, this is not consistent with Bear's personality. It would be very weird that your initial interaction with Bear is so positive and loving, but then he suddenly turn into a sarcastic or negative tone. 

0
get "/incoming/sms" do
  session["last_intent"] ||= nil

  session["counter"] ||= 1
  count = session["counter"]

  sender = params[:From] || ""
  body = params[:Body] || ""
  body = body.downcase.strip

  if session["counter"] == 1
    message = "It's Bear here 🐻. I'm a fun-loving, caring and insightful bear. Try talk to me and see what I say πŸ˜‰ . Type in 'questions' to get a list of questions you can ask me."
    media = "https://media.giphy.com/media/xNQTp4xqjY22I/giphy.gif"
  # elsif body.include? "bear" or body.include? "hey" or body.include? "hi" or body.include? "hello"
  #   message = "Hey you! Bear here 🐻. What do you want to know about me today? Type in 'questions' to get a list of questions you can ask me."
  elsif body.include? "like to do" or body.include? "like doing" #when user ask what do you like to do
    message = "I like to eat honey, and read! I'm a well-read bear. Ask me about my favorite books."
    media = "https://media.giphy.com/media/84ZzhsJZWlE3e/giphy.gif"
  elsif body.include? "quote" #"what's your favorite quote?"
    message = "A well-read bear is a dangerous creature.πŸ€“"
  elsif body.include? "questions"
    message = "You can ask me questions such as:

    \"what's your favorite quote?\"

    \"what do you like the most?\"

    \"what do you do for fun?\"

    \"what are bear's favorite books?\"

    \"what do you like to do?\"

    "

  elsif body.include? "favorite books"
    message = "You just picked my favorite question! Hummm but I can only share it if you feed me with honey 🍯😎...alright alright here you go:

    \"Man's Search for Meaning\"

    \"Sapiens: A Brief History of Humankind\"

    \"Walden\"

    \"The Unbearable Lightness of Being\"

    \"The Wisdom of Life\"

    Try type in the title of the book and I will let you know what I think about the book!"
    media ="https://media.giphy.com/media/126BrhLh4YgwkE/giphy.gif"
  elsif body.include? "like the most"
    message = "Food...and honey! "
    media = "https://media.giphy.com/media/fdWVI1op6wi88/giphy.gif"
  elsif body.include? "do for fun"
    message = "Cuddle with my pillow."
    media = "https://media.giphy.com/media/2QIbGQ1WEVF6M/giphy.gif"
  elsif body == "man's search for meaning"
    message = "After I read this book, which I finished many, many years ago, I had become self-critical of any future endeavours which would take up a lot of my time.I would ask myself 'is this or will this be meaningful to me?', and if the answer was 'no', I wouldn't do it. It was this book that influenced me to consciously live as meaningful a life as possible, to place a great value on the journey and not just the destination, while knowing that 'meaningful' doesn't always mean 'enjoyable', 'Meaningful' should be equated with 'fulfilling'.

    🐻 Now...type another book title or just say goodbye to me."

  elsif body == "sapiens: a brief history of humankind"
    message = "I believe I am relatively familiar with history in general, and I'm usually not very excited about reading more about it. But this book was something else. Beautifully written and easy to read, this book just made me want to know more and more about how the author thinks the world evolved to what it is today. Revolution by revolution, religion by religion, conception by conception, things were simplified and yet still maintained valid points - and it was never boring.

    🐻 Now...type another book title or just say goodbye to me."

  elsif body == "walden"
    message = "Thoreau makes us an apology for a healthy life away from the bustle of cities and constraints of modern society and castrating. Life as it should savor with nothing and everything around you and beyond us when we want others through profit prohibit enjoyment. Unlike many philosophers understandable for a pretentious intellectual minority, Thoreau speaks true to all of the original life that we live simply and 'naturally poetic.' An indispensable bible!

    🐻 Now...type another book title or just say goodbye to me."

  elsif body == "the unbearable lightness of being"
    message = "Kundera observes the stuff that goes on internally amongst the characters; he intellectualizes it, and tells you about it. He’s quite philosophical, and you feel like the narrator is talking to you, offering very insightful observations about the characters and life in general. This is one reason why reading is often more valuable than watching TV or a movie: when reading a good book you get direct psychological explanations, and you get to go inside the heads of characters.

    🐻 Now...type 'more' to learn see more of my thoughts on this book, another book title or just say goodbye to me."

  elsif body == "more"
    message = "Taken as a whole, I found this novel to be profound, but in unusual ways. It’s not a direct novel, but rather one that represents, and lets one feel, disconnections and various glimpses of perceptions. And it wasn’t a smooth novel, either. It even felt choppy on occasion. But the chapters are short, which fits its feel, and also gives you time to think about the penetrating thoughts that Kundera puts across. Kundera strikes me as a craftsman of sorts. He switches timelines deftly and effectively – even when I thought he was crazy to do so; when I thought he gave up the climax of the novel towards its middle, he proved me dead wrong. He proved to me that he knew exactly what he was doing because he’s a master of the craft. This novel is not full of sweeping, pounding paragraphs of poignant, soul-hitting, philosophical depth, but rather offers up constant glimpses; nuggets of insightful observations on almost every page, that when added up together, reveal an impressive, heartfelt, and real work. 🐻 Now...type another book title or just say goodbye to me."


  elsif body == "the wisdom of life"
    message = "Beginning with the assumption that one's life will be essentially painful and miserable, Schopenhauer proceeds to offer thoughts about how we can eke out a bit of pleasure for ourselves during our brief time on this earth. Underlying much of his advice is the notion one should proceed cautiously, with restraint, curbing one's desires to avoid falling into situations, social or consumptive that will only make us more miserable. Don't desire too much, he implies, let happiness rest on small simple elements.

    Much of Schopenhauer's advice resonates with our modern sensibilities. Maintaining physical and mental health through exercise of body and mine is, he says, essential to happiness.

    Much of the advice offered is familiar to us but the thoroughness of his insights into how one best live one's life is definitely worth reading and rereading.

    🐻 Now...type another book title or just say goodbye to me."
  elsif body.include? "bye" or body.include? "goodbye" or body.include? "ttyl" or body.include? "see you"
    message = "Bye. Ttyl!"
    media = "https://media.giphy.com/media/JPbZwjMcxJYic/giphy.gif"
  else
    message = "Hmmmm...I didn't understand that 🧐. Try type in 'questions' to get a list of questions you can ask me."
end
Click to Expand
0

Reflection

It was such a Challenging project for someone who doesn't have much coding experience. But to be honest once I figured out the logic of ruby, it was a lot of fun making the bot! It's like creating a fictional character. 

Things I hope to achieve in my next project:

  • Incorporating natural language processing in Bear, such as IBM Watson. To make my bot more empathetic and can identify user's emotions.
  • learn technics to break down long conversations into several text, and slow down the time that the text is sent - mimic real life situation when users need to take time to type in the answer.
  • design a more sophisticated conservation structure. 
x
Share this Project

This project is only accessible by signed in users. Be considerate and think twice before sharing.


Courses

49714 Programming for Online Prototypes

· 9 members

A hands on introduction to building online products and services through code


About

Bear is a friendly little chat bot to whom you can interact with on a daily basis. He has such a personality that just brighten your day. He is so well-read, if you give him a book that he likes, he will let you know his thoughts on the book.

Created

September 23rd, 2018