The entrance to Luna Park in St Kilda, Melbourne, as transformed by MIT's Nightmare Machine. Credit:MIT/Data61 "Halloween is here. So we humans spend a lot of time trying to work out what the scariest costume is, what the scariest make-up is, the scariest party. This is a very creative endeavour. "But can machines do it? Can machines identify, in a creative way, something that is going to be scary?" The eight scariest faces produced by the Nightmare Machine as voted by the public. Credit:MIT/CSIRO Dr Cebrian and his colleagues fed 200,000 images of real human faces into the machine to teach it to recognise what a face looks like. From that point, the algorithm could generate its own version of normal faces.

"But we want to produce scary faces," Dr Cebrian said. "So we take a zombie face – a really scary one – and feed it into the neural network. "It only takes one." The scientists give this last step more weight in the neural network. So, from that point when it produces faces, it makes zombie faces. "As you can see in our experiment, it doesn't always work," he said. "Sometimes the machine draws something weird or funny and not scary." Sydney's Queen Victoria Building transformed by the Nightmare Machine. Credit:MIT/Data61

So the machine needs to learn from us. By visiting the MIT Nightmare Machine website, hundreds of thousands can judge whether or not images produced by the machine are scary. We, collectively, teach the machine how to terrify us. Why on earth would we want to do this? "We aren't taking this too seriously, we want to have fun with it," Dr Cebrian said. "But underneath is something very serious. "Emotions are something that machines could learn very easily to instil in humans.

"If these could be positive emotions – trust, warmth – it could signal 'Work with me, I want to help you'," he said. The Sydney Opera House as imagined by the Nightmare Machine. Credit:MIT/Data61 Dr Cebrian wants to discover how to work better with intelligent machines, how to co-operate with them, how to identify features that can make humans more productive. "Artificial intelligence is mostly going to be a positive force," he said. "I'm optimistic. It will create jobs, save lives and actually make us happier. "But there will be some things that are scary or unsettling. Some believe AI will take our jobs, our ideas, even our love partners.

"So the same technology we are using in this silly project could actually be used to comfort, to invite humans to co-operate with machines." Just like a child, or an adult, by learning behaviour that upsets humans, a machine can then be trained to avoid that behaviour, Dr Cebrian said. Media House in Melbourne through the 'eyes' of the Nightmare Machine. Credit:MIT/Data61 He said there are two main philosophies on how to teach machines what not to do. "One of them is to have very clear rules. That's the Asimov way. I don't believe in that. I think those top-down rules are always going to be faulty."

He refers here to science fiction writer Isaac Asimov's Three Laws of Robotics that he wrote in the short story Runaround in his collection, I Robot, which was turned into a blockbuster film staring Will Smith. "I think it's better to treat machines like we'd treat humans. Teach machines how actions make others feel and, once machines understand that, teach them not to do it. "Instead of [Asimov's] top-down rules, which are always going to have loopholes, it's better for a machine to learn bottom up." He said that, if machines can help us understand them, then it's going to be easier to work with them. "If we perceive them as alien, as too different from us, then we will fight them, and I don't like that, I like co-operation."

The author, if he wasn't already scary enough, turned into a blood-soaked image through the 'eyes' of the Nightmare Machine. Credit:MIT/CSIRO