Overview › Code › R79
Code · blind round

R79 · Aggregation on a lattice

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 simulates diffusion-limited aggregation on a 200x150 CELL GRID drawn on a <canvas>. A seed cell sits in the middle; random walkers step one cell at a time in the four grid directions and freeze permanently when they touch the cluster, growing a branching structure. Work strictly cell by cell — no floating-point positions. Show the number of frozen cells and the cluster radius. 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)
mistral-small:24bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Diffusion-Limited Aggregation</title>
<style>
  body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f0f0f0; }
  canvas { border: 1px solid black; }
</style>
</head>
<body>
<canvas id="dlaCanvas" width="400" height="300"></canvas>
<script>
const canvas = document.getElementById('dlaCanvas');
const ctx = canvas.getContext('2d');
const gridSize = 20;
const cols = 200 / gridSize;
const rows = 150 / gridSize;
const seedX = Math.floor(cols / 2);
const seedY = Math.floor(rows / 2);

let cluster = new Array(rows).fill().map(() => new Array(cols).fill(0));
cluster[seedY][seedX] = 1;

let frozenCount = 1;
const directions = [[-1, 0], [1, 0], [0, -1], [0, 1]];
let radius = Math.max(seedX, seedY);

function drawCluster() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    for (let y = 0; y < rows; y++) {
        for (let x = 0; x < cols; x++) {
            if (cluster[y][x] === 1) {
                ctx.fillStyle = 'black';
                ctx.fillRect(x * gridSize, y * gridSize, gridSize, gridSize);
            }
        }
    }
}

function simulateDLA() {
    let x = Math.floor(cols / 2);
    let y = Math.floor(rows / 2);

    while (true) {
        const direction = directions[Math.floor(Math.random() * 4)];
        x += direction[0];
        y += direction[1];

        if (x < 0 || x >= cols || y < 0 || y >= rows || cluster[y][x] === 1) {
            x -= direction[0];
            y -= direction[1];
            break;
        }
    }

    const startX = Math.floor(x + cols / 2);
    const startY = Math.floor(y + rows / 2);

    let distance = 0;

    while (true) {
        if (startX < 0 || startX >= cols || startY < 0 || startY >= rows || cluster[startY][startX] === 1) break;
        const direction = directions[Math.floor(Math.random() * 4)];
        distance++;
        startX += direction[0];
        startY += direction[1];

        if (distance > 500) {
            cluster[y][x] = 1;
            frozenCount++;
            radius = Math.max(radius, x, y);
            drawCluster();
            return;
        }
    }

    requestAnimationFrame(simulateDLA);
}

function updateStats() {
    document.title = `Frozen Cells: ${frozenCount}, Radius: ${radius}`;
    drawCluster();
    requestAnimationFrame(updateStats);
}

drawCluster();
simulateDLA();
updateStats();
</script>
</body>
</html>
```
deepseek-r1:14bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#000;">
<canvas id=c width=200 height=150></canvas>
<div id=o style="position:absolute;top:10px;left:10px;color:white;font-family:monospace;"></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=200,h=150;let grid=[],frozen=[],currentWalker=null,count=0,radius=0;
class Walker{constructor(){this.x=Math.floor(w/2);this.y=Math.floor(h/2);this.path=[]}
move(){if(this.path.length>400&&!grid.includes(this.path[this.path.length-1])){const dir=[[0,1],[0,-1],[1,0],[-1,0]][Math.random()*4|0];let x=this.x+dir[0],y=this.y+dir[1];if(x<0||x>=w||y<0||y>=h)return false;if(!frozen.some(p=>p.x==x&p.y==y)){this.x=x;this.y=y;if(frozen.some(p=>p.x==this.x&p.y==this.y))return this.freeze()}}}freeze(){frozen.push({x:this.x,y:this.y});grid.push(this.x+h*this.y);count++;radius=Math.sqrt((this.x - w/2)**2 + (this.y - h/2)**2)/Math.SQRT1_2;currentWalker=null;if(count>200){location.reload()}}
}

function checkCell(x,y){return x>=0&&x<w&&y>=0&&y<h&&!frozen.some(p=>p.x==x&p.y==y)}
function draw(){ctx.clearRect(0,0,w,h);for(let i=0;i<w*h;i++){const x=i%w,y=Math.floor(i/w);if(grid.includes(i))ctx.fillStyle='#f00';else ctx.fillStyle='#fff';ctx.fillRect(x*1,y*1,1,1)}}}

grid.push(w/2 + h/2*(w%2==0?h-1:0));frozen=[{x:w/2,y:h/2}];currentWalker=new Walker();
function animate(){if(currentWalker&&checkCell(currentWalker.x,currentWalker.y)){currentWalker.move();return requestAnimationFrame(animate)}draw();document.getElementById('o').textContent=`Frozen cells: ${count}\nRadius (approx): ${radius.toFixed(1)}`;if(count<200){currentWalker=new Walker()}else{location.reload()}}
animate();
</script>
</body></html>
```
llama3.1:8bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>DLA Simulation</title>
</head>
<body>
  <canvas id="canvas" width="200" height="150"></canvas>
  <script>
    const canvas = document.getElementById('canvas');
    const ctx = canvas.getContext('2d');

    let grid = new Array(200);
    for (let i = 0; i < 200; i++) {
      grid[i] = new Array(150).fill(false);
    }

    let walkers = [];
    let clusterRadius = 0;
    let frozenCells = 0;

    const xCenter = Math.floor(grid.length / 2);
    const yCenter = Math.floor(grid[0].length / 2);
    grid[xCenter][yCenter] = true;

    function randomDir() {
      return Math.random() < 0.25 ? -1 : (Math.random() < 0.5 ? 0 : 1);
    }

    function stepWalker(walker) {
      const newX = walker[0] + randomDir();
      const newY = walker[1] + randomDir();

      if (newX >= 0 && newX < grid.length && newY >= 0 && newY < grid[0].length && !grid[newX][newY]) {
        grid[newX][newY] = true;
        clusterRadius = Math.max(clusterRadius, Math.sqrt(Math.pow(newX - xCenter, 2) + Math.pow(newY - yCenter, 2)));
        walkers.push([newX, newY]);
      } else if (grid[newX][newY]) {
        frozenCells++;
      }

      walker[0] += randomDir();
      walker[1] += randomDir();
    }

    function draw() {
      ctx.clearRect(0, 0, canvas.width, canvas.height);
      for (let i = 0; i < grid.length; i++) {
        for (let j = 0; j < grid[i].length; j++) {
          if (grid[i][j]) {
            ctx.fillStyle = 'black';
            ctx.fillRect(i * 1, j * 1, 1, 1);
          }
        }
      }

      document.getElementById('cluster-radius').textContent = `Cluster Radius: ${clusterRadius}`;
      document.getElementById('frozen-cells').textContent = `Frozen Cells: ${frozenCells}`;

      for (const walker of walkers) {
        stepWalker(walker);
      }
    }

    function animate() {
      draw();
      if (!walkers.length) {
        grid.forEach(row => row.fill(false));
        walkers = [];
        frozenCells = 0;
        clusterRadius = 0;
        grid[xCenter][yCenter] = true;
      } else {
        requestAnimationFrame(animate);
      }
    }

    animate();
  </script>
  <div id="cluster-radius"></div>
  <div id="frozen-cells"></div>
