A real-life Harry Potter sorting hat is being developed by an MIT student

This device is made up of noninvasive electrodes that can capture users’ brain activity and use machine learning to analyze what they are imagining in real-time.

Harry Potter sorting hat

Harry Potter fans can now find out which Hogwarts house they belong to using a real-life sorting hat designed by a post-doc student at the Massachusetts Institute of Technology Media Lab.

Nataliya Kosmyna has created what she calls the Thinking Cap, a wearable device made up of noninvasive electrodes that can capture users’ brain activity and use machine learning to detect and analyze what they are imagining in real-time.

According to the project’s overview, the Thinking Cap’s main objective is to determine whether people’s mindset can be changed using a technological intervention. Equipped with an embedded electroencephalography headset and a Bluetooth speaker, the Thinking Cap communicates praise for effort and ability of the users in the hope of improving their resilience and self-esteem, and thus positively influencing their motivation and academic achievements.

Nataliya Kosmyna's Thinking Cap
Nataliya Kosmyna’s Thinking Cap | Credit: Judith Sirera i Pulido

But in order to make her project more appealing to participants, Kosmyna decided to give a Harry Potter twist to it. According to Boston Globe, the hat itself is just a costume prop Kosmyna bought for $29.99 on Amazon. She then draped over the 14 electrodes that make up the actual device to achieve a realistic Hogwarts sorting hat. In addition to the Thinking Cap, Kosmyna, who has a PhD in computer science, is also the one who created the algorithm and software that make it all work.

For the sorting aspect of her invention, Kosmyna got some help from Harry Potter creator J.K. Rowling’s Pottermore.com, which offers a multiple-choice “sorting ceremony” test to classify fans into whether they are Gryffindor, Hufflepuff, Ravenclaw, or Slytherin. First, Kosmyna conducts a “phase training,” a process where she shows users a series of images and asks them to imagine those objects. After that, the Thinking Cap will then ask users a series of binary questions based on the objects showed beforehand. Without the participants saying a word, the Thinking Cap can read which of the two choices they are thinking about. The answers are then used to decide which Hogwarts house they belong to.

Nataliya Kosmyna and a participant trying out the Thinking Cap
Nataliya Kosmyna and a participant trying out the Thinking Cap | Credit: Nataliya Kosmyna

“The hat will tell you, ‘Oh, you are Gryffindor!’” Kosmyna said. “It will not only tell you the house, but what you are actually thinking about — and you don’t need to pronounce a single word. You just need to be very focused.”

“There is no magic in it, it’s pure neuroscience,” added Kosmyna.

The Thinking Cap, which is still under development, was featured last February 26th at MIT Computing Expo, an event highlighting innovative projects from the fields of robotics, artificial intelligence, health care, and renewable energy.