What do algebra, FedEx, and puppy-loving Lumosity players have in common? They all factored into the development of Pet Detective, one of our most played games every month. The game challenges your planning skills — or your ability to think ahead, evaluate options, and choose the best course of action — by charging you with finding the shortest route to pick up lost pets and return them to their homes.
The game grew from a vague brief: develop a planning game. As with all Lumosity games, the development process kicked off with research. For instance, what sort of assessments do cognitive scientists use to measure planning skills? Though the team briefly explored working with a Tower of Hanoi-inspired concept, they wanted the new game to feel thematically relevant to planning in real life — and the Tower of Hanoi puzzle didn’t seem likely to be encountered outside of theory.
Moreover, Aaron, a Lumosity Research Scientist, explains, “Once you know the ‘trick’ to solve one version of the Tower of Hanoi, you can solve further versions without having to actually plan.”
Ethan, the Games Engineer behind Pet Detective, explains, “So we brainstormed some ideas and determined that we wanted to make a game around errands, and the most efficient order in which to do them, since that sort of planning is something people do every day.”
He went on to develop three prototypes, including one that became Pet Detective. (Another prototype morphed into Train of Thought, an Attention game — you can read more about Train of Thought’s development process here.)
“What’s difficult about Pet Detective, both for me developing the game and for users playing, is that the number of possible routes you can take grows with the number of pets,” Ethan says.
Essentially, Pet Detective is based on factorial functions, where each pet is a factor. Sound vaguely familiar from high school algebra? You can think of it this way: how many ways are there to shuffle a deck of 52 cards? You start with 52 options for the first card in the deck, then you have 51 options for the second, 50 for the third, and so on. To solve how many ways you can shuffle the deck, you multiply 52x51x50...all the way to 1. This function is expressed 52!
In Pet Detective, the highest level asks you to return 11 pets to their homes. This means there are 11! possible routes you can take in this level — that’s over 39 million routes — and your job is to find the shortest.
“With that many possible routes,” Ethan says, “you’d never find the shortest one without planning. And at a certain point, if the number of factors is large enough, computers couldn’t even find a solution in the lifetime of the universe.”
To better understand the task at hand, Ethan also researched vehicle routing problems. Here’s where FedEx comes in: to run an efficient business, they need to find the shortest route to deliver the most packages every day. Ethan discovered that in these real-world situations, there are often constraints that make this task more challenging, and he incorporated a few of these constraints into his Pet Detective prototype. For instance, in the real world, vehicle route planning is often constrained by available fuel, and companies like FedEx also craft routes that include pickup and drop off.
“In almost every trial, the amount of fuel you’re given is equal to the shortest possible route,” Ethan notes. “Of course, there are some trials where there are more than one shortest route, too.”
Originally, Ethan wrote a computer program to identify the shortest route possible in every Pet Detective trial — how else would the game recognize whether the player correctly identified the shortest route? His computer program worked well with smaller numbers of pets, but lost accuracy as the number increased. That’s where player feedback became essential.
“When we first released Pet Detective in early access to subscribers, we crowd-sourced the shortest routes by having players solve for them,” Ethan says. “Then I went back and wrote a new program that incorporated players’ routes, and this made a big difference.”
That’s not the only way players helped with the development of Pet Detective, though. Originally, Ethan conceived of the game as planning routes for taxis. But he recalled meeting with a playtester a few months before — before Pet Detective was even in development — who, when asked what types of games he’d like to play, said, “One about puppies.”
“And so, because of that one playtester, I wanted to figure out a way to incorporate puppies,” Ethan recalls. “We settled on returning lost pets for the theme, and that’s how the game became thematically interesting for players.”
Like Train of Thought, Pet Detective benefits from a few hallmarks of Ethan’s work. Discussing Train of Thought, Ethan noted that “people respond to this idea that they have the star role in this game. You can see the drama from even just a screenshot: red train, red station, the red train needs to go to the red station, and you’re in control of making that happen. It became this really intuitive, rewarding game.” The same can be said of Pet Detective: players are the main actors in this game, and the game’s narrative is evident from the art, with each pet corresponding to a house and the fuel monitor evincing the need for efficiency.
“Sarah, the Games Artist, took my prototype and made it visually stunning,” Ethan says. “There was a lot of work that went into getting the game’s look just right, and Sarah was also responsible for incorporating a film noir feel. I think of the game almost like a computerized board game: you can imagine the pets as 3D pieces, the houses recall Monopoly. And so a game inspired by factorial functions and vehicle route planning became really approachable.”
Asked how he feels about Pet Detective today, almost four year years after its first release?
“It’s my favorite Lumosity game. And, I think, one of our most strategic games.”
Interested in playing Pet Detective? Find the game at lumosity.com or in our iOS and Android apps.