As It Happens

Professor Panda and Shark Princess: When a computer algorithm generates Halloween costumes

Need to throw together a last-minute Halloween costume? Maybe you should try asking an intelligent computer algorithm what to wear.
Professor Panda and Shark Princess are costume ideas generated by Janelle Shane's neural network. (@HerbLovesTech/Twitter)

Read Story Transcript

Need to throw together a last-minute Halloween costume? Maybe you should try asking an intelligent computer algorithm what to wear.

Janelle Shane, a computer engineer from Lafayette, Colo., has designed an artificial intelligence that generates Halloween costume ideas — and so far, it has come up with some real doozies.

"I would say my most recent favourite is the Dancing Boar of the River. I think Ms. Frizzle's Robot is right up there and so was Steam Punk Chicken," Shane told As It Happens host Carol Off.

"Somebody messaged me today saying that they had taught their class this morning dressed as Professor Panda."

The AI is what Shane calls a "neural network." You feed it a bunch of information and it uses machine learning to start forming its own ideas.

"Rather than in normal programming, when there's a person who sits down at the computer and writes down rules that the computer has to follow, with neural networks, they just look at your data and generate their own rules. They try and figure out for themselves what's going on," she said.

"When I wanted to train it to generate Halloween costumes, all I have to do is give it a decently large set of existing Halloween costumes and let it look at them."

She couldn't find a sufficiently large sample of costumes herself, so she put up a form online and asked people to submit ideas. She has now has more than 6,000 costumes in her database.

"There were a lot of witches. There were a lot of ghosts. But people also got creative. There were a few sexy potatoes, for example. There was a toaster oven," she said.

"There was, you know, almost anything you can think of." ​
Janelle Shane's Ruth Vader Ginsberg costume wasn't generated by the neural network — but rather came from a suggestion someone made for the AI's database. (Janelle Shane/Twitter)

Of the first 4,500 costumes she used to train the AI, Shane said 300 of them contained the word "sexy."

"It was definitely a theme and, in fact, that's the first word the neural networked learned as it went through its training," she said. 

At first, the overrepresentation of "sexy" led to some flops. One of its earliest costume ideas was "sexy sexy zombie sexy cat."

But, over time, Jane said the AI learned and improved.

"It learned how to mix together words too," Jane said. "In fact, it learned to do that surprisingly well."

For example, Space Batman, Shower Witch, Punk Tree, Vampire Hog Bride and The Dragon of Liberty.

Behold, The Dragon of Liberty! (Liz Walsh/Twitter)

"I guess I hadn't expected it to actually produce any Halloween costumes that made sense," Jane said.

"I'm not sure that you can consider these as making sense, but at least you can sort of guess what they would be."