</body>
</html>
```
qwen3-coder:30bBLANKLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DLA Simulation</title>
    <style>body {background: #111; margin: 0;} canvas {display: block;}</style>
</head>
<body>
    <canvas id="dlaCanvas"></canvas>
    <script>
        const canvas = document.getElementById('dlaCanvas');
        const ctx = canvas.getContext('2d');

        let COLS = 200;
        let ROWS = 150;
        let CELL_SIZE = 3; // Pixels per cell
        canvas.width = COLS * CELL_SIZE;
        canvas.height = ROWS * CELL_SIZE;

        let grid = Array(ROWS).fill(0).map(() => Array(COLS).fill(false));
        let cluster = new Set();
        let seedX = Math.floor(COLS / 2);
        let seedY = Math.floor(ROWS / 2);
        let isRunning = true;

        function draw() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);
            for (const key of cluster) {
                const [y, x] = key.split(',').map(Number);
                ctx.fillStyle = '#3A6EA5';
                ctx.fillRect(x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE - 1, CELL_SIZE - 1);
            }
        }

        function initialize() {
            grid = Array(ROWS).fill(0).map(() => Array(COLS).fill(false));
            cluster.clear();
            seedX = Math.floor(COLS / 2);
            seedY = Math.floor(ROWS / 2);

            // Place seed
            if (!grid[seedY][seedX]) {
                grid[seedY][seedX] = true;
                cluster.add(`${seedY},${seedX}`);
            }

            draw();
        }

        function getNeighbors(x, y) {
            const dirs = [[0, 1], [0, -1], [1, 0], [-1, 0]];
            let available = [];
            for (const [dy, dx] of dirs) {
                const nx = x + dx;
                const ny = y + dy;

                if (nx >= 0 && nx < COLS && ny >= 0 && ny < ROWS && !grid[ny][nx]) {
                    available.push({x: nx, y: ny});
                }
            }
            return available;
        }
        
        function runWalker() {
            if (!isRunning) return;

            const [currY, currX] = ['',''].map(c => Math.random() * (COLS - 1)); // Start near center for simplicity if seed fails
            let x = Math.floor((seedX + Math.random() * 50 - 25) / 2);
            let y = Math.floor((seedY + Math.random() * 50 - 25) / 2);

            // Ensure walker starts adjacent to the cluster
            while (Math.abs(x - seedX) > 10 || Math.abs(y - seedY) > 10) {
                if (x < 0 || x >= COLS || y < 0 || y >= ROWS) break;
                // Simple random walk movement until near cluster area
                const dx = Math.floor(Math.random() * 3) - 1;
                const dy = Math.floor(Math.random() * 3) - 1;
                x += dx; y += dy;
            }

            let currentX = x > 0 && x < COLS - 1 ? Math.min(Math.max(x, 1), COLS - 2) : seedX + Math.floor(Math.random() * 5);
            let currentY = y > 0 && y < ROWS - 1 ? Math.min(Math.max(y, 1), ROWS - 2) : seedY;


            const MAX_WALK_STEPS = 1000;
            let steps = 0;

            while (steps < MAX_WALK_STEPS && !isRunning) {
                if (!getNeighbors(currentX, currentY).length) break;
                
                // Random step attempt
                const potentialSteps = getNeighbors(currentX, currentY);
                if (potentialSteps.length === 0) break;

                let nextStep = potentialSteps[Math.floor(Math.random() * potentialSteps.length)];
                currentX = nextStep.x;
                currentY = nextStep.y;
                steps++;
            }


            // Try to connect/freeze the walker
            let frozen = false;
            for (let i = 0; i < 50 && !frozen; i++) { // Limited attempts to find attachment point
                const potentialSteps = getNeighbors(currentX, currentY);
                if (potentialSteps.length === 0) break;

                // Check if any neighbor is adjacent to the cluster boundary
                for (let j = 0; j < potentialSteps.length; j++) {
                    const nx = potentialSteps[j].x;
                    const ny = potentialSteps[j].y;
                    
                    // Heuristic check: Is this spot adjacent to an occupied cell?
                    if (!grid[ny][nx]) { 
                        let isNearCluster = false;
                        for (const key of cluster) {
                            const [cy, cx] = key.split(',').map(Number);
                            // Check if the neighbor's neighbors include (nx, ny) or vice versa
                            if ((Math.abs(ny - cy) <= 1 && Math.abs(nx - cx) <= 1) && !(nx == cx && ny == cy)) {
                                isNearCluster = true;
                                break;
                            }
                        }

                        if (isNearCluster) {
                            // Found attachment point! Freeze here.
                            grid[ny][nx] = true;
                            cluster.add(`${ny},${nx}`);
                            frozen = true;
                            break; 
                        }
                    }
                }
            }
        }

        function loop() {
            draw();
            if (Math.random() < 0.1) { // Throttle simulation speed slightly
                runWalker();
            }

            // Termination condition: If cluster size is too large, or if no growth for a long time (simplified check)
            if (cluster.size > COLS * ROWS * 0.8 || !isRunning) {
                 // Simulate completion and restart after delay
                setInterval(() => {
                    initialize();
                    requestAnimationFrame(loop);
                }, 1500);
                return;
            }

            requestAnimationFrame(loop);
        }

        window.onload = () => {
            initialize();
            loop();
        };
    </script>
</body>
</html>
```
qwen3:14bBLANK
Show code
<!DOCTYPE html>
<html><head><title>DLA</title></head><style>body{background:#111;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;font-family:monospace;}canvas{border:1px solid #333;}</style><body><canvas id="dlaCanvas" width="400" height="300"></canvas><script>
const canvas = document.getElementById('dlaCanvas');
const ctx = canvas.getContext('2d');

let GRID_W = 200;
let GRID_H = 150;
let CELL_SIZE = 2; // Adjusted for visible detail on a smaller canvas
let grid;
let clusterSize = 0;
let walkerSteps = 0;
let animationFrameId = null;

function initialize() {
    grid = Array(GRID_H).fill(0).map(() => Array(GRID_W).fill(false));
    clusterSize = 0;
    walkerSteps = 0;
    ctx.clearRect(0, 0, canvas.width, canvas.height);

    // Seed the starting cell (center)
    const startX = Math.floor((GRID_W - 1) / 2);
    const startY = Math.floor((GRID_H - 1) / 2);
    grid[startY][startX] = true;
    clusterSize = 1;

    // Draw initial cluster (seed)
    draw();
}

function draw() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    for (let y = 0; y < GRID_H; y++) {
        for (let x = 0; x < GRID_W; x++) {
            if (grid[y][x]) {
                ctx.fillStyle = '#0099ff'; // Blue for cluster
                ctx.fillRect(x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE);
            } else {
                ctx.fillStyle = '#1a1a1a'; // Background/Empty space
                ctx.fillRect(x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE);
            }
        }
    }
}

