High School Student Blog: Project Bridging AI and Mental Health

A Pet and Friend, How Can a Robot Be This?

The world of Artificial Intelligence (AI) and robotics are changing every day, and in this case, for the better. With constant new advancements, the widespread functionality of AI and robotics has the potential to help humanity in numerous ways. Because of this, I wanted to program a robot that a person could talk to, confide in, and trust. With an increasing number of mental health issues, I wanted to investigate how I could program Cozmo, a small robot developed by Anki, to interact with people and help improve their mental health.

To program Cozmo, I used Calypso, a robot programming language that specifically works with Cozmo. With my project, I wanted to see how many different actions I could make Cozmo perform to investigate the relationships that Cozmo could develop with humans and therefore form special bonds with them. Through these relationships that Cozmo can create, he can help to improve the user’s mental health as well.

For this first part of my three-part mini-series about my project to use Cozmo to aid in improving a human’s mental health, I will go into detail about the background and technologies that I used in my project. So with that, let’s get into the specifics.

Background and Important Technologies

As I mentioned before, the main technologies that I used for this project were the Cozmo robot and the Calypso robot programming software. I have been learning how to program Cozmo to do various actions for a while now, which has shown me how much I could really do with Cozmo. Because of this I really wanted to investigate how I could program him to establish a relationship with a human being.

To understand just how much functionality Cozmo has and how he can act like a robot that will help people improve their mental health, it’s important to understand some basics of the Calypso programming language and Cozmo’s various features.

The Calypso Programming Language

One of the fundamental concepts of Calypso is that it is a rule-based language. Rule-based systems are used in various AI applications, and in this case, the rule-based language means we can program Cozmo to perform an action depending on a situation. In Calypso, “when ___, do ___” statements are used, meaning that when something happens, Cozmo will do a specific action. For example, in my program, I wanted Cozmo to express happiness when seeing any face. The code for this statement looks like this:

Another very important concept of Calypso is that it follows five laws of computation.These five laws help us understand how a Calypso program works with Cozmo, and how he handles different situations in the code. The five laws of Calypso are:

  1. Each rule picks the closest matching object

  2. Any rule that can run, will run

  3. When actions conflict, the earliest wins

  4. An indented rule can run only if its parent’s action succeeds

  5. On every cycle, earlier actions affect later rules

With the fundamentals of Calypso covered, we now have a basic understanding of how Calypso can be used to program Cozmo.

The Cozmo Robot

Cozmo has important features, which incorporate numerous AI concepts, that are extremely necessary and helpful when programming Cozmo to be able to interact with humans. These features include:

  1. Perception. This is Cozmo’s ability to see and detect things like faces and objects. Object detection is a huge field in AI and proved to be very important in this application. I used Cozmo’s perception in various different ways. One way was so that he could detect not just a face/person, but also the expression of this person. With this, he can classify the expression of the person and get an idea of how the user is feeling.

  2. Teleoperation. This is the ability to controlling Cozmo’s movements using a remote control. Using this remote control, Cozmo can be driven around and his head can be positioned in different directions.

  3. Pursue and consume. The first part is how Cozmo will pursue, which means that he will move to a certain object. The second part is how Cozmo will then consume it, which can include picking it up or reacting in a certain way. Pursue and consume work together as Cozmo will first pursue something, and then consume it.

  4. Conflict resolution. This is Cozmo’s rule that when there are multiple possible actions that he can do at once, he will do whatever action comes first (this is the third law of Calypso!). Hence, this is how Cozmo is able to “resolve a conflict” when there is a situation of conflicting possible actions.

  5. Speech and hearing. This is Cozmo’s ability to speak and also to listen to human voices. Cozmo can actually recognize and understand what a user is saying, which shows how important AI is in Cozmo. Cozmo’s speech and hearing were very vital in my project since this enables him to properly have conversations with humans.

Conclusion

Having covered the basic background and some fundamentals of both the Calypso programming language and the Cozmo robot, this concludes the first part of my three-part blog series about my project. With that, make sure to stay tuned for the second part where I will dive into the methodology behind my project and how AI and Robotics allowed me to program Cozmo to improve one’s mental health!

Riya Roy is a Student Ambassador in the Inspirit AI Student Ambassadors
Program. Inspirit AI is a pre-collegiate enrichment program that exposes curious high school students globally to AI through live online classes. Learn more at
https://www.inspiritai.com/.

https://riyaroy23.medium.com/a-pet-friend-and-confidant-how-can-a-robot-be-all-of-this-6a8134a36342

Previous
Previous

Leadership Positions in High School: 3 Steps to Becoming an Officer of your Club

Next
Next

AI in Aerial Drone Mapping: How to Use It to Classify Trash