Christmas songs are a curious genre of music. During the month of December, artists like Frank Sinatra and Mariah Carey briefly return to the top-40, part of a round of sleigh rides and silver bells that begins closer and closer to Thanksgiving and ends promptly on December 26th. For the cynical, Christmas music seems to be hopelessly generic. The data blog 538 has even compiled what it deemed, slightly tongue-in-cheek, the “Spotify Christmas Industrial Average,” which tracks plays of “White Christmas” and “All I Want for Christmas Is You.” According to their numbers, if you are listening to Christmas music on the radio, about 10 percent of your time will be spent listening to a cover of either “Sleigh Ride” or “Winter Wonderland.” It’s enough to make anyone wish for a bit more variety. Despite the generic themes, Christmas carols aren’t quite as simple as they seem.

Ask a person to write a Christmas carol and you will likely get something involving Santa, angels, snow, and possibly a fa-la-la chorus. Ask a computer to do so and it might sound more like: “Hart fon the be the he br wong on the stor Christmas br he, or the wang.”

That’s the result Janelle Shane received when, as a joke, she asked a neural network to write her a carol. Shane is a research scientist in optics who likes to play with neural networks. These networks are a type of computer program designed to mimic the way that the human brain learns to solve problems. For humor, Shane has already asked these networks to try beginning a novel or writing knock knock jokes. (Spoiler: they aren’t very good.)

The same results occurred when she asked the program to write her a new Christmas carol.

“My process starts with a dataset – something that the neural network has to figure out how to imitate. Rather unfairly, I give it no instructions about whether it’s trying to write knock-knock jokes or invent Halloween costumes or begin a novel,” Shane writes on her blog. “It doesn’t even have any built-in knowledge of English. It definitely doesn’t have any clue what Christmas carols are, which is why this week’s experiment was so much fun.”

Instead, the neural network had to learn what Christmas carols are by working through a collection of about 240 Christmas carols and songs, ranging from “Grandma Got Run Over By a Reindeer” to “What Child is This?” The true meaning of Christmas might not be found in the lyrics, but hopefully the computer could at least work out what a true Christmas song was.

Given these loose parameters, the program began throwing letters together to see what patterns they formed. Its first product went something like this: “a a a na snn aca naa i s a i aa a a n a uugna nn na i a uaa a a i a a a a a sna aagt o aa.”

After checking its rules against the songs in the database, the machine started to get better. The round-two songs didn’t really make sense, but they at least included strings of words, which managed to include both “Christ” and “Christmas.” Not too shabby for a computer. Even so, it took many more practice rounds to make these words more than mere spots of sense in a sea of random syllables.

“Now, neural networks tend to pick up tone and vocabulary pretty easily, but struggle with making sense,” Shane admits. “So, the carol-trained neural network learned to produce a lot of lines that sound – well, joyful, at least.”

What did the network’s final results sound like? The computer-generated Christmas song is, like many Christmas songs, a rearrangement of familiar themes. In this case, the cover may not be an improvement, though.

One version ran something like this:

“The lord of the glory dawns
Give us the leave all away
A star is spent and red
Shake a cup a strend from the sky
Christmas is coming, the wind is come to you”

Another included a word that the computer had apparently invented for itself as sounding like something a Christmas carol should have: curry.

“With a heart reindeer
But no more a stranger.
Santa baby, and Dancer, and Curry down”

Artificial intelligence may be on the cusp of driving our cars, but at least in the world of music, humans still have the edge. At least this year, there won’t be any computer-generated additions to the Christmas carol-book.

Follow Erin on Twitter.