I Have Telekinetic Powers — Brain-Controlled Pong

I’ve always loved Iron Man, Thor, Hulk, and this list could go on. But I’ve always been especially fond of Scarlet Witch for one main reason. Her telekinetic powers — her ability to alter reality in unspecified ways.

But telekinetic powers don’t have to be exclusively used to fight crime with a team of superheroes. Another childhood favorite of mine was Roald Dahl’s Matilda who used her telekinetic powers for simpler things like making hands-free breakfast. This seems totally unrealistic and fantastical, something only fictitious superheroes use when involved in crazy situations.

You too can have “telekinetic powers” with the power of brain-computer interfaces!

But thats not true. It can be made accessible to the average Joe with the power of technology, specifically, brain-computer interfaces (BCIs).

Being able to make a hands-free breakfast seems trivial, but this is something that people with severe physical disabilities or locked-in syndrome would greatly appreciate. With this technology, they will gain greater autonomy over themselves and be able to control their external environment more independently. Brain-computer interfaces also make this much more effective.

Brain-computer interfaces enable the control and manipulation of other machines and programs using brain activity. There area various means of neuroimaging — ways of reading those brainwaves — including electroencephalography (EEG), electrocorticography (ECoG), magnetic resonance imaging (MRI), functional magnetic resonance imaging (fMRI), etc.

In my case, I leveraged the EEG technique to read my brainwaves through the Muse headband, most commonly used to monitor brainwave patterns during meditation and in research studies. My program allows for the control of Pong paddle movements, up and down, using two distinct inputs. Specifically, when I am relaxed, the paddle is bound to go down, and when I am tense, the paddle will move up. One paddle’s movements are dictated by the computer while the other’s is controlled by the EEG readings of my brainwaves!

One paddle is controlled by the computer while the other’s movements are dictated by my brainwaves!

The Muse headband used for this project is connected with my program using Bluetooth. By using Python libraries like Muselsl and Pygatt, the EEG data is streamed from the Muse headband to the computer. This is where the headset data is processes and used according to the defined parameters to play the game!

After establishing the connection between the headset and the program, the brainwave frequency corresponding to relaxation and that attributed to tension is read and stored to later be used to control paddle movements. Using numpy and madpotlib, the data is processed to define these states of relaxation and tension, fundamental to the proper functioning of the game.

In practical situations like leveraging BCIs for patients with physical disabilities or locked-in syndrome, irrelevant data from blinks, facial movements, etc., most commonly referred to as “artefacts” are filtered out to ensure the system is only using the most pertinent data. However, in this case, since the EEG headset has greater temporal resolution and is non-invasive, I leverage artefacts like eyebrow movements to control my paddle.

So when the game is run, the Muse headband will read brainwaves dynamically and use the average calculated by the program to conclude whether the user is relaxed or tense to move the paddle appropriately.

Brainwaves are the accumulation of the electrical impulses neurons use to communicate with one another and other cells in the body, this is what enables us to think and act. These brainwaves are displayed as complex waveforms as seen below.

Evidently, various mental states are attributed to different brainwave frequencies (Hz). Aside from the location in which the signals are produced, thoughts and actions can be determined based on the produced brainwave patterns. The possible frequencies include,

Gamma (>40Hz)

Gamma waves are the fastest measurable EEG brainwaves and the only frequency group found in every region of the brain. These signals are produced when information is processed in different areas of the brain simultaneously like in heightened perception, problem-solving tasks, and learning. A good memory is attributed to efficient and well-regulated 40Hz activity!

Beta (13–39 Hz)

When we are busy thinking actively, beta brainwaves are exhibited. This is the activity that accounts for normal alert consciousness and active thinking which includes active conversation, making decisions, focusing on a task, etc.

Alpha (7–13Hz)

Alpha brainwaves are the most easily detected and were the first to be discovered. They are commonly detectable when the eyes are closed and the mind is relaxed. But can also be found during creative and artistic activity, just before falling asleep, and during yoga.

Theta (4–7Hz)

Theta waves have often been the product of deep relaxation and occur most often in experienced meditators. These waves are most detectable when dreaming in our sleep (like in the movie Inception!) but can also be produced when daydreaming and during deep meditation. When doing tasks that are so automatic that the mind can disengage like brushing teeth or showering, theta waves have been observed to be produced.

Delta (<4Hz)

These are the slowest of the brainwave activity and are most prominent during restorative, dreamless sleep. This is also the state in which healing and rejuventation is trigged, the reason why a good night’s sleep is so vital to overall health and wellbeing.

After the data is collected and ready to be used for external manipulation, artefacts like blinks, jaw clenches, and other sources of random electrical activity are to be filtered out for the system to use only the relevant and clean data. The data is then narrowed into instructions for the computer to determine the user’s intentions once the program starts running. Simply put, the brainwave activity is collected to train the program, and when the program is run, the electrical activity produced is used dynamically to perform the wanted action!

This is what I did for this game —when the program runs, the raw brain signals are filtered through a feature translation algorithm. I am to relax my face to define the activity attributed to the relaxed state and lift my eyebrows to define the activity attributed to the tense state. This is then used to move the paddle up and down when playing the game.

Brain-computer interfaces are often used in prosthetic limbs like with amputees — the movement of the limb is triggered by the thought and thus the brainwave produced. Like in the development of my game, the limb has to be trained for it to then function normally. If we are to train a robotic arm to move up or down, for instance, the user uses the EEG headset to run the data collection process, starting with the user concentrating on moving the arm up. The program will collect this data and run the algorithm to process the data and make it usable. Once this is done with the downward movement, the limb is trained and to be used regularly.

Since such signals can be used to control any program/device, it is common for brain-machine interfaces to be leveraged to empower those with severe/many motor disabilities, especially those suffering from locked-in syndrome, to control their environment and be more self-reliant. So I approached this practical application by developing a brain-controlled calculator program (selecting numbers, operations, etc. using fluctuations in brainwave patterns)! Stay tuned for more details!

Hi! I’m Soumiya, an innovator at The Knowledge Society and really passionate about brain-computer interfaces, other emerging technologies, and all things neuroscience to be used to solve some of the world’s biggest problems!

Thanks for checking out my article, feel free to follow me on Medium and connect with me on LinkedIn!

Building infradian rhythm-centric productivity app for women + mobile app to manage drug prescription errors. Striving to instill meaningful change.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store