With a little technological magic, this dad build a sorting hat straight out of Harry Potter

Machine learning represents a paradigm shift in programming, there’s no doubt. The concept has begun to weave its promising tendrils through everything from Facebook’s image software to Gmail’s spam filter, but a crafty engineer thought up a better use: a real-life sorting hat inspired by the character in J.K. Rowlings‘s beloved Harry Potter series.

The impetus for project lead Ryan Anderson, a tech hobbyist by night and a solutions architect for IBM by day, was a creation that would entertainingly instill in a young audience the importance of math, technology, and science. “I was thinking of fun projects and, coincidentally, I have a couple of daughters, and they are mad keen on ‘Harry Potter,'” he told Tech Insider. “They’ve read the books, like, five times.”

The first step was creating software capable of comprehending everyday speech. The storied sorting hat, described in “Harry Potter” as soothsaying headwear with the power to discern its wearers’ true nature, can speak and understand spoken phrases. In order to replicate that fantasy as faithfully as possible, Anderson tapped IBM’s Watson platform — specifically, its Natural Language Classifier and Speech to Text tools — to interpret the verbalization of wearers. The result? A system that can approximate a person’s character — “honesty,” for example, or “trustworthiness” — by the information they choose to volunteer.

Watson’s Natural Language Classifier is arguably the heart of Anderson’s sorting hat. The tool, which interprets the intent behind text and triggers a corresponding action, helps in sorting wearers into one of mystical school Hogwarts’ four distinct houses. The process begins with “ground truths,” or rows of descriptive words that a wearer might use in the course of conversation. Anderson and his daughters painstakingly categorized hundreds of descriptive adjectives — e.g., “courageous,” “brave,” and “witty” — by Hogwarts house. They’re Gryffindor, which emphasizes the traits of “daring, nerve, and chivalry”; Slytherin, which houses the “cunning” and “ambitious”; Hufflepuff, which seeks the “just” and “loyal”; and Ravenclaw, which comprises the “wise” and “clever.” (The final list contains more than 150 entries, Anderson said.)

Next up was giving the real-life sorting hat the gift of gab. That’s where Watson’s Speech to Text feature, which uses machine intelligence to decode the grammar and sentence structure of spoken phrases, worked its magic: the hat identifies words that match the “ground truths” table and returns the corresponding house. Better yet, it’s able to improve its responses over time by scouring the web, and has a built-in mechanism for accepting corrections in the (reportedly) rare instances when a wearer is sorted incorrectly.

As a test of the software’s sorting muscle, Anderson fed the hat the characteristics of famous people like Stephen Hawking, Hillary Clinton, and Donald Trump. The results? It sorted Hawking and Clinton into Ravenclaw “for their wits,” and Trump to Gryffindor for his “boldness.” Take those results as you will.

The sorting hats’s digital backbone is impressive enough, but Anderson went a step further. At a recent hackathon, he and a team of hardware engineers built a fully articulated animatronic “body,” of sorts, for the magical headpiece. Actuators furrow the hat’s brow if a wearer is sorted to Slytherin, and LED “eyes” glow bright green when someone’s labeled a Gryffindor.

Anderson’s daughters are enjoying the hat thoroughly, reportedly, but he’s not keeping the magic to himself: he’s documented the project thoroughly on GitHub. And soon, Anderson’s adding color to the hat’s responses. “I may, time permitting, for next Halloween give it more personality and make it more dynamic,” he told Tech Insider.

Emerging Tech

Want to know which drones are flying near you? There’s an app for that

Want to know what that mysterious drone buzzing over your head is up to? A new system developed by AirMap, Google Wing, and Kittyhawk.io could soon tell you -- via a map on your phone.
Emerging Tech

A Japanese hotel fires half its robot staff for being bad at their jobs

Japan’s oddball Henn na Hotel has fired half of its 243 robot staff. The reason? Because these labor-saving machines turned out to be causing way more problems than they were solving.
Emerging Tech

CERN plans to build a massive particle collider that dwarfs the LHC

CERN already has the world's biggest particle accelerator. Now it wants a bigger one. Meet the 9 billion euro Future Circular Collider that will allow physicists to extend their study of the universe and matter at the smallest level.
Emerging Tech

Forget fireworks. Japan will soon have artificial meteor showers on tap

Tokyo-based startup Astro Live Experiences is preparing to launch its first artificial meteor shower over Japan, serving as a showcase of its prowess in the space entertainment sector.
Cars

Robomart’s self-driving grocery store is like Amazon Go on wheels

Robomart's driverless vehicle is like an Amazon Go store on wheels, with sensors tracking what you grab from the shelves. If you don't want to shop online or visit the grocery store yourself, Robomart will bring the store to you.
Emerging Tech

Glowing space billboards could show ads in the night sky

Look up at the night sky in 2020 and you might see an ad for McDonald's floating among the stars. A Russian startup is working on a project that uses a constellation of small satellites in low-Earth orbit to create glowing ads.
Emerging Tech

New brainwave reader tells teachers if students are concentrating

Massachusetts-based startup BrainCo has developed brainwave-reading headbands which can reportedly help reveal if students are concentrating in class. Here's how they're being used.
Emerging Tech

Fears about kids’ screen use may have been overblown, Oxford researchers find

Many people take it as gospel that digital technologies are harmful to young people’s mental health. But is this true? A recent study from the University of Oxford takes a closer look.
Emerging Tech

Meet Wiliot, a battery-less Bluetooth chip that pulls power from thin air

A tiny chip from a semiconductor company called Wiliot could harvest energy out of thin air, the company claims. No battery needed. The paper-thin device pulls power from ambient radio frequencies like Wi-Fi, Bluetooth, and cell signals.
Emerging Tech

Hexbot is a modular robot arm that does everything from drawing to playing chess

Who wouldn’t want their own personal robot arm to do everything from laser engraving to competing against you in a game of chess? That's what Hexbot, a new modular robot, promises to deliver.
Emerging Tech

The best drone photos from around the world will take your breath away

Most of today's drones come equipped with high-end cameras, which are quickly revolutionizing the world of aerial photography as we know it. Here are some of the best drone photos from around the world.
Emerging Tech

Too buzzed to drive? Don’t worry — this autonomous car-bar will drive to you

It might just be the best or worst idea that we've ever heard: A self-driving robot bartender you can summon with an app, which promises to mix you the perfect drink wherever you happen to be.
Emerging Tech

Scientists successfully grow human blood vessels in a Petri dish

Researchers have managed to grow human blood vessels in a Petri dish for the first time, and even to successfully implant them into live mice. The results could be a game-changer for diabetes.
Emerging Tech

Tiny animals discovered in Antarctic lake deep beneath the ice

Scientists have made a surprising discovery in Antarctica: the carcasses of tiny animals including crustaceans and a tardigrade were found in a lake that sits deep beneath over half a mile of Antarctic ice.