Rats named Carmack and Romero are playing Doom

A rat playing Doom 2.
(Image credit: Viktor Tóth)

Forget about the toasters, for there is a new frontier in Doom trivia: training up rodents to wander its mazes and blow away imps. Take a bow Viktor Tóth, a neuroengineer who has been puzzling over how to train rats to play Doom for the past year: and finally (kind of) did it.

"I built a VR setup for rodents from scratch and trained three rats in an automated fashion, without manual intervention, to traverse a corridor rendered in the DOOM II engine," writes Tóth. "Although I did implement the mechanisms to further train rats to shoot monsters in-game, I lacked the time to actually reinforce the behavior."

The rodent VR setup has a polystyrene ball tracked with motion sensors, and the rat is suspended on top of this with a harness. There's a curved PC monitor in front of it showing the game environment, and a little tube containing sugary water that the rat gets to sip when it's doing the 'right' thing: training it to 'walk' via treats, positive reinforcement. The level it's walking through is a custom Doom 2 map with an exit, long corridors, and a stationary imp that needs shooting.

The rats are 8 week-old Long Evans rats, and the cherry on the cake is they're called Carmack, Romero, and Tom (after Tom Hall). "Romero was fearless (more like thrill-seeking) and loved grapes. Carmack was a real architect building around its home keeping it tidy; he was fond of bananas. Tom began shy, but held the most surprises in learning performance."

As part of the experiment's goal was to automate aspects of the training, shooting was tied to a rearing movement that the harness could initially encourage (the rat needs to be taught the correct movement before it adopts it in the right situations).

Tóth explains: "Simply put, the training procedure would go as follows: the rat walks into a monster → the software detects that the monster is in the proximity of the player (and for now, let’s assume that the player is facing it) → initially the rat has no idea what to do in this situation, so the training software activates the push-pull solenoid lifting the animal slightly upwards → the head of the actuator then touches the button → monster gets shot down → reward in the form of sugary water is released to reinforce the behavior."

Now there's an idea for how the next Doom could be better: a little hit of coke every time you blow away a demon.

There is of course the question of whether the rats are really 'playing' Doom in any kind of meaningful way, or just running on a ball for rewards. On the other hand, I just watched what definitely seemed to be a rat shooting an imp with a shotgun. Tóth set himself a hard deadline and wasn't happy with the shooting response by the end, and reckons in hindsight he should have gone with a nose-poking system (you can read his full writeup here).

"I had fun building a rodent VR rig and training rats to kinda play Doom," ends Tóth. Well I had fun watching them, and feel this is just a foundation for a future where Twitch is dominated by animals playing Doom. Would a pig be better than a rat? Could you get a pig and a rat in a deathmatch?!? These are big questions for science, and must be answered.

Rich Stanton

Rich is a games journalist with 15 years' experience, beginning his career on Edge magazine before working for a wide range of outlets, including Ars Technica, Eurogamer, GamesRadar+, Gamespot, the Guardian, IGN, the New Statesman, Polygon, and Vice. He was the editor of Kotaku UK, the UK arm of Kotaku, for three years before joining PC Gamer. He is the author of a Brief History of Video Games, a full history of the medium, which the Midwest Book Review described as "[a] must-read for serious minded game historians and curious video game connoisseurs alike."