Reader small image

You're reading from  Artificial Intelligence for Robotics - Second Edition

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781805129592
Edition2nd Edition
Concepts
Right arrow
Author (1)
Francis X. Govers III
Francis X. Govers III
author image
Francis X. Govers III

Francis X. Govers III is an Associate Technical Fellow for Autonomy at Bell Textron, and chairman of the Textron Autonomy Council. He is the designer of over 30 unmanned vehicles and robots for land, sea, air, and space, including RAMSEE, the autonomous security guard robot. Francis helped lead the design of the International Space Station, the F-35 JSF Fighter, the US Army Future Combat Systems, and telemetry systems for NASCAR and IndyCar. He is an engineer, pilot, author, musician, artist, and maker. He received five outstanding achievement awards from NASA and recognition from Scientific American for World Changing Ideas. He has a Master of Science degree from Brandeis University and is a veteran of the US Air Force.
Read more about Francis X. Govers III

Right arrow

Giving the Robot an Artificial Personality

When a person thinks of a robot with AI, what many consider AI is a robot that has emotions, feelings, a state of mind, and some sort of model or concept of how humans think or feel. We can call this form of AI an artificial personality. While giving a robot feelings is definitely way beyond the scope of this book (or current technology), what we can do is create a simulation of a personality for the robot using standard computer modeling techniques, such as Monte Carlo analysis, and finite state machines.

In this chapter, we will cover the following topics:

  • What is an artificial personality?
  • A brief introduction to the (obsolete) Turing test, chatbots, and generative AI (GenAI)
  • The art and science of simulation
  • An emotion state machine
  • Playing the emotion game
  • Creating a model of human behavior
  • Developing the robot emotion engine

Technical requirements

We will not be introducing any new programming libraries in this chapter. We will be building on the voice system we constructed previously. All you will need is imagination and some writing skills.

You’ll find the code for this chapter at https://github.com/PacktPublishing/Artificial-Intelligence-for-Robotics-2e.

What is an artificial personality?

