Overview › Code › R72
Code · blind round

R72 · Maze generation by recursive backtracking

blind round 9/11 local models answered

Every answer below carries the name of the model that wrote it. Blind refers to the scoring: the review was done without knowing which model produced which answer — the published result names them.

2 of the 11 local models delivered nothing through our test harness in this round — for reasons that lie with our setup, not with the models. Those cards are marked DNF like any other, but they are not evidence about those models — the reason is noted on the card itself.

A frontier reference answered the same task (Claude Opus 5) — outside the field and deliberately unscored, further down the page.

Show task
Create ONE self-contained HTML file (STRICT LIMIT: max 120 lines total) that generates a 30x20 maze with the recursive backtracker on a <canvas>. Carve the maze one cell at a time: highlight the current cell, draw the stack path behind it in a second colour, and show the walls disappearing as they are carved. When the maze is complete, hold it briefly, then start a new one. Show the number of cells carved and the current stack depth. Smooth requestAnimationFrame animation, NO user input, starts immediately and keeps running (restart with a fresh random instance when finished). No external libraries, no comments needed. Output ONLY the HTML file content, nothing else.

The answers

Local models (Brain cluster) — identical prompt, shuffled order (the sequence is not a ranking)
deepseek-r1:14bERRBLANKMINIFIEDFORMAT
Show code
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id="c"></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=30,h=20,cs=5,s=w*h;
let walls=[],stack=[],current,path=[],carved=0,depth=0,timer=0;
function init(){walls=[];stack=[];current={x:Math.floor(Math.random()*w),y:Math.floor(Math.random()*h)};path=[];carved=0;depth=0;}
function getNeighbors(c){let n=[];const dirs=[[0,1],[1,0],[0,-1],[-1,0]];for(let d of dirs){let x=c.x+d[0],y=c.y+d[1];if(x>=0&&x<w&&y>=0&&y<h&&!path.find(p=>p.x==x&&p.y==y))n.push({x,y});}return n;}
function addWalls(c,p){let dx= p.x-c.x, dy=p.y-c.y; if(dx===1)walls.push({x:c.x*cs+cs-1,y:(c.y)*cs,width:2,height:cs*2});if(dy===1)walls.push({x:c.x*cs,(y+c.y+1)*cs-1,width:cs*2,height:2});if(dx==-1)walls.push({x:p.x*cs,(c.y)*cs,width:2,height:cs*2});if(dy==-1)walls.push({x:(c.x)*cs,(p.y)*cs-1,width:cs*2,height:2});}
function draw(){ctx.fillStyle='#333';for(let y=0;y<h;y++)for(let x=0;x<w;x++){let c={x,x,y};if(walls.some(wall=>wall.x==c.x*cs+cs/2&&wall.y==c.y*cs+cs/2))ctx.fillRect(c.x*cs,c.y*cs,cs,cs);}}
function update(){const newCarved=carved;let c=current,p={x:stack[stack.length-1]},drawWalls=true;if(stack.length>0){if(getNeighbors(current).length>0){let n=getNeighbors()[Math.floor(Math.random()*getNeighbors().length)];path.push(current);current={x:n.x,y:n.y};addWalls(current,n);carved++;}else{c=stack.pop();drawWalls=false;}}ctx.fillStyle='#fff';if(drawWalls)for(let wall of walls) ctx.fillRect(wall.x,wall.y,wall.width,wall.height);if(c.x!=current.x||c.y!=current.y){let line=[[c.x,c.y,current.x,current.y]];line.forEach(([x1,y1,x2,y2])=>ctx.beginPath().moveTo(x1*cs+cs/2,y1*cs).lineTo(x2*cs+cs/2,y2*cs).stroke());}if(stack.length>0)ctx.fillStyle='#555';else ctx.fillStyle='#666';path.forEach(cell=>{if(path.indexOf(cell)==s-1)ctx.fillStyle='#f00';else if(path.indexOf(cell)<s-1)ctx.fillStyle='#888';ctx.fillRect(cell.x*cs,cell.y*cs,cs,cs);})}function animate(){draw();update();c.width=w*cs;c.height=h*cs;timer--;if(s===carved||timer<0){init();requestAnimationFrame(animate)}else requestAnimationFrame(animate);}
window.onload=init;animate();
</script>
</body></html>
```
gemma4:26bharness
No answer reached us (THIN) — and the reason lies with our setup, not with the model: reasoning consumed the entire token budget (3 min 28 s, zero characters of answer); larger budgets are refused by the gateway Counted as a did-not-finish, but it is not evidence about this model.
qwen3:14bERRBLANKLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Dynamic Maze Generator</title>
    <style>
        body { background: #1e1e1e; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: monospace; color: #ccc; }
        canvas { border: 2px solid #444; background: #fff; }
    </style>
</head>
<body>
    <canvas id="mazeCanvas" width="600" height="400"></canvas>

    <script>
        const canvas = document.getElementById('mazeCanvas');
        const ctx = canvas.getContext('2d');

        // Dimensions (Maze grid size, scaled for drawing)
        const COLS = 15; // Effective columns (30 cells / 2)
        const ROWS = 10; // Effective rows (20 cells / 2)
        const CELL_SIZE = 30; // Size of a single cell block

        let visited = [];
        let mazeState = [];
        let stack = [];
        let carvedCount = 0;
        let animationFrameId = null;

        // Initialize the grid state (walls and visitation)
        function initGrid() {
            visited = Array(ROWS).fill(0).map(() => Array(COLS).fill(false));
            mazeState = [];
            stack = [];
            carvedCount = 0;
            for (let r = 0; r < ROWS; r++) {
                mazeState[r] = [];
                for (let c = 0; c < COLS; c++) {
                    mazeState[r][c] = { visited: false, walls: [true, true, true, true] }; // [N, E, S, W]
                }
            }
        }

        // Recursive Backtracker implementation (DFS)
        function findPath(r, c) {
            if (r < 0 || r >= ROWS || c < 0 || c >= COLS || visited[r][c]) return;
            visited[r][c] = true;
            stack.push({ r, c });

            const directions = [
                [-1, 0], // North (N)
                [0, 1],  // East (E)
                [1, 0],  // South (S)
                [0, -1]  // West (W)
            ];
            directions.sort(() => Math.random() - 0.5);

            for (const [dr, dc] of directions) {
                const nr = r + dr;
                const nc = c + dc;
                if (!visited[nr][nc]) {
                    // Carve the wall between (r, c) and (nr, nc)
                    let wallIndex = 0;
                    if (dr === -1) { // Moving North: N wall of current cell (r,c) is removed
                        mazeState[r][c].walls[0] = false; 
                        mazeState[nr][nc].walls[2] = false; 
                    } else if (dc === 1) { // Moving East: E wall
                        mazeState[r][c].walls[1] = false;
                        mazeState[nr][nc].walls[3] = false;
                    } else if (dr === 1) { // Moving South: S wall
                        mazeState[r][c].walls[2] = false;
                        mazeState[nr][nc].walls[0] = false;
                    } else { // West: W wall
                        mazeState[r][c].walls[3] = false;
                        mazeState[nr][nc].walls[1] = false;
                    }

                    // Recursive call (simulating the carving)
                    findPath(nr, nc);
                }
            }
        }

        function drawMaze() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);
            const maxCarved = ROWS * COLS;

            // Draw all walls first (Static background)
            for (let r = 0; r < ROWS; r++) {
                for (let c = 0; c < COLS; c++) {
                    const x = c * CELL_SIZE;
                    const y = r * CELL_SIZE;

                    ctx.strokeStyle = '#444';
                    ctx.lineWidth = 2;

                    // North wall (Top boundary of cell)
                    if (mazeState[r][c].walls[0]) { ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + CELL_SIZE, y); ctx.stroke(); }
                    // East wall (Right boundary)
                    if (mazeState[r][c].walls[1]) { ctx.beginPath(); ctx.moveTo(x + CELL_SIZE, y); ctx.lineTo(x + CELL_SIZE, y + CELL_SIZE); ctx.stroke(); }
                    // South wall (Bottom boundary)
                    if (mazeState[r][c].walls[2]) { ctx.beginPath(); ctx.moveTo(x, y + CELL_SIZE); ctx.lineTo(x + CELL_SIZE, y + CELL_SIZE); ctx.stroke(); }
                    // West wall (Left boundary)
                    if (mazeState[r][c].walls[3]) { ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x, y + CELL_SIZE); ctx.stroke(); }
                }
            }

            // Draw visited path/stack trail
            ctx.fillStyle = 'rgba(100, 100, 255, 0.3)'; // Blueish semi-transparent fill
            for (let r = 0; r < ROWS; r++) {
                for (let c = 0; c < COLS; c++) {
                    if (visited[r][c]) {
                        ctx.fillRect(c * CELL_SIZE + 1, r * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
                    }
                }
            }

            // Draw current cell highlight (Last element of stack)
            if (stack.length > 0) {
                const { r: cr, c: cc } = stack[stack.length - 1];
                ctx.fillStyle = 'rgba(255, 255, 0, 0.4)'; // Yellow highlight
                ctx.fillRect(cc * CELL_SIZE + 1, cr * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
            }

            // Display Stats
            const stats = `Carved: ${carvedCount}/${ROWS * COLS} | Stack Depth: ${stack.length}`;
            ctx.fillStyle = '#ccc';
            ctx.font = '16px monospace';
            ctx.fillText(stats, 10, canvas.height - 10);
        }

        // Main Animation Loop
        function animate() {
            if (carvedCount < ROWS * COLS) {
                // If we carved a path successfully in the recursive step:
                drawMaze();
                animationFrameId = requestAnimationFrame(animate);
            } else {
                // Maze complete. Hold briefly, then restart.
                clearTimeout(window.restartTimer);
                if (animationFrameId) cancelAnimationFrame(animationFrameId);

                setTimeout(() => {
                    console.log("Maze finished. Restarting.");
                    initGrid();
                    findPath(0, 0); // Start carving the new maze
                    animate(); // Re-enter loop immediately
                }, 1500); // Hold for 1.5 seconds
            }
        }

        // Initial Setup and Start
        initGrid();
        findPath(0, 0);
        animate();
    </script>
</body>
</html>
```
mistral-small:24bOKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Maze Generator</title>
<style>
body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
canvas { border: 1px solid black; }
#info { position: absolute; top: 10px; left: 10px; color: white; background: rgba(0, 0, 0, 0.5); padding: 5px; font-size: 20px; }
</style>
</head>
<body>
<canvas id="mazeCanvas" width="600" height="400"></canvas>
<div id="info">Cells Carved: 0<br>Stack Depth: 0</div>
<script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');
const info = document.getElementById('info');
const width = 30, height = 20;
const cellSize = 20;
let cellsCarved = 0, stackDepth = 0;
canvas.width = width * cellSize;
canvas.height = height * cellSize;

