This post is going to be a little different, maybe just a little more “low-key” than some of my more recent posts because I’ve got a cold and I’m highly valuing sleep at the moment!
Wish me luck that it isn’t the beer virus! 😛
Sniffles and sore throats aside, we’re going to begin talking about something I’ve been thinking about on and off for a while and since tomorrow is Valentines Day it seems appropriate to start sharing my ideas with all of you.
And yes, I tried really hard to think of a witty way to say Valentines Day that let me abbreviate it as “V.D.” without being crude and having to include the redundant ‘day’ after ‘V.D.’ so that it was obvious what I was talking about without people reading it and going “what?” then re-reading it and correctly interpreting my meaning as “Valentines Day” and then chuckle…
Look, I’m groggy and took a nasal decongestant so I could sit and write and everything I came up with just wasn’t funny so before we proceed, I’ll just wish you all good luck with your V.D. tomorrow! 😉
Anyway, on with the show!
So, I’ve been wondering… Could we build a bot that could feel Love? What about Joy? Fear? Anger? Boredom?
What if we could build a machine that could experience complex emotional states by combining emotions?
What could we do with a bot like that and how could we build it?
Well, most people who know enough about the subject either believe it’s too crazy to work, or work too crazy to subject anyone to believe them!
Fortunately, I’m just crazy enough to try anyway and that’s what we’re going to talk about today! 😛
Though before we get any further, you might want the wallpapers.
I have three for you today. 🙂
The second wallpaper was created from the “breadboard circuit” image above and is the image I used as the “featured image” for this blog post and it includes the “Title Text” of this post (EMOTIONS) and my logo/branding/name thingy.
The third is the same image without the text.
What I like about this image is that it almost feels like jewelry created from circuits! 😛
Anyway, let’s talk about how and why we can make a robot with all the feels!
By now you are wondering, why would we want to build a bot that can understand/experience emotions?
Obviously so I can have my very own expressive R2D2, C3PO, BB-8, LtCmdr Data, Johnny 5, Ava, Robby bot!
I mean…. because animals evolved various capacities to experience emotions as a survival mechanism and if we can build machines that love charging their batteries like people love eating, or enjoy assembling products and performing services like a full time unpaid hobby, then we might be able to develop bots that express extremely complex behaviors without having to write extremely complex code.
Think of it kinda like… we can put a beehive in a field of flowers and they will naturally want to make honey and will also generally avoid dying.
Another example might be like placing beavers near moving water, they will work all night to build a dam because they find free flowing fjords fascinatingly fetid… It’s just their nature.
Damn I should have said, it’s just their fastidiousness! 😛
What I’m getting at is that even if the bee example is less than ideal due to bee instincts instead of emotions… the point still stands that being sad or in pain naturally tend to motivate most animals (people included) to avoid whatever caused the “negative” emotion, while experiencing “positive” emotions tend to reinforce behaviors and happiness/pleasure seeking behaviors can be a stimulus for positive/beneficial activities like… for example, when a dog plays fetch because its fun but the exercise they get from it improves their health.
So even if a machine is not “consciously” experiencing emotions the way humans and some animals do, having access to some kind of emotional feedback system could enable machines to navigate harmful or dangerous situations in ways that they currently cannot and predispose them to engage in activities that symbiotically benefit themselves, their environment and humans.
Like, imagine you could develop a Roomba (not a sponsor) that felt that all gooey substances are disgusting!
Instead of smearing your Dobermans finest all over the kitchen floor it would actively avoid making a bad situation worse!
There is certainly more ‘why’ that we could discuss but for now we’re going to move on because my throat is sore.
How Could We Do It?
There have been many attempts to classify emotions but most efforts amount to creating long lists of emotionally descriptive words with little or no concern given to how many similar or synonymous words mean varying degrees of intensity of the same emotion rather than represent uniquely different emotions… though depending on purpose and methodology you may want to treat emotional synonyms as unique classes.
Also, few emotional categorization methods seem to even attempt to co-relate emotions or go as far as to make distinctions between polarized opposite emotions like Anger/Fear, Joy/Saddness etc.
However, a psychologist named Robert Plutchik created a list of eight “core/primary/prototype” emotions (Anger, Anticipation, Disgust, Fear, Joy, Sadness, Surprise, Trust) and arranged them as a 2D wheel (or 3D cone) with opposites organized across from each other.
Those primary emotions can be mixed together (almost like colors) to create more complex dyadic & triadic emotional states.
This seemingly creates a useful framework to begin building an emotional bot!
Examples of named dyadic emotional states (Courtesy of Wikipedia):
|Human feelings||Emotions||Opposite feelings||Emotions|
|Optimism & Courage||Anticipation + Joy||Disapproval & Disappointment||Surprise + Sadness|
|Hope & Fatalism||Anticipation + Trust||Unbelief & Shock||Surprise + Disgust|
|Anxiety & Dread||Anticipation + Fear||Outrage & Hate||Surprise + Anger|
|Love & Friendliness||Joy + Trust||Remorse & Misery||Sadness + Disgust|
|Guilt & Excitement||Joy + Fear||Envy & Sullenness||Sadness + Anger|
|Delight & Doom||Joy + Surprise||Pessimism||Sadness + Anticipation|
|Submission & Modesty||Trust + Fear||Contempt & Scorn||Disgust + Anger|
|Curiosity||Trust + Surprise||Cynicism||Disgust + Anticipation|
|Sentimentality & Resignation||Trust + Sadness||Morbidness & Derisiveness||Disgust + Joy|
|Awe & Alarm||Fear + Surprise||Aggressiveness & Vengeance||Anger + Anticipation|
|Despair||Fear + Sadness||Pride & Victory||Anger + Joy|
|Shame & Prudishness||Fear + Disgust||Dominance||Anger + Trust|
Okay, it’s late and I’m sick so…
To be continued…
In The Mean Time
It probably sucks for you that there wasn’t any code today… no worries!
I’ve already built a few interesting bots:
Email Sender and Recipient Relationship Classifier
This bot/code can predict what relationships people have by reading emails, though this is a hypothetical proof of concept because we lacked a training set and I wasn’t about to spend the necessary time (unpaid) building a dataset to prove the math but feel free if you have the time because this will work.
- A Bag of Words
- Email Relationship Classifier Class Files
- Email Relationship Classifier Database
- Email Relationship Classifier Classifying Emails
- Email Relationship Classifier Training The Bot
- Email Relationship Classifier Testing The Bot
This bot/code can predict the “sentiment” of a sentence. For example, a sentence like “I love it” would be scored positive and a sentence like “I hate it” would be scored negative. Generally, the more positive or negative the sentence is the higher or lower the score tends to be. Training data is available for this bot so you can test this one without any additional effort. 🙂
- Writer Bot: Sentiment Polarity
- Writer Bot: Sentiment Polarity Training
- Writer Bot: Sentiment Polarity Testing
Artificial & Natural Language Processing & Parts of Speech Tagging
This bot can POS tag words in a sentence. For example, a “noun” is a person place or thing and a verb is an action… if you have sentences like “X do Y with the Z…” and you need to parse them to find the nouns and verbs, POS tagging might be what you are looking for!
- Can a Bot Understand a Sentence?
- Tokenizing & Lexing Natural Language
- The Brown Corpus
- The Brown Corpus Database
- Building A Faster Bot
- Adding Bigrams and Skipgrams
- Parts of Speech Tagging
- Finished Prototype
I also created more than a few neural networks and a few smaller bot projects that I won’t mention right here because this post is starting to get long.
In any case. feel free to checkout those projects while you wait for my next post. 🙂
If you are capable of feeling emotions and are motivated to help me buy more nasal decongestant, consider supporting my content through Patreon for as little as $1 a month, $12 a year, cancel anytime.
But, as always, if all you can do is Like, Share, Comment and Subscribe… That’s cool too! 🙂