Hollywood and the movie industry have turned out some very memorable robots. You can think of R2D2 and C3PO, the Laurel and Hardy of science fiction. What do you like most about these two? Could it be their personalities? Think about this a bit. Even though R2D2 is mostly a wastebasket shape with a dome head and no face, he has a definite personality. You’d describe him as feisty or stubborn. The Robots and Androids website (http://www.robots-and-androids.com/R2D2.html) described him in this way:

The droid is shown as being highly courageous, unwavering in loyalty, and a little bit stubborn. He never backs down from a mission, even when the odds appear to be stacked against him. His personality is often contrasted against that of [C3PO], who is fussy and timid.

This is pretty impressive for a robot who never says a word and communicates with beeps and whistles.

What were other movie robots that made an impression on you? Certainly...

A brief introduction to the (obsolete) Turing test, chatbots, and generative AI

Alan Turing proposed his famous test, which he called The Imitation Game, in a paper titled Computing Machinery and Intelligence, published in 1950 in the journal Mind – A Quarterly Review of Psychology and Philosophy (see https://www.abelard.org/turpap/turpap.php#the_imitation_game). In the original text, Turing imagined a game where a player would have to guess the sex – male or female – of a hidden person by typing questions on a teletype. Then, he suggested that a truly intelligent machine would be one where you would not be able to distinguish if the hidden personality on the other end of the teletype was a human or a computer software program.

Note

The movie The Imitation Game stars Benedict Cumberbatch as Alan Turing and features his role in breaking German code in WWII as part of the mathematicians of Bletchley Park. The title refers to Turing’s original name of...

The art and science of simulation

What is simulation? A simulator is a computer model of the physical world. You are probably familiar with flight simulators, which provide sensations and interactions of flight without leaving the ground. There are also a lot of other types of simulations and simulators. We could have a medical simulator that mimics diseases or responds to treatments. It could be a financial simulation that models profits on the stock market based on trends. There are structural simulations that model loads on bridges and buildings to see whether the materials are adequate.

The most common way of creating a simulation is by building a physics model of the item under test. For a flight simulator, this means plugging in formulas for the four forces on an airplane or a helicopter – lift, gravity, thrust, and drag. Each factor has parameters that affect its performance – for instance, the lift is a function of the speed through the air, the weight of the...

An emotion state machine

What is a state machine? We covered state machines in the systems engineering section of Chapter 2 – state machines are a technique for understanding or modeling automation or computer programs. A state is a set of conditions that exist at the present. I like to think of a state as being a set of functions that are constrained by limits. The machine (our robot) changes from state to state based on some event that causes the state to change.

Let’s work through a quick refresher example. Let’s take a slice of bread. When we get it, it is already baked and sliced, so its initial state is as a slice of bread. If we subject the bread to infrared radiation (that is, heat), then the surface becomes caramelized, and we call that toast. The state of the bread has changed, along with its taste and texture, from baked bread to toast. The event that caused that transition was the act of heating the bread in a toaster. This is pretty simple stuff...

Playing the emotion game

So, what exactly is this game? What we want the robot to do is ask questions of another person and to use conversation to get personal information out of them so that the robot then can use that information in replies. In this game, the robot will be trying to score points by getting the human to interact socially. The robot will gain points by getting information from the person so that it can get to know them better. The trick for us is we need the robot to keep this information and remember it. We will be saving all this information and using it to modify the actual code the robot is running, thus implementing machine learning (ML) into the conversation. The robot will be using the same type of point-reward system we used in training the robot arm back in a previous chapter. Once the robot has scored by learning a fact, it will no longer get rewarded for that fact and will go on to get other facts. Once it has learned all the facts, it will end the conversation...

Creating a model of human behavior

For the robot to support conducting a conversation, we must also have a model of how the human it is talking to is feeling. You may have had a friend or relation who went on talking about themselves and were oblivious to how you were feeling or reacting to their conversation. We don’t want that type of robot personality. Therefore, the robot has to have some internal representation of how it thinks you are feeling. We will not be using vision for this function, so the only way the robot knows how you are doing is by asking questions and evaluating the use of language.

We will give the robot a human model similar to our state machine but with just four emotions on two axes: happy/sad and friendly/distant. The robot will assume that everyone is somewhere in the middle when the conversation begins. The robot can use clues in language to understand how you might be feeling, so we will assign colors or shades of emotions to words to help drive...

Developing the robot emotion engine

Now we are going to put together the robot’s emotion model. This is the heart of the artificial personality as it computes, updates, and remembers the emotional state of the robot. The robot starts in a generally neutral state and performs updates based on the combination of eight emotional traits: happy/sad, welcoming/distant, friendly/ stranger, curious/frustrated, and fresh/tired. As events happen in the experience of the robot, it gets cues that cause its emotional state to change. For example, if the user said “That is stupid” to something the robot said, then the robot would add to the sad axis of its emotion.

We compute the overall emotional state using polar coordinates, just like you saw in the diagram we drew earlier in this chapter (Figure 9.4). The current emotional state is determined by computing the center of mass of the other emotions. If the emotions are more or less balanced, the center of mass of the emotions...

Summary

This was a very busy chapter. We created an emotional engine for our robot and created a conversational interface so that it can interact with people. We introduced simulation concepts, as we were creating a simulation of emotion for our robot. We can’t create real, biologically motivated emotions, so we simulated emotions via playing a game. In this game, we tried to get humans to provide information about themselves, which is what we humans call small talk. We assigned point values for emotions and created an emotional state machine both for the robot’s internal feelings and a representation of how the robot perceives your emotions via interactions.

In our final chapter, we will talk about your robotics educational journey, give some guidance on careers in robotics, and talk about the future, which is always a perilous topic.

Questions

  1. What is your favorite movie robot? How would you describe its personality?
  2. What techniques did the movie-makers use to express that robot’s personality (body language, sounds, and so on)?
  3. What are the two types of chatbots? List some of the strengths and weaknesses of each.
  4. In the diagram of modeling custom distributions (the airport example), the bottom image shows two standard distributions and two uniform distributions. Why don’t the curves go all the way to the top of the graph?
  5. Design your own robot emotions. Pick six contrasting emotions that can express the entire range of your robot’s personality. Why did you pick those?

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Artificial Intelligence for Robotics - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781805129592
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Francis X. Govers III

Francis X. Govers III is an Associate Technical Fellow for Autonomy at Bell Textron, and chairman of the Textron Autonomy Council. He is the designer of over 30 unmanned vehicles and robots for land, sea, air, and space, including RAMSEE, the autonomous security guard robot. Francis helped lead the design of the International Space Station, the F-35 JSF Fighter, the US Army Future Combat Systems, and telemetry systems for NASCAR and IndyCar. He is an engineer, pilot, author, musician, artist, and maker. He received five outstanding achievement awards from NASA and recognition from Scientific American for World Changing Ideas. He has a Master of Science degree from Brandeis University and is a veteran of the US Air Force.
Read more about Francis X. Govers III