A “Prayer with no rules” built with Google’s Teachable Machine

EG
Elena Glazkova
Published in
5 min readJul 12, 2020

This is the prototype of the app that helps people cope with stress in challenging times such as pandemics and political or personal crises.

Explanation

A little while ago a well-known Russian psychologist whom I genuinely trust wrote in her blog that there are two common ways for everyone (no exceptions) on Earth to get back into the balance while being extremely stressed out. The whole population of our planet seems to be stressed out right now, so I thought it would make sense to work on a project that might help to deal with this problem.

According to this psychologist, the two most efficient and promising ways to fight panic attacks are: 1) to hold one’s breath; 2) to pray. This is what she says exactly:

"In the case of serious emergency, even atheists begin to pray".

"Even a simple breath holding (along with muscle relaxation) for a half a minute or for a minute allows you to restore breathing. The pulse decreases, spasms stop, you're getting enough oxygen, and soon feel calm. It turns out that your panic was growing due to improper breathing. Pay attention to this trick. When you feel like there is not enough air becaise of the panic, you don't need to gasp and pull the air into yourself with all your strength, but rather, relax and hold your breath for at least half a minute. Immediately or after a couple of repetitions, spontaneous breathing will be restored".

Second, my ITP-friend told me that s/he will pray for something, and it struck me as so simple yet so meaningful — that we both will do it, coming from different cultures, and probably with a different attitude but with the very same purpose of trying to seek a balance and hope. Being technologists in the 21st century, yes.

Personally, I believe that prayer (non-depending on culture, religious denomination, country, etc.) is the way for a human brain to debug our subconsciousness and consciousness. At least that’s how it works for me. So, from the very beginning, I told myself that I want this project to be non-instructive, non-moralistic, non-demanding, not strict, free of any sort of symbols or mysticism, and not boring. I just wanted it to work at such times that we are facing right now (I’m writing this in May, 2020). That’s how I came up with the “no-rules-prayer” concept.

I use one (pretty universal) symbol as the basic element of the project. This is the praying gesture of two hands put together.

Prototyping process: first steps

To make the app recognize this gesture I worked with Teachable machine. I trained my model on two classes “Prayer” and “No prayer”. I also used p5.speech library in the draft sketch.

Also, when a person puts both hands together in front of the face, the song “Here comes a sun” by Beatles starts to play. It’s not a cheap trick — I was inspired by the Instagram post of the nurse working in one of the New York emergency rooms. She wrote that their hospital has a special sound code system to let all the staff know when important things happen. When a patient is saved after lung ventilation and moved from the critical care unit, this song starts to play all over the hospital so that everyone knows.

Prototyping process: further steps

The minimum viable scenario looks as follows: you open the application which shows a cold and windy sunless space.

Three.js is perfect for this purpose.

By “windy” I mean there is a rather loud sound of rough wind and “flying pixel effect”, like this one:

Effect by Szenia Zadvornykh

You open the Praying mode by putting your hands together and control the wind by holding your breath. The more you hold your breath — the less wind is in the space. The more time you hold your hands together — the sunnier it is.

Also, if you come back from time to time, your space becomes inhabited by nice creatures and plants. That comes from my personal belief that debugging one’s brain with a prayer is a healthy habit that needs to be triggered and trained. So, this is the data visualization part — the more you pray, the more nice objects you have in your “garden”.

Notes for further development

Except for the steps mentioned above, I need to train a model in Teachable machine to recognize all the variety of praying hands.

I was also thinking of the exploring Skybox technique in three.js to work on the “multidimensional extension” of the project. What if every user could create their own dimension (as a cube), and then these dimensions (“gardens”) of different people could interact in a bigger space?

Today option of praying together is questionable and unwanted, just as touching one’s face (even with praying hands). So, I should think about overcoming it in my project as well.

I also noted for myself to think of “lullaby mode” for my application in the future.

And finally, I will need to think about security issues because prayer is an extremely private thing.

--

--