Skip to content

Referee

Referee is a verification process for code ports.

Core trick

Compares frame-by-frame pixel output of a port against the original C engine on the same demo input, scoring the difference.

Tags

Description

Referee is a verification process for code ports. You have set inputs that are being tested upon. The game runs using these inputs and each frame is taken as a picture. Argon then translates the base code into language of choice. It then works to not stop until its working. Once finished both are compared using same inputs and a score is formed by difference in pixels.
ColinWWW/Gemini-4-Argon-SF-Hackathon★ 00 forksRustCreated Oct 25, 2026 · last push Oct 25, 2026

README excerpt

# Referee

**Pixel-verified autonomous code migration, built with Gemini 4 Argon (`gemini-4-argon`) and Gemini 3.8 Flash (`gemini-3.8-flash`).**

Referee ports id Software's original 1997 Doom source code (`linuxdoom-1.10`, 126 C/header files, ~42,000 lines of C) to **Odin** and **Rust** in single long-decode passes, resolving 32-bit pointer assumptions for native 64-bit execution. The original 1997 C engine acts as the deterministic **referee**: all builds replay the same shareware `demo1` (`5,026 gametics` / `5,066 frames`), dump every raw 320×200 frame + 768-byte RGB palette (`64,768 bytes/frame`), and compare output pixel-for-pixel.

![Three-Way Side-by-Side Comparison: Original C (1997) vs Odin (Argon) vs Rust (Argon)](runs/three_way_01967.gif)

---

## Results Summary

| Implementation | Target Arch | Source Files | Compile Loop (`gemini-3.8-flash`) | Gametics Timed | Total Frames | Identical Frames | Pixel Match % | First Divergent Frame |
|---|---|---|---|---|---|---|---|---|
| **Original C (`reference/`)** | 32-bit (`-m32`) | 62 `.c` + 64 `.h` | Ground Truth Referee | `5,026` | `5,066` | `5,066 / 5,066` | **100.0%** | — |
| **Odin Port (`ports/odin/`)** | 64-bit native | 124 `.odin` | 41 attempts (31 LLM fixes) | `5,026` | `5,066` | **`5,060 / 5,066`** | **100.0%** *(99.999%)* | `1967` |
| **Rust Port (`ports/rust/`)** | 64-bit native | 79 `.rs` (`src/`) | **9 attempts (7 LLM fixes)** | `5,026` | `5,066` | **`5,060 / 5,066`** | **100.0%** *(99.999%)* | `1967` |

> **

Team