function isBlocked(y, x) {
    return y < 0 || y >= GRID_H || x < 0 || x >= GRID_W || grid[y][x];
}

function walk(startX, startY) {
    let currentX = startX;
    let currentY = startY;
    let path = [];

    while (!isBlocked(currentY, currentX)) {
        // Random move (0: N, 1: E, 2: S, 3: W)
        const direction = Math.floor(Math.random() * 4);
        let nextX = currentX;
        let nextY = currentY;

        if (direction === 0) nextY--; // North
        else if (direction === 1) nextX++;  // East
        else if (direction === 2) nextY++; // South
        else nextX--; // West

        currentX = Math.min(Math.max(nextX, 0), GRID_W - 1);
        currentY = Math.min(Math.max(nextY, 0), GRID_H - 1);
        
        if (isBlocked(currentY, currentX)) {
            break; // Hit the cluster boundary
        }

        path.push({x: currentX, y: currentY});
    }
    return path;
}

function processPath(path) {
    let newCells = 0;
    for (const cell of path) {
        if (!grid[cell.y][cell.x]) {
            grid[cell.y][cell.x] = true;
            newCells++;
        }
    }
    clusterSize += newCells;
}

function animate() {
    if (walkerSteps >= 50 && clusterSize > GRID_W * GRID_H * 0.9) {
        // Simulation near completion, stop and restart
        cancelAnimationFrame(animationFrameId);
        setTimeout(() => {
            initialize();
            animate(); // Restart the loop
        }, 100);
        return;
    }

    if (walkerSteps >= 50 && clusterSize > GRID_W * GRID_H * 0.9) return;


    const startX = Math.floor((GRID_W - 1) / 2);
    const startY = Math.floor((GRID_H - 1) / 2);

    // Run a walker and process its path
    const path = walk(startX, startY);
    processPath(path);

    draw();
    walkerSteps++;
}

window.onload = () => {
    initialize();
    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.
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.5:9bSTATLIM
Show code
<!DOCTYPE html>
<html><head><title>DLA Simulation</title></head><body style="margin:0;overflow:hidden;"><canvas id="dlaCanvas" width="400" height="300"></canvas><script>
const canvas = document.getElementById('dlaCanvas');
const ctx = canvas.getContext('2d');
let GRID_W = 200;
let GRID_H = 150;
let CELL_SIZE = 2;

let grid, clusterSize;
let seedX, seedY;

function initialize() {
    grid = Array(GRID_H).fill(0).map(() => Array(GRID_W).fill(0));
    clusterSize = 1;
    seedX = Math.floor(GRID_W / 2);
    seedY = Math.floor(GRID_H / 2);

    // Set the seed cell (value 1)
    grid[seedY][seedX] = 1;
}

function draw() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    for (let y = 0; y < GRID_H; y++) {
        for (let x = 0; x < GRID_W; x++) {
            if (grid[y][x] === 1) {
                ctx.fillStyle = 'rgba(0, 150, 255, 0.8)';
                ctx.fillRect(x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE);
            } else {
                ctx.fillStyle = '#eee';
                ctx.fillRect(x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE);
            }
        }
    }

    // Display stats
    ctx.fillStyle = 'black';
    ctx.font = '14px Arial';
    let status = `Frozen Cells: ${clusterSize}. Radius: ${Math.round(Math.sqrt(Math.pow(seedX - GRID_W/2, 2) + Math.pow(seedY - GRID_H/2, 2)))}`;
    ctx.fillText(status, 10, 20);
}

