Imagine having a disc jockey inside your computer who matches the music played to your current frame of mind. According to new research from The University of Texas at Austin, machine learning can approximate that experience creating ultra-personal music playlists that adapt to each user's changing moods.

Maytal Saar-Tsechansky, professor of Information, Risk, and Operations Management at the McCombs School of Business, together with a pair of computer science researchers at the university, created a "personalized DJ." With their new paper, "The Right Music at the Right Time: Adaptive Personalized Playlists Based on Sequence Modeling," published in the MIS Quarterly, their goal is to outdo streaming music services by making playlists that change according to each individual's shifts in emotion.

"Whether you're getting into the car after a long day of meetings, or you're getting out of bed on a weekend morning, it should tailor its recommendations to your changing moods," says Saar-Tsechansky.

The project started as the brainchild of Elad Liebman, a Ph.D. student in computer science at UT Austin who also has a degree in music composition. The program that he, Saar-Tsechansky, and UT Computer Science Professor Peter Stone designed runs a series of feedback loops. It tries out a song, the listener rates it, and the program heeds that rating in choosing the next song. "Then you alter the model accordingly," says Liebman.

The program adapts to the listener's mood, considering not only which songs he or she will enjoy, but also in what order. Songs are organized intelligently, leading to an expressive," DJ-like" sequence, instead of a random, arbitrary-sounding one.

Like a chess player, it plans its moves 10 songs ahead. While one song is playing, it generates tens of thousands of possible sequences, and it predicts which one will please the listener the most. It serves up the next song on that playlist -- and while that song is playing, it creates and tests new sequences.

In machine learning, the mechanism is known as a Monte Carlo search -- which inspired the name of the program: DJ-MC.

The program could be adapted to other kinds of media, from news stories to videos.

"Learning algorithms don't have taste, they just have data," Liebman says. "You can replace the dataset with anything, as long as people are consuming it in a similar fashion."

Saar-Tsechansky goes further. "It can work in any case where you're recommending things to humans, experienced in a sequence," she says. "It could even be food."