Photo by ThisIsEngineering from Pexels

Artificial Intelligence (AI) and robotics are changing the world every day and for the better. AI and robotics have the potential to help humanity in a number of ways due to their constant advancements. For this reason, I wanted to create a robot that people could talk to, confide in, and trust. With mental health issues on the rise, I wanted to look into how I could program Cozmo, a robot developed by Anki, in order to improve people’s mental health.

Cozmo was programmed using Calypso, a robot programming language that is specifically designed for Cozmo. As part of my project, I wanted to see how many different things I could make Cozmo do to investigate whether it would form special bonds with humans as a result of its relationship with humans. By creating these relationships, Cozmo can also improve the mental health of users. The first part of this mini series about my project, in which I used Cozmo to aid in improving a person’s mental health, discusses the background and technologies that I used in my project. Let’s move on to the details.

Background information and important technologies

I used the Cozmo robot and the Calypso software to program the robot in this project. Since I have been learning how to program Cozmo to do various things for a while, I have realized how much I could do with it. Due to this, I was very interested in trying to program him to form a relationship with a human being.

To understand just how much functionality Cozmo has and how he can help people improve their mental health, we have to learn some of the basics of the Calypso programming language and learn about Cozmo’s various features.

Calypso is a programming language

Calypso is a rules-based language, which is one of its fundamental concepts. Many AI applications use rule-based systems, and in this case, the rule-based language allows us to program Cozmo to perform an action based on the situation. In Calypso, the “when ___, do ___” statements are used, meaning Cozmo will perform a specific action when something happens. Cozmo, for example, is supposed to express happiness when seeing any face in my program. It looks like this:

The other very important concept of Calypso is that it follows five laws of computation. These laws explain how the Calypso program interacts with Cozmo, and how he handles different situations in the code. Calypso’s five laws are:

    The closest match is chosen for each rule

    Whenever a rule can run, it will run

    The earliest action wins when actions conflict

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

    An earlier action affects a later rule in every cycle

By now we know how to use Calypso to program Cozmo, since we covered the fundamentals of the language.

Cozmo: the robot

Cozmo has several important features, which incorporate a number of AI concepts, that are extremely necessary and helpful when programming Cozmo to interact with humans. Among them are:

    Intuition. Cozmo is able to see and detect objects and faces thanks to this ability. Object detection is an important field in AI, and this application relies heavily on it. Different approaches were taken to use Cozmo’s perception. He could do this by detecting not only a face or person, but also their expression. He can then classify the expressions of the user and determine how the person is feeling.

    Teleoperation. Cozmo can be controlled by a remote control. You can drive Cozmo around and position his head in different directions by using this remote control.

    Take action and consume. Cozmo will move toward a certain object to pursue, so he will move to that object. Secondly, Cozmo will consume it, which can involve picking it up or reacting in a particular way. Pursuit and consumption work together as Cozmo will first pursue something before consuming it.

    Resolution of conflict. If Cozmo has the option of doing multiple things at the same time, he will do the first thing that comes to mind (this is the third law of Calypso!). As a result, this is how Cozmo is able to “resolve a conflict” when there is a conflict between possible actions.

    The ability to hear and speak. Cozmo has the ability to speak and hear human voices. In Cozmo, AI actually recognizes and understands what the user says, showing its importance. In my project, Cozmo’s ability to speak and hear was essential, since this enables him to communicate with humans effectively.


This concludes the first of three parts of my three-part blog series on my project, which covers the basic background and some fundamentals of both the Calypso programming language and the Cozmo robot. The next part of this series will dive into how AI and Robotics enabled me to program Cozmo to improve one’s mental health, so stay tuned for that!


Leave a Reply

Your email address will not be published. Required fields are marked *