I Trained a Bunch of Rats To Become Gamers
All photos courtesy of Viktor Tóth

I Trained Some Rats To Become Gamers

Viktor Tóth eventually wants to create an immersive experience where people can compete against the rats or watch them face off. 
Shamani Joshi
Mumbai, IN

Hungarian neuroscientist Viktor Tóth was playing Doom II, a first-person shooter computer game, in August 2020 when his phone buzzed with some intriguing news. 

Billionaire tech entrepreneur Elon Musk had just unveiled a pig named Gertrude, with a computer chip installed in its brain to detect snout movements, which Musk casually described as a “Fitbit in your skull with tiny wires.” The pig was part of research for the entrepreneur’s ambitious Neuralink start-up, a proposed brain-to-machine interface that offers a technology that could allow its user to control computers using only their mind. 


As Tóth took in the news, an idea lit up his brain. He wondered if he, too, could conduct an experiment that explored how an animal adapted to a virtual environment, and use its findings for more research on brain-computer interfaces. 

“The idea came out of nowhere,” Tóth, a former fellow at New York’s Feinstein Institutes for Medical Research, told VICE over a video call. While the neuroscientist had previously conducted clinical and medical research in the fields of machine learning and neuroscience, he was keen to explore brain-computer interfaces, though he had never worked with lab animals before. 

While we’ve seen animals unwittingly engage in some Pong, PacMan or Wii Tennis, there isn’t enough research to determine how much these sentient beings are capable of understanding while playing these games. 

In February 2021, researchers found that a group of pigs showed major gamer potential after a successful experiment that involved the animals using their snouts to manipulate a joystick. Meanwhile, Neuralink followed up their bionic pig with a monkey who could play video games with his mind. All this was enough for Tóth to tread on the tricky territory, and he chose the most convenient animal he could find. 


“I chose rats because they have an instinct for moving around in small spaces and can learn context specific actions,” he explained. “They’re also smaller than pigs, and easier to handle and access than monkeys.” 

So, Tóth got three rats and befittingly named them John Romero, John Carmack, and Tom Hall, after the key creators of the Doom II gaming software. For Tóth, choosing this particular iconic ’90s game for his experiment was a no-brainer. 

“They [the game’s creators] have developed their own map editing software, which I used to create different versions of the corridor map,” he said. The game essentially consists of the player navigating a maze and shooting at a villain called an imp. “I also randomly positioned imps at different points so I could train the rats to detect them automatically with each session.” 

But to kick off his experiment, Tóth had to first figure out how to build his own rodent VR setup. To do this, he took cues from a similar experiment carried out in 2005, where rats were put in a 3D environment through a DIY VR setup. 

“I took a lot of inspiration from how they built the basics of these setups,” he said. “I [replicated] the kind of balls they used for the rat to run on, where they placed the sensors around these balls, and how to levitate the ball so there’s less friction while the rat is running on it.” 

rat gamer doom virtual reality.jpg

Tóth built a virtual reality setup with a 360-degree-view screen for his rats.

For his setup, Tóth used a large polystyrene ball with ball bearings under it that could be rolled by the rat. He then suspended his rats in an adorably adorned harness so that they could wriggle about on the ball with their feet, as sensors built into the ball using mouse parts (pun intended) recorded the rat’s movement in the virtual world. The setup also consisted of a curved computer monitor that allowed the rats to have a 360-degree view of the game to ensure an immersive experience. The VR setup built using a 3D printer cost roughly $2,000 to build, though Tóth estimates the cost of caring for the rats, their food and toys came up to around $4,000. 

rat gamer doom virtual reality 2.jpg

The neuroscientist's setup was built using a large polystyrene ball, which the rat would run on after being suspended on a harness.

Once he had the setup ready, Tóth used the behavioural training technique of operant conditioning, where an action is rewarded or punished by a positive or negative stimulus respectively to reinforce the desired behaviour. 

“Each time the rats would move in the right direction or shoot the imp, they would be given a sugar syrup mixed with water through a high precision water valve,” he said. “The dosage of this sugar water was essential, since if I gave them too much, they might get fed up and stop playing. I also installed these air puffs, which essentially blew air into the rats’ whiskers to make them think they had hit a wall when they ran into a wall in the video game.”

