Move over, Michael Myers.

A developer has trained artificial intelligence software to be able to dream up its own Halloween masks and the results are downright terrifying.

Matt Reed, a creative technologist at Nashville-based advertising agency Red Pepper, trained a neural network by supplying it with 5,000 images of popular Halloween masks, like Jason Voorhees from the 1980's horror film 'Friday the 13th.'

Scroll down for video

Move over, Michael Myers. A developer has trained artificial intelligence software to be able to dream up its own Halloween masks and the results are downright terrifying

HOW DOES IT WORK? A developer has trained a neural network to be able to create its own Halloween masks. The AI uses a general adversarial network, a type of algorithm that is used in automated machine learning software. It 'pits two networks against each other' to be able to improve over time. This results in the algorithm getting smarter the longer it runs. In a short while, it's able to create realistic images on its own. Advertisement

Reed said he used a general adversarial network, a type of artificial intelligence algorithm that is used in automated machine learning software.

It works by 'pitting two networks against each other,' thereby allowing them to continuously improve over time.

'It basically teaches itself how to make itself better,' Reed explained. 'The longer it runs, the "smarter" it gets.'

He supplied the algorithm with thousands of images of Halloween masks to see if it could make up something on its own.

In addition to Jason Voorhees, Reed used other popular Halloween masks like a Guy Fawkes mask from 'V for Vendetta' and the Jigsaw mask from the 'Saw' movies, among others.

At first, the algorithm was only able to generate masks that were a mish-mash of indistinguishable pixels.

It didn't take very long before it was creating its own creepy masks, however.

Pictured are examples of the real Halloween masks used to train Reed's neural network. The algorithm used these images as a frame of reference for what it could create on its own

At first, the AI was only able to generate masks that were a mish-mash of indistinguishable pixels. It didn't take very long before it was creating its own creepy masks, however

'The generated masks start off as noise but slowly become more and more realistic over hours and hours of training,' Reed said.

One-half of the neural network gives the other examples of Halloween masks and the 'discriminator' will tell it how well it did and give it ways it can improve.

It then goes back and tries again, doing this numerous times as a way to improve.

'After leaving the network running overnight things started to get more interesting,' Reed said.

Pictured are more examples of the creepy masks created by the neural network. Reed said it only took about 24 hours for the algorithm to be able to generate believable examples

'After 24 hours of training the AI had learned to ruin a perfectly good night of sleep.'

Reed said he first tried to create the project in September, but 'the results were terrible.'

Since then, the AI has created hundreds of masks.

He's even given a few of them their own names, including 'pirate JFK,' 'trump nugget' and the 'smoking sock puppet.'

Reed added that he'll continue running the algorithm between now and Halloween and featuring its latest creations in a Dropbox folder.

It seems that the algorithm's version of a Halloween mask was even more horrifying than he could have imagined.

'What’s so scary or unsettling about it is that it’s not so detailed that it shows you everything,' Reed told New Scientist.

'It leaves just enough open for your imagination to connect the dots.'