function findPerimeter() {
    let perimeter = [];
    for (let y = 0; y < GRID_H; y++) {
        for (let x = 0; x < GRID_W; x++) {
            if (grid[y][x] === 1) {
                const neighbors = [[0, 1], [0, -1], [1, 0], [-1, 0]];
                for (const [dy, dx] of neighbors) {
                    const ny = y + dy;
                    const nx = x + dx;
                    if (ny >= 0 && ny < GRID_H && nx >= 0 && nx < GRID_W && grid[ny][nx] === 0) {
                        perimeter.push({x: nx, y: ny});
                    }
                }
            }
        }
    }
    return perimeter;
}

function step() {
    let potentialSteps = findPerimeter();
    if (potentialSteps.length === 0 || clusterSize >= GRID_W * GRID_H) {
        initialize(); // Restart simulation if stuck or full
        draw();
        return true;
    }

    // Attempt to move from a random perimeter point
    let attempts = Math.min(15, potentialSteps.length); 
    for (let i = 0; i < attempts; i++) {
        const pIndex = Math.floor(Math.random() * potentialSteps.length);
        const start = potentialSteps[pIndex];

        // Simulate diffusion from 'start' until it hits the cluster or boundary
        let currentX = start.x;
        let currentY = start.y;
        let steps = 0;
        let success = false;

        while (steps < 15 && grid[currentY][currentX] === 0) {
            const directions = [[0, 1], [0, -1], [1, 0], [-1, 0]];
            directions.sort(() => Math.random() - 0.5); // Random walk
            
            let nextX = currentX + directions[0][1];
            let nextY = currentY + directions[0][0];

            if (nextX < 0 || nextX >= GRID_W || nextY < 0 || nextY >= GRID_H) {
                break; // Hit wall
            }
            if (grid[nextY][nextX] === 1) {
                // Collision! The walker stops here and freezes.
                currentX = nextX;
                currentY = nextY;
                success = true;
                break;
            }
            
            // Continue diffusing
            currentX = nextX;
            currentY = nextY;
            steps++;

            const newDirections = [[0, 1], [0, -1], [1, 0], [-1, 0]];
            newDirections.sort(() => Math.random() - 0.5);
            nextX = currentX + newDirections[0][1];
            nextY = currentY + newDirections[0][0];

            if (nextX < 0 || nextX >= GRID_W || nextY < 0 || nextY >= GRID_H) {
                break; // Hit wall
            }
        }

        // If the walk successfully hit a cluster point, freeze it.
        if (success && grid[currentY][currentX] === 0) {
             grid[currentY][currentX] = 1;
             clusterSize++;
        }
    }

    draw();
    return false; // Not finished
}


function animate() {
    const running = step(); 
    if (running) return;
    requestAnimationFrame(animate);
}

initialize();
animate();
</script></body></html>
qwq:32bSTAT
Show code
<think>

Okay, let's see. The user wants me to create a self-contained HTML file that simulates diffusion-limited aggregation on a 200x150 cell grid using a canvas. Hmm. DLA is that branching structure where particles stick to a cluster when they hit it. The requirements are pretty specific: strict cell-based movement, no floating points, use requestAnimationFrame for smooth animation, and it should restart automatically when done. Also, need to show the number of frozen cells and the cluster radius, all within 120 lines. Alright, let's break this down step by step.

First, I'll set up the basic HTML structure with a canvas element. The canvas size needs to be 200x150 cells, but the actual dimensions in pixels can be scaled. Maybe 20x15 pixels per cell? Wait, 200 cells wide, 150 tall. To make it visible but not too big, maybe 400x300 pixels (so each cell is 2x2 pixels)? That might be better for visibility. Let me check: 200x2 is 400, 150x2 is 300. Yeah, that works. So the canvas will be 400x300, each cell is 2x2 pixels.

Next, the JavaScript part. I'll need variables for the grid. Since it's 200x150, a 2D array might be too big. Alternatively, a flat array where each row is stored consecutively. Let's see, rows are 150, each with 200 cells. So the array length would be 200 * 150. But maybe using a Uint8Array for efficiency? Not sure, but for simplicity, a regular array might work. Wait, but for performance, maybe a 1D array is better.

The seed cell is in the middle. The middle of a 200x150 grid would be at (100, 75). Wait, since arrays are zero-based, maybe (99,74) if starting from 0? So the center is (Math.floor(gridWidth/2), Math.floor(gridHeight/2)). Let me confirm: gridWidth is 200, so 200//2 is 100, but indexes go from 0 to 199, so the center is (100,75) if 150 rows? Wait, rows would be 150, so y from 0 to 149, so center y is 74.5, so floor is 74. Hmm.

The walkers start from random positions on the perimeter. So each walker is initialized at a random edge of the grid. The edges: top, bottom, left, or right. For each walk, they move randomly in one of the four directions each step until they hit the cluster or are frozen.