function shuffle(array) {
    for (let i = array.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [array[i], array[j]] = [array[j], array[i]];
    }
}

function drawCell(x, y, color) {
    ctx.fillStyle = color;
    ctx.fillRect(x * cellSize, y * cellSize, cellSize, cellSize);
}

function drawPath(x, y, color) {
    ctx.strokeStyle = color;
    ctx.beginPath();
    ctx.moveTo((x + 0.5) * cellSize, (y + 0.5) * cellSize);
    ctx.lineTo((x + 1.5) * cellSize, (y + 0.5) * cellSize);
    ctx.stroke();
}

function drawGrid() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    for (let x = 0; x < width; x++) {
        for (let y = 0; y < height; y++) {
            drawCell(x, y, 'black');
        }
    }
}

function carveMaze(grid) {
    const directions = [[-1, 0], [1, 0], [0, -1], [0, 1]];
    shuffle(directions);
    let stack = [{ x: Math.floor(Math.random() * width), y: Math.floor(Math.random() * height) }];
    drawGrid();
    while (stack.length > 0) {
        const cell = stack[stack.length - 1];
        let unvisitedNeighbors = [];
        for (let dir of directions) {
            let nx = cell.x + dir[0] * 2;
            let ny = cell.y + dir[1] * 2;
            if (nx >= 0 && nx < width && ny >= 0 && ny < height && grid[ny][nx] === -1) {
                unvisitedNeighbors.push(dir);
            }
        }

        if (unvisitedNeighbors.length > 0) {
            const dir = unvisitedNeighbors[Math.floor(Math.random() * unvisitedNeighbors.length)];
            let nx = cell.x + dir[0] * 2;
            let ny = cell.y + dir[1] * 2;
            grid[ny][nx] = cellsCarved++;
            drawCell(cell.x, cell.y, 'yellow');
            drawPath(cell.x + dir[0], cell.y + dir[1], 'red');
        } else {
            stack.pop();
            stackDepth--;
        }

        if (stack.length > 0) {
            const nextCell = stack[stack.length - 1];
            drawCell(nextCell.x, nextCell.y, 'blue');
            stackDepth++;
        }
    }
}

function animateMaze() {
    let grid = Array.from({ length: height }, () => Array(width).fill(-1));
    carveMaze(grid);
    requestAnimationFrame(() => setTimeout(animateMaze, 5000));
}

requestAnimationFrame(animateMaze);