rat video game doom virtual reality.jpg

Tóth would pump the valve with a sugar water mixture to reward the rat each time it successfully played the game.

While previous experiments in rodent VR involved the researcher manually turning the ball on which the rats would run, Tóth was keen on automating the process. However, he was also concerned that using a motor could make the rats lazy. “I would turn the motor for a few seconds and the rats would run on it,” he said, breaking down how he trained the rats to navigate the map. “Then for about 15–20 seconds, I would stop it and wait. The more I did this, the more the rats realised they had to run on the ball.” 


The meticulous process of training the rats took several weeks, starting with conditioning them to get used to Tóth by feeding them baby food and playing with them. At about two weeks in, the rats began running on the ball for at least five minutes during his hour-long daily training sessions. 

“Once I had taught the rats how to run in the game by themselves, teaching them how to shoot was the difficult part,” Tóth admitted. He explained that each rat progressed differently. 

Viktor Toth rat video game Doom II.jpg

Tóth spent about two weeks getting the rats comfortable with his presence before he could commence the experiment.

“Romero was the thrill seeker, while Carmack and Tom were more chill and shy,” he said. 

Tóth recollected how the first time he met his prized pupil, the “thrill-seeking” Romero bit him. He also almost escaped from his setup once. “Rats don’t usually like open spaces, but Romero loved to explore. One day, I removed his harness and put him on the table. Next thing I know, the little guy has run off behind the trashcans. I spent one-and-a-half hours looking for him in my lab, alone at midnight.” 

But despite Romero’s slightly aggressive endeavours, Tóth takes pride in his little top performer. “Tom was the first one to make a breakthrough when it came to running, but it was Romero who came out as the best performer,” he said. “Romero was the first one to shoot the imps in the game.” 

To train his rugrats in the art of firing a virtual gun, Tóth used a magnetic push-pull setup. “Every time the imp was near and I wanted them to shoot, I would use this magnet to pull them up,” he explained. “I would initiate this sequence of pulling them when I wanted them to shoot, and give them positive reinforcement when they were successful.” 


Since he was manipulating the game’s maps to make the training process more seamless, Tóth kept score using a system of “runs”, where he counted how many times the rats could successfully navigate the maps and shoot the enemy. “Romero got the highest score and completed a ballpark of 15 consecutive runs, while Carmack completed about five, and Tom only managed to do it two or three times,” he said. 

Tóth’s initial foray into pro gamer rats began in February 2021 and wrapped up by August. He thinks it was fairly successful, and was only just the beginning. 

“I decided to leave New York and move back to Hungary, so I had to stick to my deadline. While the rats learnt how to run and shoot in Doom II, there was still some confusion from their end on why they would get a reward when they shot an imp.” 

Having moved back to Hungary after three years of being away, Tóth now plans to continue his research, using his initial setup and learnings to modify the process and make it more seamless. 

“I’m working with a friend who is an electrical engineer to make another setup. This time, we’re exploring a different mixer of juices in the valves because I realised sugary water wasn’t motivating enough. Rats also have an intrinsic behaviour where they like to poke their nose into stuff, so we’re exploring how to use that to make them shoot the imp.” 

The neuroscientist is also figuring out what other games he can introduce to his next bunch of rat gamers. “I thought about teaching them how to play 3D Pacman, but that might not work since the rat can’t keep turning back while playing the game,” he said. “I’m considering this upcoming game called Rattest, which literally features a rat, and could be an alternative to Doom II in this experiment.”

Tóth envisions his experiment as an immersive experience, one where he can eventually invite onlookers to compete with the rats or watch two rats compete against each other. “After we complete the second setup, we’re also planning to start a Twitch channel,” he added. 

In the long term, however, Tóth’s research could map how the rat’s motor actions translated to their virtual interactions, and could help build more realistic robotic prosthetics or help people with physical disabilities. 

“I got a lot of mixed reactions when people found out I was training rats to play Doom II,” said Tóth. “There are some concerns that I’m building [an army] of killer rats, but mostly people are pretty pumped to have gamer rats. Some have joked that they used to play Doom II with a mouse, and now they can do it with a rat.”  

Follow Shamani on Instagram and Twitter.