Each step for the walker: randomly choose direction (up, down, left, right), but need to stay within the grid. Once they move, check if any adjacent cell is part of the cluster. If yes, freeze and add to the cluster, then spawn a new walker.

The cluster grows over time. The number of frozen cells is tracked, and the radius is the maximum distance from the seed. The radius can be calculated as the maximum of distance between each frozen cell and the seed's coordinates. Maybe store all frozen cells in an array and compute the radius each time a new cell is added?

For the animation, use requestAnimationFrame. The main loop will handle updating the walkers and drawing. Need to make sure it runs smoothly.

Now, the code structure:

- Setup the canvas and context.
- Initialize grid, with the seed in the center.
- Track the current number of frozen cells (starts at 1 initially).
- The radius starts at 0, but after the first step, it will grow.
- Walkers: need to have a list of active walkers. Each walker has x and y coordinates. But maybe process one walker at a time until it sticks? Or process multiple walkers per frame?

Wait, the problem says "random walkers step one cell at a time in the four grid directions and freeze permanently when they touch the cluster". So each frame, one walker takes a step. Or perhaps have multiple walkers active at once? Hmm, maybe the standard DLA approach is one walker at a time until it sticks, then spawn a new one. That might be more efficient.

Wait, the way DLA usually works is that you have particles starting randomly on a perimeter, moving until they stick to the cluster, then another is released. So here, the simulation is per particle, each moving until it sticks or maybe until it goes beyond a certain distance? Or maybe they keep moving until they hit the cluster.

So the steps for each frame: if there are no active walkers (or one), then spawn a new walker on the perimeter. But how to handle multiple walkers? Maybe process one walker per frame. Because if we process too many at once, it might be faster but not accurate. Alternatively, have a bunch of walkers moving each step. But given the grid size, maybe just one walker at a time.

Hmm. Let's think: each frame, check if a current walker exists. If not, spawn a new one. Then, move the walker in a random direction. Check if any of the adjacent cells are part of the cluster. If yes, freeze and add to the cluster, then spawn a new walker. Otherwise, proceed.

Alternatively, have a pool of walkers. But for simplicity, maybe just one walker at a time. That would be easier to code, and maybe faster since each frame only processes one step.

So variables:

- grid: a 1D array representing the grid. Each cell is 0 (empty) or 1 (occupied).

- clusterCells: array of [x,y] positions, to track all frozen cells for radius calculation.

- currentWalker: object with x,y coordinates, and maybe some other state.

- frozenCount: number of frozen cells (starts at 1 for the seed).

- radius: current maximum distance from the seed.

- seedX, seedY: the center coordinates.

- walking: boolean indicating if a walker is active.

The steps in the animation loop would be:

1. If no walker is active, spawn a new one on the perimeter.

2. Move the current walker in a random direction (up, down, left, right).

3. Check if any adjacent cell is part of the cluster. If yes, freeze the walker, add it to the grid and clusterCells, increment frozenCount, compute new radius.

4. Else, continue.

5. After each step, draw the grid on the canvas.

But how to spawn the walker on the perimeter? To choose a random edge and a position on that edge.

For example:

- Randomly select one of the four edges (top, bottom, left, right).

- For top edge: y=0, x random between 0 and 199.

- For bottom edge: y=149, x random between 0 and 199.

- Left edge: x=0, y random between 0 and 149.

- Right edge: x=199, y random between 0 and 149.

So, first, pick a direction (0-3), then compute x,y accordingly.

Once the walker is moving, each step:

- pick a direction (random delta for x and y: like dx and dy can be -
deepseek-r1:32bOKFORMAT
Show code
```html
<!DOCTYPE html>
<html><head><title>Diffusion-Limited Aggregation</title></head>
<body style="display:flex;justify-content:center;background:#000;margin:0">
<canvas id=c width=800 height=600 style="border:1px solid #333"></canvas>
<script>
let c=document.getElementById('c'),w=200,h=150,g=[],x,y,midX=w/2|0,midY=h/2|0,walkers=[];c.getContext('2d').scale(4,4);
function init(){
g.length=0;
for(y=0;y<h;++y)g[y]=Array(w).fill(0);
g[midY][midX]=1;
walkers=[];
let n=100;
while(n--)walkers.push({x:Math.random()*w|0,y:Math.random()*h|0,d:(Math.random()*4)|0,s:3});
}
function draw(){
const ctx=c.getContext('2d');
ctx.fillStyle='#fff';
ctx.fillRect(0,0,c.width,c.height);
ctx.fillStyle='#000';
for(y=0;y<h;++y)for(x=0;x<w;++x)if(g[y][x])ctx.fillRect(x,y,1,1);
let maxD=0;
for(y=0;y<h;++y)for(x=0;x<w;++x)if(g[y][x]){
let dx=x-midX,dy=y-midY,d=Math.sqrt(dx*dx+dy*dy);
if(d>maxD)maxD=d;
}
ctx.fillStyle='#fff';
ctx.font='14px monospace';
ctx.fillText(`Cells: ${g.flat().reduce((a,b)=>a+b,0)} Radius: ${maxD.toFixed(2)}`,10,20);
}
function step(){
for(const walker of walkers){
if(g[walker.y][walker.x])continue;
let dir=walker.d;
let nx=walker.x+(dir==3?-1:dir==1?1:0);
let ny=walker.y+(dir==2?-1:dir==0?1:0);
if(nx>=0&&nx<w&&ny>=0&&ny<h&&g[ny][nx]==0){
walker.x=nx;
walker.y=ny;
walker.s--;
if(walker.s<=0)walker.d=(Math.random()*4)|0,walker.s=3;
}else{
g[walker.y][walker.x]=1;
}
}
}
let running=true;
function animate(){
step();
draw();
requestAnimationFrame(animate);
}
init();
animate();
</script></body></html>
```
command-r:35bHANGFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
    <style>
        body { margin: 0; }
        canvas { border: 1px solid black; display: block; }
    </style>
</script>
</head>
<body>
    <canvas id="myCanvas" width="400" height="300"></canvas>

    <script>
        const canvas = document.getElementById('myCanvas');
        const ctx = canvas.getContext('2d');
        let cluster = [];
        let step = 0;

        function drawGrid() {
            ctx.fillStyle = 'white';
            ctx.fillRect(0, 0, canvas.width, canvas.height);

            for (let i = 0; i <= canvas.width / 20; i++) {
                const x = i * 20 + 10;
                ctx.beginPath();
                ctx.moveTo(x-2, 30);
                ctx.lineTo(x+2, 30);
                ctx.stroke();
            }

            for (let j = 0; j <= canvas.height / 15; j++) {
                const y = j * 15 + 7.5;
                ctx.beginPath();
                ctx.moveTo(30, y-2);
                ctx.lineTo(30, y+2);
                ctx.stroke();
            }
        }

        function init() {
            drawGrid();
            cluster = [[10, canvas.height / 2]];
            animate();
        }

        function isCellFree(cell) {
            return !cluster.some(([x, y]) => x === cell[0] && y === cell[1]);
        }

        function getRandomDirection() {
            const directions = [
                [0, -1], [-1, 0], [0, 1], [1, 0]
            ];
            return directions[Math.floor(Math.random() * 4)];
        }

        function animate() {
            requestAnimationFrame(animate);

            if (step < 2500) {
                const walker = [...cluster[step % cluster.length]];

                while (isCellFree([walker[0] + getRandomDirection()[0], walker[1] + getRandomDirection()[1]])) {
                    walker[0] += getRandomDirection()[0];
                    walker[1] += getRandomDirection()[1];
                }

                cluster.push(walker);
            } else {
                init();
            }

            ctx.fillStyle = 'black';
            step++;
            
            for (let i of cluster) {
                const x = i[0] * 20 + 10; 
                const y = i[1] * 15 + 7.5;

                if (step % 3 === 0) {
                    ctx.fillRect(x - 4, y - 4, 8, 8);
                } else {
                    ctx.fillRect(x - 2, y - 2, 4, 4);
                }
            }

            document.getElementById('info').innerHTML = `Frozen Cells: ${cluster.length}<br>Cluster Radius: ${Math.floor((step / cluster.length) ** (1/2))}`;
        }

        init();
    </script>

    <div id="info"></div>
</body>
</html>
```
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">
<title>DLA Grid</title>
<style>
html,body{margin:0;height:100%;background:#081016;color:#dff3ee;font:14px system-ui,sans-serif;overflow:hidden}
canvas{display:block;width:100vw;height:100vh;image-rendering:pixelated}
#hud{position:fixed;left:14px;top:12px;background:#081016cc;border:1px solid #2d4b4f;padding:8px 10px;border-radius:6px}
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="hud"></div>
<script>
const W=200,H=150,N=W*H,c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let grid,img,data,cw,ch,cells,radius,active,spawnR,killR,done;
function reset(){
 grid=new Uint8Array(N); img=x.createImageData(W,H); data=img.data;
 cells=1; radius=0; done=false; active=[];
 let sx=W>>1,sy=H>>1; grid[sy*W+sx]=1; paint(sx,sy,255,244,176);
 for(let i=0;i<180;i++) active.push(spawn());
}
function resize(){
 c.width=innerWidth; c.height=innerHeight; cw=c.width/W; ch=c.height/H;
}
function spawn(){
 let cx=W>>1,cy=H>>1,a=Math.random()*Math.PI*2;
 spawnR=Math.min(Math.hypot(W,H)/2-4,Math.max(12,radius+12));
 killR=Math.min(Math.hypot(W,H)/2-2,spawnR+20);
 return [Math.max(1,Math.min(W-2,(cx+Math.round(Math.cos(a)*spawnR))|0)),Math.max(1,Math.min(H-2,(cy+Math.round(Math.sin(a)*spawnR))|0))];
}
function paint(px,py,r,g,b){
 let i=(py*W+px)*4; data[i]=r; data[i+1]=g; data[i+2]=b; data[i+3]=255;
}
function near(px,py){
 return grid[py*W+px-1]||grid[py*W+px+1]||grid[(py-1)*W+px]||grid[(py+1)*W+px];
}
function freeze(px,py){
 grid[py*W+px]=1; cells++;
 let dx=px-(W>>1),dy=py-(H>>1); radius=Math.max(radius,Math.round(Math.hypot(dx,dy)));
 let t=Math.min(1,radius/80),r=80+t*120,g=210-t*40,b=255-t*170; paint(px,py,r,g,b);
 if(cells>N*.32||radius>Math.min(W,H)/2-3) done=true;
}
function step(){
 if(done){reset();return}
 for(let s=0;s<360;s++){
  let w=active[s%active.length],d=(Math.random()*4)|0;
  if(d==0)w[0]++; else if(d==1)w[0]--; else if(d==2)w[1]++; else w[1]--;
  if(w[0]<1||w[0]>W-2||w[1]<1||w[1]>H-2||Math.hypot(w[0]-(W>>1),w[1]-(H>>1))>killR){active[s%active.length]=spawn();continue}
  if(!grid[w[1]*W+w[0]]&&near(w[0],w[1])){freeze(w[0],w[1]);active[s%active.length]=spawn()}
 }
}
function draw(){
 step(); x.fillStyle="#081016"; x.fillRect(0,0,c.width,c.height);
 x.putImageData(img,0,0); x.drawImage(c,0,0,W,H,0,0,c.width,c.height);
 hud.textContent="Frozen cells: "+cells+" | Radius: "+radius;
 requestAnimationFrame(draw);
}
addEventListener("resize",resize); resize(); reset(); draw();
</script>
</body>
</html>
Claude Sonnet 5frontier referenceOK
Show code
<!doctype html>
<html><head><meta charset="utf-8"><title>Diffusion Limited Aggregation</title>
<style>html,body{margin:0;background:#07080c;overflow:hidden;height:100%}canvas{display:block}</style>
</head><body>
<canvas id="c"></canvas>
<script>
const cv=document.getElementById('c'),ctx=cv.getContext('2d');
function resize(){cv.width=innerWidth;cv.height=innerHeight;}
resize();addEventListener('resize',resize);
const COLS=200,ROWS=150,CS=4,OX=20,OY=20,NW=260,MAXR=68;
const CX=Math.floor(COLS/2),CY=Math.floor(ROWS/2);
let frozen,frozenList,frozenCount,clusterR,walkers,waitTimer;
function idx(x,y){return y*COLS+x}
function dirs(){return[[1,0],[-1,0],[0,1],[0,-1]][Math.floor(Math.random()*4)]}
function spawnWalker(w){
  const ang=Math.random()*Math.PI*2;
  const rad=Math.max(6,clusterR+8+Math.random()*6);
  w.x=Math.max(1,Math.min(COLS-2,Math.round(CX+Math.cos(ang)*rad)));
  w.y=Math.max(1,Math.min(ROWS-2,Math.round(CY+Math.sin(ang)*rad)));
}
function init(){
  frozen=new Uint8Array(COLS*ROWS);
  frozen[idx(CX,CY)]=1;
  frozenList=[{x:CX,y:CY}];
  frozenCount=1;clusterR=0;waitTimer=0;
  walkers=[];
  for(let i=0;i<NW;i++){const w={x:0,y:0};spawnWalker(w);walkers.push(w);}
}
init();
function step(){
  for(const w of walkers){
    const[dx,dy]=dirs();
    w.x+=dx;w.y+=dy;
    const distC=Math.hypot(w.x-CX,w.y-CY);
    if(w.x<1||w.x>=COLS-1||w.y<1||w.y>=ROWS-1||distC>clusterR+42){spawnWalker(w);continue;}
    const i=idx(w.x,w.y);
    if(frozen[i]){spawnWalker(w);continue;}
    const nb=[idx(w.x+1,w.y),idx(w.x-1,w.y),idx(w.x,w.y+1),idx(w.x,w.y-1)];
    let touch=false;
    for(const n of nb)if(frozen[n]){touch=true;break;}
    if(touch){
      frozen[i]=1;frozenList.push({x:w.x,y:w.y});frozenCount++;
      if(distC>clusterR)clusterR=distC;
      spawnWalker(w);
    }
  }
  if(clusterR>=MAXR){waitTimer++;if(waitTimer>80)init();}
}
function draw(){
  ctx.fillStyle='#07080c';ctx.fillRect(0,0,cv.width,cv.height);
  ctx.strokeStyle='#345';ctx.strokeRect(OX,OY,COLS*CS,ROWS*CS);
  for(const f of frozenList){
    const d=Math.hypot(f.x-CX,f.y-CY);
    const t=Math.min(1,d/MAXR);
    const r=Math.round(90+t*150),g=Math.round(200-t*120),b=Math.round(255-t*180);
    ctx.fillStyle='rgb('+r+','+g+','+b+')';
    ctx.fillRect(OX+f.x*CS,OY+f.y*CS,CS,CS);
  }
  ctx.fillStyle='rgba(150,220,255,0.55)';
  for(const w of walkers){
    ctx.fillRect(OX+w.x*CS,OY+w.y*CS,CS,CS);
  }
  ctx.fillStyle='#eef';ctx.font='16px monospace';ctx.textAlign='left';
  ctx.fillText('Diffusion Limited Aggregation (200x150 grid)',OX,OY+ROWS*CS+28);
  ctx.font='13px monospace';ctx.fillStyle='#9cf';
  ctx.fillText('Frozen cells: '+frozenCount,OX,OY+ROWS*CS+50);
  ctx.fillText('Cluster radius: '+clusterR.toFixed(1),OX,OY+ROWS*CS+70);
}
function loop(){
  step();draw();
  requestAnimationFrame(loop);
}
requestAnimationFrame(loop);
</script>
</body></html>
Claude Haiku 4.5frontier referenceOK
Show code
<!DOCTYPE html><html><head><title>r79</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=200,H=150,g=Array(H).fill(0).map(()=>Array(W).fill(0));
g[Math.floor(H/2)][Math.floor(W/2)]=1;
let w=[],frozen=1,maxr=0;
for(let i=0;i<200;i++)w.push({x:Math.floor(Math.random()*W),y:Math.floor(Math.random()*H)});
function draw(){
  x.fillStyle="#fff";x.fillRect(0,0,800,600);
  let s=Math.floor(750/W);
  // Update walkers
  let nw=[];
  w.forEach(wa=>{
    let r=Math.floor(Math.random()*4),dx=[1,-1,0,0][r],dy=[0,0,1,-1][r];
    let nx=(wa.x+dx+W)%W,ny=(wa.y+dy+H)%H;
    if(g[ny][nx]){g[wa.y][wa.x]=1;frozen++;
      let d=Math.sqrt((wa.x-W/2)**2+(wa.y-H/2)**2);maxr=Math.max(maxr,d);
    }else{wa.x=nx;wa.y=ny;nw.push(wa);}
  });
  w=nw;
  // Add walkers
  if(Math.random()>0.7&&w.length<300)w.push({x:Math.floor(Math.random()*W),y:Math.floor(Math.random()*H)});
  // Draw
  for(let i=0;i<H;i++)for(let j=0;j<W;j++){
    if(g[i][j]){x.fillStyle="#f00";x.fillRect(j*s,i*s,s,s);}
  }
  w.forEach(wa=>{x.fillStyle="#0f0";x.fillRect(wa.x*s,wa.y*s,s,s);});
  x.fillStyle="#000";x.font="14px mono";x.fillText("Frozen:"+frozen+" Radius:"+maxr.toFixed(1),100,550);
  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
mistral-small:24b —120.7 sOK
deepseek-r1:14b —56.9 sOK
llama3.1:8b —135.7 sOK
qwen3-coder:30b —26.8 sOK
qwen3:14b —47.4 sOK
qwen3:8b ——harness
gemma4:26b ——harness
qwen3.5:9b —51.2 sOK
qwq:32b —132.9 sOK
deepseek-r1:32b —134.1 sOK
command-r:35b —124.4 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>Diffusion-Limited Aggregation</title>
<style>
  html,body{margin:0;height:100%;background:#05070d;color:#c8d6f0;
    font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    display:flex;align-items:center;justify-content:center}
  .wrap{width:min(96vw,900px)}
  h1{font-size:12px;letter-spacing:.28em;text-transform:uppercase;color:#5f7398;margin:0 0 10px;font-weight:600}
  canvas{width:100%;display:block;border:1px solid #16223a;border-radius:6px;
    background:#05070d;image-rendering:pixelated;box-shadow:0 0 60px -20px #2a6bff}
  #hud{display:flex;gap:26px;margin-top:10px;flex-wrap:wrap}
  #hud div{display:flex;gap:8px;align-items:baseline}
  #hud span{color:#5f7398;font-size:11px;letter-spacing:.14em;text-transform:uppercase}
  #hud b{color:#e8f0ff;font-weight:600;font-variant-numeric:tabular-nums;font-size:15px}
</style>
</head>
<body>
<div class="wrap">
  <h1>Diffusion-Limited Aggregation &middot; 200 &times; 150 cell lattice</h1>
  <canvas id="c" width="800" height="600"></canvas>
  <div id="hud">
    <div><span>Frozen cells</span><b id="n">1</b></div>
    <div><span>Cluster radius</span><b id="r">0</b></div>
    <div><span>Generation</span><b id="g">1</b></div>
  </div>
</div>
<script>
const cv=document.getElementById('c'),x=cv.getContext('2d');
const W=200,H=150,S=4,CX=W>>1,CY=H>>1,MAXR=70;
const en=document.getElementById('n'),er=document.getElementById('r'),eg=document.getElementById('g');
let grid,count,maxR,wx,wy,spawnR,kill2,phase,fadeT,gen=0;

function reset(){
  grid=new Uint8Array(W*H);count=0;maxR=0;phase=0;fadeT=0;gen++;
  x.globalAlpha=1;x.fillStyle='#05070d';x.fillRect(0,0,cv.width,cv.height);
  freeze(CX,CY);respawn();
}
function freeze(px,py){
  grid[py*W+px]=1;count++;
  const dx=px-CX,dy=py-CY,r=Math.round(Math.sqrt(dx*dx+dy*dy));
  if(r>maxR)maxR=r;
  paint(px,py,r);
}
function paint(px,py,r){
  const t=r/MAXR;
  x.shadowBlur=7;x.shadowColor='hsla('+(195+t*150)+',95%,60%,.75)';
  x.fillStyle='hsl('+(195+t*150)+',92%,'+(72-t*22)+'%)';
  x.fillRect(px*S,py*S,S,S);
  x.shadowBlur=0;
}
function respawn(){
  spawnR=Math.min(maxR+6,MAXR+4);
  const a=Math.random()*Math.PI*2,k=spawnR+18;
  kill2=k*k;
  wx=CX+Math.round(spawnR*Math.cos(a));
  wy=CY+Math.round(spawnR*Math.sin(a));
  if(wx<1)wx=1;if(wx>W-2)wx=W-2;if(wy<1)wy=1;if(wy>H-2)wy=H-2;
}
function touching(px,py){
  return grid[py*W+px-1]||grid[py*W+px+1]||grid[(py-1)*W+px]||grid[(py+1)*W+px];
}
function step(){
  const d=Math.random()*4|0;
  if(d===0)wx++;else if(d===1)wx--;else if(d===2)wy++;else wy--;
  if(wx<1||wx>W-2||wy<1||wy>H-2){respawn();return;}
  const dx=wx-CX,dy=wy-CY;
  if(dx*dx+dy*dy>kill2){respawn();return;}
  if(touching(wx,wy)){
    freeze(wx,wy);
    if(maxR>=MAXR||count>7000)phase=1;else respawn();
  }
}
function frame(){
  if(phase===0){
    for(let i=0;i<24000;i++){step();if(phase)break;}
  }else{
    fadeT++;
    x.globalAlpha=.055;x.fillStyle='#05070d';
    x.fillRect(0,0,cv.width,cv.height);x.globalAlpha=1;
    if(fadeT>70)reset();
  }
  en.textContent=count.toLocaleString();
  er.textContent=maxR+' cells';
  eg.textContent=gen;
  requestAnimationFrame(frame);
}
reset();
requestAnimationFrame(frame);
</script>
</body>
</html>