function updateInfo() {
    info.innerHTML = `Cells Carved: ${cellsCarved}<br>Stack Depth: ${stackDepth}`;
}
setInterval(updateInfo, 16);
</script>
</body>
</html>
```
llama3.1:8bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Maze Generator</title>
<style>
body {
  margin: 0;
}
canvas {
  display: block;
}
#stats {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  color: #fff;
}
</style>
</head>
<body>

<canvas id="maze"></canvas>
<div id="stats">carved: 0, depth: 0</div>

<script>
let canvas = document.getElementById('maze');
let ctx = canvas.getContext('2d');
canvas.width = 600;
canvas.height = 400;
ctx.fillStyle = '#fff';
ctx.fillRect(0, 0, canvas.width, canvas.height);

function random(x) {
  return Math.floor(Math.random() * x);
}

function recursiveBacktracker(w, h, x=0, y=0, depth=0) {
  let carved = document.getElementById('stats').children[0].textContent.split(', ')[0];
  let stackDepth = document.getElementById('stats').children[1].textContent;
  if (carved == w*h) return;
  
  ctx.fillStyle = '#000';
  ctx.fillRect(x * 20, y * 20, 20, 20);
  
  carved++;
  document.getElementById('stats').children[0].textContent = carved + ', ' + stackDepth;

  let directions = [[-1,0],[1,0],[0,-1],[0,1]];
  for (let dir of directions) {
    let nx = x + dir[0];
    let ny = y + dir[1];
    if (nx >= 0 && nx < w && ny >= 0 && ny < h && maze[nx][ny] == 1) {
      maze[nx][ny] = 0;
      
      ctx.fillStyle = '#f00';
      ctx.fillRect(nx * 20, ny * 20, 20, 20);
      
      stackDepth++;
      document.getElementById('stats').children[1].textContent = stackDepth;

      recursiveBacktracker(w, h, nx, ny, depth + 1);
    }
  }

  if (depth == 0) {
    setTimeout(() => {
      ctx.clearRect(0, 0, canvas.width, canvas.height);
      maze = Array.from({length: w}, () => new Array(h).fill(1));
      recursiveBacktracker(w, h);
    }, 1000);
  }
}

let w = 30;
let h = 20;
let maze = Array.from({length: w}, () => new Array(h).fill(1));

recursiveBacktracker(w, h);
setInterval(() => requestAnimationFrame(() => {}), 16);
</script>

</body>
</html>
```
qwen3.5:9bBLANKLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Maze Carving Animation</title>
    <style>body { background: #111; display: flex; flex-direction: column; align-items: center; font-family: sans-serif; color: white; } canvas { border: 2px solid #333; margin-bottom: 20px; }#stats { width: 600px; display: flex; justify-content: space-around; padding: 10px 0; background: #222;}
    </style>
</head>
<body>

<canvas id="mazeCanvas" width="600" height="400"></canvas>
<div id="stats"><div>Carved: <span id="carvedCount">0</span></div><div>Depth: <span id="stackDepth">1</span></div></div>

<script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');

const COLS = 30;
const ROWS = 20;
const CELL_SIZE = 20;
const WALL_COLOR = '#000';
const PATH_COLOR = '#555';
const CURRENT_COLOR = 'rgba(255, 255, 0, 0.8)';
const STACK_COLOR = 'rgba(0, 150, 200, 0.6)';

let mazeGrid;
let stack;
let carvedCount = 0;
let animationFrameId;

function initMaze() {
    mazeGrid = Array(COLS).fill(0).map(() => Array(ROWS).fill(false));
    stack = [];
    carvedCount = 0;
    document.getElementById('carvedCount').textContent = '0';
    document.getElementById('stackDepth').textContent = '1';

    // Start at a random point (or top-left for determinism)
    let startX = Math.floor(Math.random() * COLS);
    let startY = Math.floor(Math.random() * ROWS);

    // Reset canvas completely
    ctx.fillStyle = WALL_COLOR;
    ctx.fillRect(0, 0, canvas.width, canvas.height);

    // Mark start cell as visited and push to stack
    mazeGrid[startX][startY] = true;
    stack.push({x: startX, y: startY});
    
    animateStep();
}

function drawMaze() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    
    // Draw all permanent paths (already carved)
    for (let x = 0; x < COLS; x++) {
        for (let y = 0; y < ROWS; y++) {
            if (mazeGrid[x][y]) {
                ctx.fillStyle = PATH_COLOR;
                ctx.fillRect(x * CELL_SIZE + 1, y * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
            } else {
                 ctx.fillStyle = WALL_COLOR;
                 ctx.fillRect(x * CELL_SIZE + 1, y * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
            }
        }
    }

    // Draw stack path (secondary color)
    for (let i = 0; i < stack.length - 1; i++) {
        const p1 = stack[i];
        const p2 = stack[i+1];
         ctx.fillStyle = STACK_COLOR;
         ctx.fillRect(Math.min(p1.x, p2.x) * CELL_SIZE + 1, Math.min(p1.y, p2.y) * CELL_SIZE + 1, (Math.abs(p1.x - p2.x) + 1) * CELL_SIZE - 2, (Math.abs(p1.y - p2.y) + 1) * CELL_SIZE - 2);
    }

    // Draw current cell highlight
    const current = stack[stack.length - 1];
    ctx.fillStyle = CURRENT_COLOR;
    ctx.fillRect(current.x * CELL_SIZE + 1, current.y * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
}

function getNeighbors(x, y) {
    let neighbors = [];
    const directions = [[0, 1], [0, -1], [1, 0], [-1, 0]];
    for (const [dx, dy] of directions) {
        const nx = x + dx;
        const ny = y + dy;
        if (nx >= 0 && nx < COLS && ny >= 0 && ny < ROWS && !mazeGrid[nx][ny]) {
            neighbors.push({x: nx, y: ny});
        }
    }
    return neighbors;
}

function selectRandom(arr) {
    return arr[Math.floor(Math.random() * arr.length)];
}

function carveMazeStep() {
    let current = stack[stack.length - 1];
    if (!current) return false; // Should not happen if initialized correctly

    const unvisitedNeighbors = getNeighbors(current.x, current.y);
    const neighborsToVisit = [];

    // Shuffle and select the first few valid moves for animation control
    unvisitedNeighbors.sort(() => Math.random() - 0.5);
    
    if (neighborsToVisit.length === 0) return false; // Maze finished

    let nextCell = neighborsToVisit.shift();

    // Mark the current cell as visited *before* moving to simulate carving
    mazeGrid[current.x][current.y] = true; 

    // Move and carve
    const carvedX = nextCell.x;
    const carvedY = nextCell.y;

    mazeGrid[carvedX][carvedY] = true;
    stack.push(nextCell);
    carvedCount++;

    return { success: true, current: current, next: nextCell };
}

function animateStep() {
    if (stack.length > 1 && stack.length < COLS * ROWS) {
        const step = carveMazeStep();
        drawMaze();
        document.getElementById('carvedCount').textContent = carvedCount;
        document.getElementById('stackDepth').textContent = stack.length;

        animationFrameId = requestAnimationFrame(animateStep);
    } else if (stack.length >= COLS * ROWS) {
        // Maze complete logic
        drawMaze();
        const currentDepthDisplay = document.getElementById('stackDepth');
        currentDepthDisplay.textContent = stack.length;

        setTimeout(() => {
            alert("Maze Complete! Restarting...");
            initMaze(); // Restart the sequence immediately
        }, 1500);
    } else if (stack.length === 0) {
         // Safety break
    }
}

window.onload = initMaze;
</script>

</body>
</html>
```
qwen3-coder:30bERRSTATLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Animated Maze Generator</title>
    <style>body {background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: monospace; color: white;} canvas {border: 2px solid #aaa;}</style>
</head>
<body>
    <canvas id="mazeCanvas"></canvas>

    <script>
        const canvas = document.getElementById('mazeCanvas');
        const ctx = canvas.getContext('2d');

        // Dimensions (30 cells wide, 20 cells high)
        const COLS = 30;
        const ROWS = 20;
        const CELL_SIZE = 20;
        canvas.width = COLS * CELL_SIZE + CELL_SIZE / 2; // Account for outer walls/padding
        canvas.height = ROWS * CELL_SIZE + CELL_SIZE / 2;

        // State variables
        let mazeGrid = Array(ROWS).fill(0).map(() => Array(COLS).fill(false));
        let stack = [];
        let carvedCount = 0;
        let animationFrameId = null;
        let isRunning = true;

        const COLOR_WALL = '#444';
        const COLOR_PATH = '#1a1a1a';
        const COLOR_STACK = 'rgba(70, 70, 255, 0.8)'; // Semi-transparent blue for visited path
        const COLOR_CURRENT = 'yellow';

        function getNeighbors(r, c) {
            let neighbors = [];
            [[0, -1], [0, 1], [-1, 0], [1, 0]].forEach(([dr, dc]) => {
                const nr = r + dr;
                const nc = c + dc;
                if (nr >= 0 && nr < ROWS && nc >= 0 && nc < COLS && !mazeGrid[nr][nc]) {
                    neighbors.push({r: nr, c: nc});
                }
            });
            return neighbors;
        }

        function setVisited(r, c) {
            if (r >= 0 && r < ROWS && c >= 0 && c < COLS) {
                mazeGrid[r][c] = true;
            }
        }

        // Recursive Backtracker modified to be iterative/yield-like for animation
        function carve(r, c) {
            if (!isRunning) return Promise.resolve();

            stack.push({ r, c });
            setVisited(r, c);
            carvedCount++;

            let current = { r, c };

            // Draw the wall disappearing (the actual carving step)
            drawCarvingStep(current.r, current.c); 

            // Find unvisited neighbors
            let neighbors = getNeighbors(r, c);
            neighbors.sort(() => Math.random() - 0.5); // Random order

            for (const neighbor of neighbors) {
                if (!isRunning) return Promise.resolve();

                // Calculate the wall coordinates between current and neighbor
                const dr = current.r === neighbor.r ? 0 : Math.sign(neighbor.r - current.r);
                const dc = current.c === neighbor.c ? 0 : Math.sign(neighbor.c - current.c);

                // The wall is one cell away from the center of both cells
                let wallR = (current.r + neighbor.r) / 2;
                let wallC = (current.c + neighbor.c) / 2;

                // This function needs to simulate a recursive call that pauses for animation
                return new Promise(resolve => {
                    setTimeout(() => {
                        if (!isRunning) return resolve();
                        
                        // Draw the wall removal and path connection
                        drawWallRemoval(current.r, current.c, neighbor.r, neighbor.c);

                        carve(neighbor.r, neighbor.c).then(() => {
                            resolve();
                        });
                    }, 5); // Small delay for visibility
                });
            }
        }


        // --- Drawing Functions ---

        function drawRect(x, y, w, h, color) {
            ctx.fillStyle = color;
            ctx.fillRect(x + 1, y + 1, w - 1, h - 1); // Subtracting padding/border effect
        }

        function drawInitialMaze() {
            // Draw all cells as solid blocks (walls) initially
            for (let r = 0; r < ROWS; r++) {
                for (let c = 0; c < COLS; c++) {
                    drawRect(c * CELL_SIZE, r * CELL_SIZE, CELL_SIZE, CELL_SIZE, COLOR_WALL);
                }
            }
        }

        function drawCurrentHighlight(r, c) {
            // Highlight the current cell (where generation paused)
            ctx.fillStyle = 'rgba(255, 255, 0, 0.3)';
            const x = c * CELL_SIZE;
            const y = r * CELL_SIZE;
            ctx.fillRect(x + 1, y + 1, CELL_SIZE - 2, CELL_SIZE - 2);
        }

        function drawStackPath() {
            // Draw all previously visited cells (the stack path)
            let pathSurface = document.createElement('canvas');
            pathSurface.width = canvas.width;
            pathSurface.height = canvas.height;
            let pCtx = pathSurface.getContext('2d');
            pCtx.fillStyle = COLOR_STACK;
            
            for (let i = 0; i < stack.length - 1; i++) { // Don't draw the current cell as part of 'path' if we are carving it now
                const p = stack[i];
                pCtx.fillRect(p.c * CELL_SIZE + 1, p.r * CELL_SIZE + 1, CELL_SIZE - 2, CELL_SIZE - 2);
            }

            ctx.drawImage(pathSurface, 0, 0);
        }

        function drawCarvingStep(r, c) {
             // Draw the current cell as part of the path/visited set
            ctx.fillStyle = COLOR_STACK;
            const x = c * CELL_SIZE;
            const y = r * CELL_SIZE;
            ctx.fillRect(x + 1, y + 1, CELL_SIZE - 2, CELL_SIZE - 2);
        }

        function drawWallRemoval(r1, c1, r2, c2) {
            // Calculate the coordinates of the wall between (r1, c1) and (r2, c2)
            const pathX = Math.min(c1, c2) * CELL_SIZE + CELL_SIZE / 2;
            const pathY = Math.min(r1, r2) * CELL_SIZE + CELL_SIZE / 2;

            // If horizontal move (same row): wall is at the edge of the column index change
            if (r1 === r2) {
                // Wall coordinates are between c1 and c2
                const startCol = Math.min(c1, c2);
                const endCol = Math.max(c1, c2);
                const wallX = (startCol + 1) * CELL_SIZE - CELL_SIZE / 2;
                const wallY = r1 * CELL_SIZE + CELL_SIZE/2;
                ctx.fillStyle = '#333'; // Fading out the wall
                ctx.fillRect(wallX, wallY, (endCol - startCol) * CELL_SIZE, 1);

            // If vertical move (same column): wall is at the edge of the row index change
            } else {
                // Wall coordinates are between r1 and r2
                const startRow = Math.min(r1, r2);
                const endRow = Math.max(r1, r2);
                const wallX = c1 * CELL_SIZE + CELL_SIZE/2;
                const wallY = (startRow + 1) * CELL_SIZE - CELL_SIZE / 2;
                ctx.fillStyle = '#333'; // Fading out the wall
                ctx.fillRect(wallX, wallY, 1, (endRow - startRow) * CELL_SIZE);
            }
        }


        // --- Animation Loop and Control ---

        async function animate() {
            if (!isRunning || stack.length === 0 && carvedCount > 0) {
                clearInterval(animationFrameId);
                
                // Maze Complete Handling
                const display = document.getElementById('mazeCanvas');
                display.style.transition = 'opacity 1s';
                display.style.opacity = '0';

                setTimeout(() => {
                    console.log("Maze complete! Restarting...");
                    resetState();
                    animate(); // Loop automatically
                    display.style.opacity = '1';

                }, 1000);
                return;
            }

            // Clear canvas for the frame
            ctx.clearRect(0, 0, canvas.width, canvas.height);

            // Draw existing walls (base layer) and paths
            drawInitialMaze(); // Redraw initial state
            drawStackPath();   // Overwrite visited cells with path color
            
            const r = stack[stack.length - 1].r;
            const c = stack[stack.length - 1].c;

            // Draw the current cell highlight (before carving happens)
            drawCurrentHighlight(r, c);

            if (carvedCount < COLS * ROWS) {
                await carve(r, c); // This function handles drawing and recursion/delay
            }


            animationFrameId = requestAnimationFrame(animate);
        }

        function resetState() {
            mazeGrid.fill(false);
            stack = [];
            carvedCount = 0;
            document.getElementById('mazeCanvas').style.opacity = '1';
        }

        // Start the process immediately
        resetState();
        animate();

    </script>
</body>
</html>
```
qwen3:8bharness
No answer reached us (ERR) — and the reason lies with our setup, not with the model: reasoning consumed the entire token budget and the answer stayed empty; the gateway rejects budgets above 3000 tokens Counted as a did-not-finish, but it is not evidence about this model.
command-r:35bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Recursive Backtracker Maze</title>
    <style>
        body {
            margin: 0;
            background-color: #222;
            font-family: Arial, sans-serif;
            color: #fff;
        }
        canvas {
            display: block;
            border: 4px solid #666;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
            background-color: #eee;
        }
    </style>
</head>
<body>
    <canvas id="mazeCanvas"></canvas>
    <div class="info">Cells Carved: <span id="cellsCarved">0</span><br>Stack Depth: <span id="stackDepth">0</span></div>
    
    <script>
        const canvas = document.getElementById('mazeCanvas');
        const ctx = canvas.getContext('2d');
        let mazeWidth = 30;
        let mazeHeight = 20;
        let cellSize = Math.min(canvas.width / mazeWidth, canvas.height / mazeHeight);
        canvas.width = mazeWidth * cellSize;
        canvas.height = mazeHeight * cellSize;
        const grid = new Array(mazeHeight).fill(null).map(() => new Array(mazeWidth).fill('  '));
        let stack = [];
        let cellsCarved = 0;
        
        function draw() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);
    
            if (cellsCarved < mazeHeight * mazeWidth) {
                const [x, y] = stack[stack.length - 1];
                grid[y][x] = 'X';
                drawCell(x, y, true);
                
                let neighbors = [];
                if (grid[y + 1] && typeof grid[y + 1][x] !== 'string') neighbors.push([x, y + 1]); // Down
                if (grid[y - 1] && x < mazeWidth - 2) neighbors.push([x + 1, y - 1]); // Right
                if (grid[y] && typeof grid[y][x+1] !== 'string') neighbors.push([x + 1, y]); // Up
                if (grid[y-1] && x > 0) neighbors.push([x - 1, y]); // Left
                
                const choice = Math.floor(Math.random() * neighbors.length);
                grid[neighbors[choice][1]][neighbors[choice][0]] = ' ';
                drawCell(neighbors[choice][0], neighbors[choice][1], false);
    
                stack.push(neighbors[choice]);
                cellsCarved++;
            } else {
                setTimeout(() => {
                    mazeWidth = 30;
                    mazeHeight = 20;
                    cellSize = Math.min(canvas.width / mazeWidth, canvas.height / mazeHeight);
                    canvas.width = mazeWidth * cellSize;
                    canvas.height = mazeHeight * cellSize;
                    grid.length = mazeHeight;
                    for (let row of grid) {
                        row.length = mazeWidth;
                        row.fill('  ');
                    }
                    stack = [];
                    cellsCarved = 0;
                }, 250);
            }
            
            document.getElementById('cellsCarved').textContent = cellsCarved;
            document.getElementById('stackDepth').textContent = stack.length - 1;
                
            requestAnimationFrame(draw);
        }
        
        function drawCell(x, y, isCurrent) {
            ctx.fillStyle = isCurrent ? '#f00' : '#9bc';
            const w = cellSize * grid[y].join(' ').search(/\s+$/);
            for (let i=0;i<grid[y].length-w;i++) {
                if (grid[y][i] === ' ') return;
                ctx.fillRect(x*cellSize + i*cellSize, y*cellSize, cellSize, cellSize);
            }
        }
        
        draw();
    </script>
</body>
</html>
```
qwq:32bSTAT
Show code
<think>

Okay, I need to create an HTML file that generates a 30x20 maze using the recursive backtracker algorithm on a canvas. The user wants the maze to be carved one cell at a time, with visual feedback: highlighting the current cell, showing the stack path in another color, and the walls disappearing as they're carved. Also, after the maze is done, it should wait briefly and then restart. Plus, display the number of cells carved and the current stack depth. All using requestAnimationFrame for smooth animation, no user input, and no external libraries. And the HTML file must be self-contained, under 120 lines.

First, I need to structure the HTML. The canvas element will be the main component. The script will handle the maze generation with recursive backtracking. Let me think about the steps:

1. Set up the canvas and its context. The size should accommodate 30 columns and 20 rows. Maybe 600x400 pixels (each cell 20x20 pixels). Wait, 30x20 grid, so 30 cells in x and 20 in y. Let me see: 30 columns mean 600px width (each cell 20px), 20 rows mean 400px height. That seems manageable.

2. The maze generation algorithm. Recursive backtracking works by choosing a starting cell, then randomly visiting neighboring cells, carving paths between them, and using a stack to backtrack. Each step should be drawn on the canvas with animation. But since JavaScript is single-threaded, I need to use requestAnimationFrame to animate each step, without blocking the UI.

3. The maze data structure. Each cell needs to track visited status, walls (north, east, south, west), and maybe neighbors. The stack will hold the path of cells being processed.

4. Visual elements:
   - Current cell: highlighted (maybe in red).
   - Stack path: the cells in the stack (excluding the current) displayed in another color (like blue).
   - Walls: when carved, remove wall lines between cells.
   - Counters for cells carved and stack depth.

5. Animation: Each step of the algorithm must be drawn in a frame. Since recursive backtracking is a recursive function, but to make it work with requestAnimationFrame, I'll need to make it iterative or use async/await with promises. However, that might complicate the code. Alternatively, use a loop with a step function that processes one step each animation frame.

Wait, recursive functions can't be easily paused. So maybe implement the recursive backtracker iteratively. Let's think: the standard recursive approach is:

function backtrack(cell):
   mark cell as visited
   while there are unvisited neighbors:
      choose a random neighbor
      knock down wall between them
      backtrack(neighbor)

But to make this work with animation frames, I can represent this as a stack-based iteration. The stack holds the current path. Instead of recursion, I use a stack array where each entry is the current cell and its unprocessed neighbors. Each animation frame pops a cell, selects a neighbor (if any), processes it, and pushes the next steps.

Hmm, perhaps the iterative approach is better here. Let me structure the algorithm as:

Initialize the stack with the starting cell. Mark it as visited. Then, in each step:

- Current cell = top of stack.
- Check if it has any unvisited neighbors.
   - If yes, pick a random one, knock down the wall between, add to stack, and proceed.
   - If no, backtrack by popping the stack.

Each step would be one frame, allowing the animation to update.

6. For drawing:

- The canvas needs to redraw the maze each frame. But this might be slow if done naively. Alternatively, perhaps we can just draw the changes (only the current cell and the walls being carved). But maybe for simplicity, redraw everything each frame, but it's manageable with 30x20=600 cells. Let's see.

Each cell can be represented in an array. The maze grid can be a 2D array of objects with walls.

Wait, perhaps the grid can be stored as an array of cells, each with four walls (north, south, east, west). Or maybe it's easier to track walls between cells. Alternatively, for each cell, track which walls are present. For example, each cell has walls north, south, east, west. When moving to a neighbor, we can remove the wall between the current cell and the neighbor.

But to draw the maze, we have to loop through each cell and draw their walls. To optimize, maybe precompute which walls to draw, then draw all in one go.

But with animation, each step only modifies a few walls, but redrawing the entire maze each frame might be acceptable given the size.

Let me outline the steps in code:

First, the HTML structure:

- Doctype, html, head with title, body with canvas and a div for counters.

The script will handle:

- Canvas setup, context, initial variables.
- The maze grid (2D array).
- The stack for backtracking.
- Flags for if the maze is being built, if done, and then restart.

Variables needed:

- mazeWidth = 30, mazeHeight = 20
- cellSize = 20 (so canvas width 30*20, height 20*20)
- grid: 2D array of cells, each cell has visited, walls (as booleans for N, E, S, W?), and maybe neighbors.

Wait, perhaps each cell can be an object with visited, and walls as an array or object. Alternatively, to track visited and the walls, perhaps:

Each cell has:

visited: boolean

walls: array of four elements (N, E, S, W walls present). Or maybe 4 booleans.

Alternatively, for each cell, store the walls as bits, but that's more complicated.

Alternatively, for a cell at (x,y), the walls can be represented as:

northWall (top of the cell, so the same as the south wall of the cell above)

But perhaps it's easier to track each cell's own walls. For example, for a cell (x,y), walls.north is if there is a wall above it, walls.east is to the right, etc.

So, each cell can have an object like:

{
  visited: false,
  walls: { north: true, east: true, south: true, west: true }
}

Then, when moving from current cell to a neighbor, say right, we can set current cell's east wall to false, and neighbor's west wall to false.

So, to generate the maze:

Initialize all walls as present, then the algorithm proceeds.

The stack will hold the path. The stack could be an array of positions (x,y), or pointers to the cell objects.

Starting point: pick a random cell (or fixed, like 0,0). Let's start at (0,0).

Then, the algorithm steps:

- While stack is not empty:
   - currentCell = stack.pop()
   - (Wait, no, in iterative approach, maybe use a stack to track path, and check neighbors)
Alternatively, the standard iterative backtracking approach uses a stack where you push the current cell, then pick a neighbor, and when you backtrack, you go back.

Hmm, the iterative approach for recursive backtracking is:

Initialize stack with starting cell. Mark as visited. Then, while stack not empty:

current = stack[-1]
find an unvisited neighbor. If found:
   pick one, remove the wall between
deepseek-r1:32bBLANKLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html><body style="background:#333;display:flex;justify-content:center;align-items:center;height:100vh;margin:0">
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const CELL_SIZE = 20;
const MARGIN = 10;

// Initialize canvas
canvas.width = (30 * CELL_SIZE) + 2 * MARGIN;
canvas.height = (20 * CELL_SIZE) + 2 * MARGIN;

let stack = [];
let current;
let visited = [];
let wallsN = [];
let wallsE = [];
let wallsS = [];
let wallsW = [];

function initMaze() {
    stack.length=0; visited.length=0;
    for(let y=0;y<20;y++) {
        visited[y] = new Array(30).fill(false);
        wallsN[y] = new Array(30).fill(true);
        wallsE[y] = new Array(30).fill(true);
        wallsS[y] = new Array(30).fill(true);
        wallsW[y] = new Array(30).fill(true);
    }
    current = [Math.floor(Math.random()*30), Math.floor(Math.random()*20)];
    visited[current[1]][current[0]] = true;
    stack.push(current);
}

function carveMaze() {
    let dirs = [
        [0, -1], [1, 0], [0, 1], [-1, 0] // N,E,S,W
    ];
    dirs.sort(() => Math.random()-0.5); // Random order
    
    for(let d of dirs) {
        let nx = current[0]+d[0];
        let ny = current[1]+d[1];
        
        if(nx >=0 && nx <30 && ny >=0 && ny <20 && !visited[ny][nx]) {
            // Remove wall between cells
            if(d[0] == 1) wallsW[ny][nx] = false;
            else if(d[0] == -1) wallsE[ny][nx-1] = false;
            else if(d[1] == 1) wallsN[ny][nx] = false;
            else if(d[1] == -1) wallsS[ny][nx-1] = false;
            
            visited[ny][nx] = true;
            stack.push(current);
            current = [nx, ny];
            return true;
        }
    }
    
    if(stack.length > 0) {
        current = stack.pop();
        return true;
    }
    return false;
}

function drawMaze() {
    ctx.fillStyle='#1a1a1a';
    ctx.fillRect(0,0,canvas.width, canvas.height);
    
    // Draw grid
    for(let y=0;y<20;y++) {
        for(let x=0;x<30;x++) {
            let px = x*CELL_SIZE + MARGIN;
            let py = y*CELL_SIZE + MARGIN;
            
            if(wallsN[y][x]) ctx.fillRect(px, py-1, CELL_SIZE, 1);
            if(wallsE[y][x]) ctx.fillRect(px+CELL_SIZE-1, py, 1, CELL_SIZE);
            if(wallsS[y][x]) ctx.fillRect(px, py+CELL_SIZE-1, CELL_SIZE, 1);
            if(wallsW[y][x]) ctx.fillRect(px-1, py, 1, CELL_SIZE);
            
            // Highlight current cell
            ctx.fillStyle='#ff0000';
            if(current[0] == x && current[1] == y) {
                ctx.fillRect(px+2, py+2, CELL_SIZE-4, CELL_SIZE-4);
            }
        }
    }
    
    // Draw stack path
    ctx.strokeStyle = '#0000ff';
    ctx.lineWidth=2;
    let last = null;
    for(let c of stack) {
        if(last) {
            let x1 = (last[0]+0.5)*CELL_SIZE + MARGIN - CELL_SIZE/2;
            let y1 = (last[1]+0.5)*CELL_SIZE + MARGIN - CELL_SIZE/2;
            let x2 = (c[0]+0.5)*CELL_SIZE + MARGIN - CELL_SIZE/2;
            let y2 = (c[1]+0.5)*CELL_SIZE + MARGIN - CELL_SIZE/2;
            ctx.beginPath();
            ctx.moveTo(x1, y1);
            ctx.lineTo(x2, y2);
            ctx.stroke();
        }
        last = c;
    }
    
    // Stats
    ctx.fillStyle='#ffffff';
    ctx.font='14px monospace';
    let stats = `Carved: ${stack.length+1}/${30*20} | Depth: ${stack.length}`;
    ctx.fillText(stats, MARGIN, canvas.height - MARGIN);
}

function update() {
    if(carveMaze()) {
        requestAnimationFrame(update);
    } else {
        // Maze complete
        setTimeout(() => {
            initMaze();
            requestAnimationFrame(update);
        }, 2000);
    }
    drawMaze();
}

initMaze();
requestAnimationFrame(update);
</script
Outside the Brain cluster — same task, same character budget, collected through their own tooling (response times not comparable)
GPT-5.5 (Codex)frontier referenceOK
Show code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Maze Backtracker</title>
<style>
html,body{margin:0;height:100%;background:#101214;color:#e8ecef;font:16px system-ui,sans-serif;overflow:hidden}
body{display:grid;place-items:center}
#wrap{width:min(96vw,1200px)}
canvas{display:block;width:100%;height:auto;background:#171b20;border:1px solid #303842}
#hud{display:flex;gap:28px;padding:10px 2px 0;color:#c9d3dc}
b{color:#fff;font-variant-numeric:tabular-nums}
</style>
</head>
<body>
<div id="wrap">
<canvas id="c" width="1200" height="800"></canvas>
<div id="hud"><span>Cells carved: <b id="carved">0</b>/600</span><span>Stack depth: <b id="depth">0</b></span></div>
</div>
<script>
const W=30,H=20,N=W*H,cv=document.getElementById("c"),x=cv.getContext("2d"),cw=cv.width/W,ch=cv.height/H;
const carvedEl=document.getElementById("carved"),depthEl=document.getElementById("depth");
let cells,stack,cur,carved,doneAt,last;
function init(){
  cells=Array.from({length:N},()=>({v:0,w:[1,1,1,1]}));
  cur=(Math.random()*N)|0; cells[cur].v=1; stack=[cur]; carved=1; doneAt=0; last=0;
}
function step(){
  if(doneAt) return;
  let cx=cur%W,cy=(cur/W)|0,opts=[];
  if(cy>0&&!cells[cur-W].v)opts.push([cur-W,0,2]);
  if(cx<W-1&&!cells[cur+1].v)opts.push([cur+1,1,3]);
  if(cy<H-1&&!cells[cur+W].v)opts.push([cur+W,2,0]);
  if(cx>0&&!cells[cur-1].v)opts.push([cur-1,3,1]);
  if(opts.length){
    let [n,a,b]=opts[(Math.random()*opts.length)|0];
    cells[cur].w[a]=0; cells[n].w[b]=0; cur=n; cells[cur].v=1; stack.push(cur); carved++;
  }else{
    stack.pop(); cur=stack[stack.length-1]; if(!stack.length)doneAt=performance.now();
  }
}
function rect(i,color,p=0){
  let px=i%W*cw+p,py=((i/W)|0)*ch+p;
  x.fillStyle=color; x.fillRect(px,py,cw-p*2,ch-p*2);
}
function draw(){
  x.fillStyle="#15191f"; x.fillRect(0,0,cv.width,cv.height);
  for(let i=0;i<N;i++) if(cells[i].v) rect(i,"#202832",1);
  for(let i=0;i<stack.length;i++) rect(stack[i],`rgba(42,157,143,${.14+i/stack.length*.38})`,4);
  if(cur!=null) rect(cur,"#e9c46a",5);
  x.strokeStyle="#e8ecef"; x.lineWidth=2; x.beginPath();
  for(let i=0;i<N;i++){
    let px=i%W*cw,py=((i/W)|0)*ch,w=cells[i].w;
    if(w[0]){x.moveTo(px,py);x.lineTo(px+cw,py)}
    if(w[1]){x.moveTo(px+cw,py);x.lineTo(px+cw,py+ch)}
    if(w[2]){x.moveTo(px+cw,py+ch);x.lineTo(px,py+ch)}
    if(w[3]){x.moveTo(px,py+ch);x.lineTo(px,py)}
  }
  x.stroke();
  carvedEl.textContent=carved; depthEl.textContent=stack.length;
}
function frame(t){
  if(!last) last=t;
  let steps=Math.max(1,Math.min(4,((t-last)/24)|0)); last=t;
  while(steps--) step();
  draw();
  if(doneAt&&t-doneAt>1200) init();
  requestAnimationFrame(frame);
}
init(); requestAnimationFrame(frame);
</script>
</body>
</html>
Claude Sonnet 5frontier referenceOK
Show code
<!DOCTYPE html><html><head><meta charset="utf8"><title>Maze Backtracker</title><style>
body{margin:0;background:#111;color:#eee;font-family:monospace}canvas{display:block;margin:20px auto;background:#181818}
</style></head><body>
<canvas id="c" width="900" height="640"></canvas>
<script>
const cv=document.getElementById('c'),cx=cv.getContext('2d');
const W=30,H=20,cell=28,ox=15,oy=50;
let walls,visited,stack,carved,phase,pause,frame;
function key(x,y){return x+','+y}
function wkey(x1,y1,x2,y2){return x1<x2||(x1===x2&&y1<y2)?key(x1,y1)+'-'+key(x2,y2):key(x2,y2)+'-'+key(x1,y1)}
function reset(){
 walls={};visited={};
 for(let x=0;x<W;x++)for(let y=0;y<H;y++){
  if(x<W-1)walls[wkey(x,y,x+1,y)]=true;
  if(y<H-1)walls[wkey(x,y,x,y+1)]=true;
 }
 let sx=Math.floor(Math.random()*W),sy=Math.floor(Math.random()*H);
 visited[key(sx,sy)]=true;stack=[[sx,sy]];carved=1;phase='carve';pause=0;frame=0
}
function neighbors(x,y){
 let res=[];
 for(let[dx,dy]of[[1,0],[-1,0],[0,1],[0,-1]]){
  let nx=x+dx,ny=y+dy;
  if(nx>=0&&nx<W&&ny>=0&&ny<H&&!visited[key(nx,ny)])res.push([nx,ny]);
 }
 return res
}
function step(){
 if(stack.length===0){phase='done';pause=100;return}
 let[x,y]=stack[stack.length-1];
 let ns=neighbors(x,y);
 if(ns.length===0){stack.pop();return}
 let[nx,ny]=ns[Math.floor(Math.random()*ns.length)];
 delete walls[wkey(x,y,nx,ny)];
 visited[key(nx,ny)]=true;stack.push([nx,ny]);carved++
}
function draw(){
 cx.fillStyle='#181818';cx.fillRect(0,0,cv.width,cv.height);
 for(let x=0;x<W;x++)for(let y=0;y<H;y++){
  cx.fillStyle=visited[key(x,y)]?'#243':'#1c1c1c';
  cx.fillRect(ox+x*cell,oy+y*cell,cell,cell)
 }
 cx.strokeStyle='#556';cx.lineWidth=2;
 for(let x=0;x<W;x++)for(let y=0;y<H;y++){
  if(x<W-1&&walls[wkey(x,y,x+1,y)]){cx.beginPath();cx.moveTo(ox+(x+1)*cell,oy+y*cell);cx.lineTo(ox+(x+1)*cell,oy+(y+1)*cell);cx.stroke()}
  if(y<H-1&&walls[wkey(x,y,x,y+1)]){cx.beginPath();cx.moveTo(ox+x*cell,oy+(y+1)*cell);cx.lineTo(ox+(x+1)*cell,oy+(y+1)*cell);cx.stroke()}
 }
 cx.strokeStyle='#556';cx.strokeRect(ox,oy,W*cell,H*cell);
 cx.fillStyle='rgba(255,180,0,0.35)';
 for(let[x,y]of stack)cx.fillRect(ox+x*cell+2,oy+y*cell+2,cell-4,cell-4);
 if(stack.length){
  let[cxp,cyp]=stack[stack.length-1];
  cx.fillStyle='#f33';cx.fillRect(ox+cxp*cell+4,oy+cyp*cell+4,cell-8,cell-8)
 }
 cx.fillStyle='#fff';cx.font='18px monospace';cx.textAlign='left';
 cx.fillText('Cells carved: '+carved+'/'+(W*H)+'   Stack depth: '+stack.length,20,25);
 if(phase==='done')cx.fillText('Maze complete',500,25);
}
function loop(){
 frame++;
 if(phase==='carve'){if(frame%2===0)step()}
 else if(phase==='done'){pause--;if(pause<=0)reset()}
 draw();
 requestAnimationFrame(loop)
}
reset();loop();
</script></body></html>
Claude Haiku 4.5frontier referenceSTAT
Show code
<!DOCTYPE html><html><head><title>r72</title></head><body><canvas id="c"></canvas><script>
let c=document.getElementById('c'),x=c.getContext('2d');c.width=800;c.height=600;
let W=30,H=20,m=Array(H).fill(0).map(()=>Array(W).fill(1));
let st=[],cur={x:0,y:0},vis=new Set(),cv=0,sd=0;
function ca(){
  st=[];cur={x:0,y:0};vis=new Set();cv=0;sd=0;
  m=Array(H).fill(0).map(()=>Array(W).fill(1));
}
function step(){
  if(!cur){ca();return;}
  let k=cur.x+","+cur.y;if(!vis.has(k)){vis.add(k);cv++;m[cur.y][cur.x]=0;}
  let dirs=[[2,0],[0,2],[-2,0],[0,-2]].sort(()=>Math.random()-0.5);
  let found=false;
  for(let[dx,dy]of dirs){
    let nx=cur.x+dx,ny=cur.y+dy;
    if(nx>0&&nx<W&&ny>0&&ny<H&&!vis.has(nx+","+ny)){
      m[cur.y+dy/2][cur.x+dx/2]=0;st.push(cur);cur={x:nx,y:ny};sd=st.length;found=true;break;
    }
  }
  if(!found&&st.length){cur=st.pop();sd=st.length;}
  else if(!found){if(cv<W*H-1)setTimeout(()=>ca(),200);cur=null;}
}
function draw(){
  x.fillStyle="#fff";x.fillRect(0,0,800,600);
  let s=Math.floor(400/W);
  // Maze
  for(let i=0;i<H;i++)for(let j=0;j<W;j++){
    if(m[i][j]){x.fillStyle="#333";x.fillRect(j*s,i*s,s,s);}
    else{x.fillStyle="#fff";x.fillRect(j*s,i*s,s,s);}
  }
  // Stack path
  if(st.length){x.strokeStyle="#f0f";x.lineWidth=2;x.beginPath();
    st.forEach((p,i)=>{if(i===0)x.moveTo(p.x*s+s/2,p.y*s+s/2);else x.lineTo(p.x*s+s/2,p.y*s+s/2);});
    x.stroke();
  }
  // Current
  if(cur){x.fillStyle="#f00";x.fillRect(cur.x*s+2,cur.y*s+2,s-4,s-4);}
  step();
  x.fillStyle="#000";x.font="14px mono";x.fillText("Carved:"+cv+" Depth:"+sd,500,50);
  requestAnimationFrame(draw);
}draw();
</script></body></html>
Results at a glance— every model in this round with score, response time and status.

Who wrote what

ModelBlind scoreLatencyStatus
deepseek-r1:14b —74.9 sOK
gemma4:26b ——harness
qwen3:14b —29.1 sOK
mistral-small:24b —121.4 sOK
llama3.1:8b —121.6 sOK
qwen3.5:9b —53.4 sOK
qwen3-coder:30b —34.7 sOK
qwen3:8b ——harness
command-r:35b —134.5 sOK
qwq:32b —119.5 sOK
deepseek-r1:32b —120.9 sOK

Frontier reference — outside the blind field

These models answered the identical prompt outside the blind field. They are deliberately not scored and not part of the blind comparison — they are there so you can see where a frontier model lands on the same task.

Collected differently from the blind field: the local models run through a plain API harness, the frontier references through a context-free agent, one shot, no retries. Response times are therefore not comparable and are not shown. On two English tasks the reference answer came back in German — an artefact of that harness, flagged on the affected rounds.
Claude Opus 5frontier reference
Show code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Recursive Backtracker Maze</title>
<style>
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;
background:radial-gradient(circle at 50% 0%,#141c33,#070a12 70%);color:#c8d4f0;font:14px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
h1{margin:0;font-size:13px;font-weight:600;letter-spacing:.28em;text-transform:uppercase;color:#6f7fa8}
canvas{border-radius:10px;background:#0b0f1a;box-shadow:0 0 0 1px #1e2a47,0 24px 60px -20px #000;max-width:96vw;height:auto}
#hud{display:flex;gap:28px;font-variant-numeric:tabular-nums}
#hud b{display:block;font-size:20px;font-weight:600;color:#e8f0ff}
#hud span{font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:#63719a}
</style>
</head>
<body>
<h1>Recursive Backtracker</h1>
<canvas id="c"></canvas>
<div id="hud">
<div><b id="s1">0</b><span>cells carved</span></div>
<div><b id="s2">0</b><span>stack depth</span></div>
<div><b id="s3">-</b><span>state</span></div>
</div>
<script>
const COLS=30,ROWS=20,CS=26,W=COLS*CS,H=ROWS*CS,DPR=Math.min(devicePixelRatio||1,2);
const cv=document.getElementById('c'),g=cv.getContext('2d');
cv.width=W*DPR;cv.height=H*DPR;cv.style.width=W+'px';cv.style.height=H+'px';g.scale(DPR,DPR);
const D=[[0,-1,1,4],[1,0,2,8],[0,1,4,1],[-1,0,8,2]];
const s1=document.getElementById('s1'),s2=document.getElementById('s2'),s3=document.getElementById('s3');
let wall,seen,onStack,stack,carved,done,holdUntil,acc=0,last=0;
function reset(){
  wall=new Uint8Array(COLS*ROWS).fill(15);seen=new Uint8Array(COLS*ROWS);onStack=new Uint8Array(COLS*ROWS);
  const s=(Math.random()*COLS|0)+(Math.random()*ROWS|0)*COLS;
  seen[s]=1;onStack[s]=1;stack=[s];carved=1;done=false;holdUntil=0;
}
function step(){
  if(done)return;
  const i=stack[stack.length-1],x=i%COLS,y=i/COLS|0,opts=[];
  for(let d=0;d<4;d++){const nx=x+D[d][0],ny=y+D[d][1];
    if(nx>=0&&ny>=0&&nx<COLS&&ny<ROWS&&!seen[nx+ny*COLS])opts.push(d);}
  if(opts.length){
    const d=opts[Math.random()*opts.length|0],j=(x+D[d][0])+(y+D[d][1])*COLS;
    wall[i]&=~D[d][2];wall[j]&=~D[d][3];
    seen[j]=1;onStack[j]=1;stack.push(j);carved++;
  }else{onStack[i]=0;stack.pop();if(!stack.length){done=true;holdUntil=performance.now()+1300;}}
}
function draw(t){
  g.clearRect(0,0,W,H);
  for(let i=0;i<COLS*ROWS;i++){
    if(!seen[i])continue;
    const x=(i%COLS)*CS,y=(i/COLS|0)*CS;
    g.fillStyle=onStack[i]?'#2b2160':'#131c33';
    g.fillRect(x+1,y+1,CS-2,CS-2);
  }
  g.lineWidth=1;g.strokeStyle='#7c5cff88';g.beginPath();
  for(let k=0;k<stack.length-1;k++){
    const a=stack[k],b=stack[k+1];
    if(k===0)g.moveTo((a%COLS)*CS+CS/2,(a/COLS|0)*CS+CS/2);
    g.lineTo((b%COLS)*CS+CS/2,(b/COLS|0)*CS+CS/2);
  }
  g.stroke();
  if(stack.length){
    const i=stack[stack.length-1],x=(i%COLS)*CS,y=(i/COLS|0)*CS,p=.6+.4*Math.sin(t/140);
    g.save();g.shadowBlur=16;g.shadowColor='#22d3ee';
    g.fillStyle='rgba(34,211,238,'+p.toFixed(2)+')';g.fillRect(x+3,y+3,CS-6,CS-6);g.restore();
  }
  g.strokeStyle=done?'#4d6ea8':'#38507f';g.lineWidth=2;g.lineCap='square';g.beginPath();
  for(let i=0;i<COLS*ROWS;i++){
    const x=(i%COLS)*CS,y=(i/COLS|0)*CS,w=wall[i];
    if(w&1){g.moveTo(x,y);g.lineTo(x+CS,y);}
    if(w&8){g.moveTo(x,y);g.lineTo(x,y+CS);}
    if(i%COLS===COLS-1&&w&2){g.moveTo(x+CS,y);g.lineTo(x+CS,y+CS);}
    if((i/COLS|0)===ROWS-1&&w&4){g.moveTo(x,y+CS);g.lineTo(x+CS,y+CS);}
  }
  g.stroke();
  s1.textContent=carved;s2.textContent=stack.length;
  s3.textContent=done?'complete':'carving';
  s3.style.color=done?'#4ade80':'#e8f0ff';
}
function loop(t){
  if(!last)last=t;
  const dt=Math.min(t-last,120);last=t;
  if(done){if(t>holdUntil){reset();acc=0;}}
  else{acc+=dt;while(acc>=16&&!done){step();acc-=16;}}
  draw(t);
  requestAnimationFrame(loop);
}
reset();requestAnimationFrame(loop);
</script>
</body>
</html>