老鼠玩毁灭战士
Rats Play DOOM

原始链接: https://ratsplaydoom.com/

## 鼠VR:从啮齿动物的视角玩DOOM 研究人员构建了一个完整的开源VR系统,让老鼠可以“玩”DOOM。该系统包括一个运动追踪跑步球用于移动,一个全景180°全高清头显,一个爪子操作的扳机用于游戏内动作,以及一个自动糖水奖励系统来强化行为。开发了两个版本——v1,一个基本的概念验证,和v2,一个更高级和模块化的设计。 该系统利用Python控制的软件在PC和树莓派上运行,管理运动追踪、跑步球驱动用于引导训练、扳机输入和精确的奖励递送。所有硬件和软件——包括3D可打印设计、原理图和代码——都是公开可用的,以鼓励复制和进一步开发。 初步测试表明,老鼠成功地在虚拟环境中导航并激活了扳机,但由于测试对象(Todd、Kojima和Gabe)的年龄以及时间限制,全面的行为验证受到限制。未来的工作将侧重于更长的训练时间,解决个体老鼠的差异,并评估VR暴露的长期福利影响。该项目由YoloRun.Capital资助,旨在激发对动物-计算机交互的进一步研究。

## 鼠类玩DOOM:摘要 一位创作者构建了一个VR设置,让老鼠“玩”DOOM,通过球来控制移动,并尝试将动作与游戏内事件(如射击)联系起来。虽然老鼠并没有完全*玩*游戏——习惯化得以实现,但由于老鼠的年龄,完全训练证明很困难——该项目展示了动物-计算机交互的潜力。 该创作者开源了硬件和软件,引发了关于改进设计的反馈,包括用于更轻松修改(适用于不同动物,如老鼠或猫)的参数化文件,以及零件成本估算。讨论集中在老鼠是否*享受*了这段体验、该设置的伦理问题,以及在延迟反馈的情况下创造奖励体验的挑战。 该项目引发了人们对游戏以外潜在应用的兴趣,例如训练松鼠避开车辆,并突出了通过互动体验理解动物认知令人着迷的可能性。 现有设置的视频可用,创作者也欢迎其他人继续该项目。
相关文章

原文

Intro

We built a complete VR setup from scratch to let rats play DOOM. The system includes a motion-tracked treadmill ball, a panoramic headset, an input trigger, and a reward circuit. All hardware and software components are open sourced, including 3D-printable designs, circuit diagrams, firmware, and control software.

The first version (v1) was built in New York by Viktor, who trained rats to walk through a corridor in DOOM using a simpler rig. That version was featured on Vice and PC Gamer. After moving back home, the project was paused. Public interest reignited development, leading to v2, a more advanced and modular version built in collaboration with electrical engineer Sándor Makra. Akos Blaschek later assisted significantly in documenting the project for open-sourcing, aiming to enable others to replicate and build upon this work. Key metallic components were designed and sourced in collaboration with SZURWIN KFT.

V1

  • Basic ball setup
  • Rats trained to run forward
  • Minimal sensors and mechanics
  • No panoramic screen
Rat VR Setup Version 1
Rat VR Setup Version 1

V2

  • New ball driver mechanism for smoother movement
  • Foldable AMOLED screen with 180° horizontal and 80° vertical FOV, Full HD resolution
  • Upgraded sensors for movement tracking
  • Reinforced feeder system with mixing motor
  • Modular 3D-printable components
  • Improved electronics reliability and safety
Rat VR Setup Version 2
Rat VR Setup Version 2
Full setup from side showing rat on ball, screen around, trigger, and water tube.
Full setup from side showing rat on ball, screen around, trigger, and water tube.

Limitations

We reached the point of rat habituation but didn’t start training. Our rats (Todd, Kojima, Gabe) aged out before full testing. The setup works, but behavioral validation is pending.

Hardware

The hardware is a comprehensive VR rig designed for rodents. It consists of a motion-tracked sphere that captures the rat's movements, a custom-built trigger for in-game actions, a curved panoramic screen for visual immersion, and an automated reward system that dispenses sugar water to reinforce behavior. All these components are mounted on a modular aluminum frame, creating a complete, self-contained environment for the rat to interact with the game.

View the Hardware Assembly Guide

Visual Interface

The headset wraps around the rat’s head with a foldable AMOLED screen. It maximizes immersion without obstructing whisker space. The screen supports Full HD resolution.

