A screenshot of the Nintendo Entertainment System game \"A Nightmare on Elm Street.\"
VCU computer science student Jorge Vargas is using “A Nightmare on Elm Street” to develop “assistive agents” that help a human player advance through the game.

Finding Freddy: A VCU student is using a horror-based video game to build a more benevolent AI

Share this story

“Something frightening has been happening on Elm Street lately …”

So says the description on Nintendo’s “A Nightmare on Elm Street,” a 1989 video game based on the 1984 slasher movie. 

Jorge Vargas
Jorge Vargas.

Can a game whose object is to vanquish the blade-wielding Freddy Krueger be turned into a test bed to create a more benevolent form of artificial intelligence? That’s what computer science student Jorge Vargas aims to do with his project, “Finding Freddy: Assistive Agents for A Nightmare on Elm Street.” 

“There are two ways to think about it. You have ‘AI for games’ and ‘games for AI’,” said Vargas, who earned a bachelor’s degree in psychology from VCU in 2015 and is now completing the College of Engineering’s post-baccalaureate certificate in data science.  

Vargas is interested in the latter, using games to improve AI for applications outside of gaming. Vargas said he is not a big gamer himself. He is more interested in how games can help develop better, more responsive AI for human-centered applications such as self-driving cars and adaptive robotics.  

“The bigger idea is that, in the future, when we're thinking about any kind of artificial intelligence, we would want it to assist us — rather than just being better than we are at everything.” 

He is using the video game “A Nightmare on Elm Street” to develop AI known as “assistive agents.” These autonomous entities within the game work to help a human player progress through levels and ultimately win a hand-to-hand battle with the virtual Freddy.  

The bigger idea is that, in the future, when we're thinking about any kind of artificial intelligence, we would want it to assist us — rather than just being better than we are at everything.

It turns out that training AI to help humans is more complicated than teaching AI to beat humans. This is because an assistive agent must develop an almost intuitive understanding of the human player’s motives and decisions. 

To do this, Vargas is training the assistive agents in a form of machine learning called reinforcement learning. Instead of training the AI to simply counter what an opponent does, reinforcement learning teaches the AI to work with a human to get a cumulative reward. 

Reinforcement learning focuses on balancing exploration of uncharted territory and exploitation of current knowledge, so it is ideal for training assistive agents to help a human player navigate the changing settings and challenges of “A Nightmare on Elm Street.” By tracking the player’s previous actions and the range of options over time, these assistive agents get better at jumping in to help that specific player reach the attic without stepping on a snake, for example.       

Like any good teacher, Vargas is studying the agents’ learning progress. 

“So far, every agent I’ve trained loves to stop and hang out on the stairs,” he said. “I think it's realized that it can wait until the game goes into ‘nightmare’ mode, which is when Freddy Krueger actually shows up for the final battle. It’s a way to help the human play efficiently and … not get killed by Freddy, but defeat him every time.”

This article originally published on VCU Engineering.