The headset frame also integrates several sensory components: two small air nozzles are positioned near the left and right whiskers, capable of delivering targeted air puffs on command (e.g., signaling wall collisions in-game). The frame provides a secure mounting point for the reward system's dispenser tube, placing it near the rat's mouth. Additionally, the design includes placeholders for miniature speakers near each ear, intended for future implementation of stereo audio cues.

3D Model: Headset

Locomotion

Movement is captured via a free-spinning ball under the rat. Rotary sensors track displacement and convert it into game motion. The ball can also be driven by motors.

These motors are used during training to roll the ball and simulate movement paths before a reward. This guides the rat on where to go, helping form movement-action associations. Like the trigger, this allows for programmatic training sequences with minimal initial input from the animal.

3D Model: Stand/Ball

Trigger Input

The shooting input is a custom-built hand-operated lever. Rats pull it with their paws to fire. The lever is held in place by small springs, encased in a 3D-printed housing. It includes a rotary encoder to detect motion and a stepper motor to actuate it.

The motor allows programmatic control—pulling the lever to demonstrate shooting. This enables training by pairing visual cues with mechanical motion, reinforcing the association before the rat initiates the action on its own.

3D Model: Trigger

Reward System

Positive in-game actions trigger a liquid reward: sugar water delivered through a precise dispensing mechanism. The system consists of:

  • Mixer: Continuously stirs the sugar solution to maintain even concentration
  • Pump + Pressure Sensor: Keeps the line under constant pressure
  • Solenoid Valve: Magnetic valve that opens to release exact 10 µL doses
  • Dispenser: Positioned near the mouth for easy access

This setup ensures accurate, repeatable reward delivery with minimal delay. The reward is synchronized with game events to reinforce desired behaviors.

Reward circuit with labeled mixer, pump, valve, and dispenser.
The messy but functional reward circuit from behind.

Limitations

The current system assumes basic rat mobility and grooming behavior. Fine-tuning might be needed for rats of different sizes or temperaments. Trigger placement and reward tube flow may need calibration per subject.

Software

The setup is controlled through a modular Python system. The main entry point is arena_scenario.py, which runs the full control loop.

The system includes:

  • Motion capture: Reads movement from optical flow sensors mounted around the treadmill ball.
  • Locomotion control: Drives the ball motors to guide the rat during training.
  • Trigger input: Reads lever pulls, detects voluntary shooting actions.
  • Reward delivery: Dispenses precise 10 μL sugar water rewards via a controlled solenoid valve and maintains constant line pressure.
  • DOOM integration: Interfaces with a modified ViZDoom environment for real-time closed-loop behavior.
  • Training logic: Enforces demonstrations and delivers rewards based on game state and rat behavior.

View the Project on GitHub

The software runs on a PC and communicates with a Raspberry Pi via TCP sockets. The Pi handles real-time sensor reading, ball actuation, and reward control; the PC processes the sensor data, runs the game, and sends high-level commands to the Pi.

All major components—movement tracking, ball driving, trigger detection, and reward control—can be operated manually or in closed-loop mode. All control parameters (e.g., motor speeds, reward volumes) are set in Python code.

Limitations

There’s no in-built calibration suite. Users must validate sensor alignment and reward timing manually. Some microcontroller firmwares might require tuning based on hardware tolerances.

Results

The rats successfully learned to navigate the virtual environment and trigger the shooting mechanism. Habituation took approximately two weeks per rat. While advanced training wasn't completed due to time constraints, initial data showed promising engagement with the system.

Rat engaging with the VR setup during a session.
Rat interacting with the VR setup.

Limitations

Full behavioral validation requires longer training periods. Cross-subject variability wasn't extensively studied. The impact of prolonged VR exposure on rat well-being needs further research.

What Now?

Interested in building your own animal VR setup? Feel free to reach out for guidance. We're also compiling a comprehensive Rat VR Build Guide.

At YoloRun.Capital, we invest in ambitious, boundary-pushing projects like this, even the beautifully impractical ones. Have a wild idea? Let's talk.

A rat wearing a tiny Santa hat.

Team

Viktor Tóth

Viktor Tóth

Gamer Rat Coach

Sándor Makra

Sándor Makra

Electrical Engineer

Ákos Blaschek

Ákos Blaschek

Documentation Lead

联系我们 contact @ memedata.com