Overview › Code › R94
Code · blind round

R94 · Raycast maze walkthrough

blind round 8/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.

Show task
Create ONE self-contained HTML file (STRICT LIMIT: max 7000 characters in total — this is a budget on characters, not on lines, so removing line breaks does not help) that renders a first-person view of a grid maze by raycasting on a <canvas>: cast one ray per screen column against a fixed wall grid, take the distance to the first wall hit, correct it against the fisheye effect, and draw a vertical wall slice whose height and shading follow that distance. Move the camera along the corridors and turn at junctions on its own, without any user input. Show the camera position and heading. Use only the 2D canvas context — no WebGL, no libraries. 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)
qwen3-coder:30bBLANKLIMFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Autonomous Raycaster Maze</title>
    <style>
        body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; }
        canvas { border: 1px solid #333; background: #000; }
    </style>
</head>
<body>
    <canvas id="c"></canvas>
    <script>
        const c = document.getElementById('c');
        const ctx = c.getContext('2d');

        // --- Configuration ---
        const MAP_SIZE = 10;
        const CELL_SIZE = 64;
        const SCREEN_W = 800;
        const SCREEN_H = 600;

        c.width = SCREEN_W;
        c.height = SCREEN_H;

        // --- Game State Variables ---
        let maze = [];
        let player = { x: 0, y: 0, angle: Math.PI / 2 }; // Start facing positive Y (down)
        const MOVEMENT_SPEED = 0.15;
        const ANGULAR_SPEED = 0.03;

        // --- Maze Generation (Recursive Backtracker) ---
        function generateMaze() {
            let grid = Array(MAP_SIZE).fill(0).map(() => Array(MAP_SIZE).fill(true)); // True means wall exists
            maze = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
                    [1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
                    [1, 0, 1, 1, 1, 0, 1, 1, 0, 1],
                    [1, 0, 1, 0, 0, 0, 0, 1, 0, 1],
                    [1, 0, 1, 0, 1, 1, 0, 1, 0, 1],
                    [1, 0, 0, 0, 1, 0, 0, 0, 0, 1],
                    [1, 0, 1, 1, 1, 0, 1, 1, 0, 1],
                    [1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
                    [1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
                   ];

            let stack = [];
            let start_x = 1;
            let start_y = 1;

            stack.push({ x: start_x, y: start_y });
            grid[start_y][start_x] = false; // Clear starting cell

            while (stack.length > 0) {
                let current = stack[stack.length - 1];
                let neighbors = [];

                // Check potential moves (N, S, E, W)
                const dirs = [[0, -2], [0, 2], [-2, 0], [2, 0]];
                for (const [dx, dy] of dirs) {
                    let nx = current.x + dx;
                    let ny = current.y + dy;

                    if (nx >= 0 && nx < MAP_SIZE && ny >= 0 && ny < MAP_SIZE && 
                        !grid[ny][nx] && grid[current.y + Math.floor((dy / 2))][current.x + Math.floor((dx / 2))] === true) {
                        neighbors.push({ x: nx, y: ny, wall_to_clear: [current.x + dx / 2, current.y + dy / 2] });
                    }
                }

                if (neighbors.length > 0) {
                    let next = neighbors[Math.floor(Math.random() * neighbors.length)];
                    
                    // Clear the wall between current and next
                    grid[current.y + Math.floor((next.y - current.y) / 2)][current.x + Math.floor((next.x - current.x) / 2)] = false;

                    grid[next.y][next.x] = false;
                    stack.push({ x: next.x, y: next.y });
                } else {
                    stack.pop();
                }
            }
        }


        // --- Raycasting Core Logic ---
        function castRay(angle) {
            const MAX_DIST = 10 * CELL_SIZE;
            let x = player.x + Math.cos(angle) * 0.1;
            let y = player.y + Math.sin(angle) * 0.1;

            let sinA = Math.sin(angle);
            let cosA = Math.cos(angle);

            const step = 0.005; // Step size for ray increments
            let distance = 0;

            while (distance < MAX_DIST) {
                x += cosA * step;
                y += sinA * step;
                distance += step;

                // Check map collision using integer coordinates of the grid cell edge
                const gx = Math.floor(x);
                const gy = Math.floor(y);

                if (gx < 0 || gx >= MAP_SIZE || gy < 0 || gy >= MAP_SIZE) break;

                // Check if the point (gx, gy) is a wall (1)
                let currentCellWall = maze[gy][gx];

                if (currentCellWall === 1) {
                    // Collision detected. Distance calculation needs refinement for true hit spot.
                    // For simplicity and performance in this limited context, we use the distance accumulated so far.
                    return Math.sqrt((x - player.x)**2 + (y - player.y)**2);
                }
            }

            return MAX_DIST; // Never hits a wall
        }

        function drawScene() {
            ctx.clearRect(0, 0, SCREEN_W, SCREEN_H);

            // Draw floor/ceiling (simple ambient color)
            ctx.fillStyle = '#444'; ctx.fillRect(0, 0, SCREEN_W, SCREEN_H / 2); // Ceiling
            ctx.fillStyle = '#666'; ctx.fillRect(0, SCREEN_H / 2, SCREEN_W, SCREEN_H / 2); // Floor

            // Raycasting loop (one ray per vertical screen slice)
            const numRays = SCREEN_W;
            for (let i = 0; i < numRays; i++) {
                const angle = player.angle - Math.PI / 2 + (i * (Math.PI / numRays));

                // Angle correction: Raycasting works better if the angle is relative to the X-axis
                let rayAngle = angle;

                // Distance calculation using simple coordinate projection for performance
                let distance = castRay(rayAngle);

                // Fisheye Correction (Projected Horizontal Distance)
                const correctedDistance = distance * Math.cos(Math.abs(player.angle - rayAngle));

                if (correctedDistance < 1) continue; // Ignore if too close/invalid

                // Calculate wall height and position on screen
                const wallHeight = SCREEN_H / (correctedDistance / CELL_SIZE);
                const drawStart = Math.max(0, (SCREEN_H - wallHeight) / 2);
                const drawEnd = Math.min(SCREEN_H, drawStart + wallHeight);

                // Shading (simple inverse function based on distance)
                let shadeStrength = 1 - Math.min(1, correctedDistance / (CELL_SIZE * 2));
                let colorFactor = Math.floor(shadeStrength * 150);
                
                ctx.fillStyle = `rgb(${colorFactor}, ${colorFactor}, ${colorFactor})`;
                ctx.fillRect(i, drawStart, 1, drawEnd - drawStart);
            }

            // Display Player Info (HUD)
            ctx.fillStyle = 'white';
            ctx.font = '16px monospace';
            ctx.fillText(`Pos: (${Math.floor(player.x)}, ${Math.floor(player.y)})`, 10, 20);
            ctx.fillText(`Angle: ${(player.angle * 180 / Math.PI).toFixed(0)}°`, 10, 40);
        }

        // --- Movement and AI Logic ---

        function movePlayer() {
            let newX = player.x + Math.cos(player.angle) * MOVEMENT_SPEED;
            let newY = player.y + Math.sin(player.angle) * MOVEMENT_SPEED;

            // Check collision (using integer grid coordinates for simplicity)
            const mapCheckX = Math.floor(newX);
            const mapCheckY = Math.floor(newY);

            if (mapCheckX >= 1 && mapCheckX < MAP_SIZE - 1 && 
                mapCheckY >= 1 && mapCheckY < MAP_SIZE - 1) {
                if (maze[Math.floor(newY)][Math.floor(newX)] === 0) {
                    player.x = newX;
                    player.y = newY;
                }
            }

            // Autonomous Turning Logic: Try to keep moving forward or turn slightly if blocked
            const rayDistance = castRay(player.angle);
            if (rayDistance > 4 * CELL_SIZE) { // If clear path ahead
                // Simple drift/jiggle random turning tendency
                if (Math.random() < 0.01) {
                    player.angle += (Math.random() - 0.5) * 0.2;
                }
            } else {
                let turned = false;
                // Check for potential turn options (neighbors in a circle around current cell)
                const directions = [
                    { dx: 1, dy: 0, angle_change: Math.PI / 2 },
                    { dx: -1, dy: 0, angle_change: -Math.PI / 2 },
                    { dx: 0, dy: 1, angle_change: 0 },
                    { dx: 0, dy: -1, angle_change: Math.PI }
                ];

                // Prioritize turning to the most open adjacent cell
                let bestTurn = null;
                let minDistanceToOpenCell = Infinity;

                for (const { dx, dy, angle_change } of directions) {
                    if (maze[Math.floor(player.y + dy)][Math.floor(player.x + dx)] === 0) {
                        // Calculate rough turning cost/benefit
                        let potentialAngle = player.angle + angle_change;
                        
                        // Check if this new direction is better than the current blocked path
                        if (potentialAngle !== player.angle && Math.random() < 0.1) {
                            bestTurn = { angle: potentialAngle, cost: 0 }; // Simple acceptance for now
                            break;
                        }
                    }
                }

                if (bestTurn) {
                    player.angle = bestTurn.angle;
qwen3.5:9bERRSTATFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head><title>Auto Maze Raycaster</title></head>
<body>
<canvas id="c" width="640" height="320"></canvas>
<script>
const C = document.getElementById('c');
const ctx = C.getContext('2d');

// --- Configuration ---
const MAP_W = 10;
const MAP_H = 8;
const TILE_SIZE = 64;
const WALL_THICKNESS = 1; // Assume 1 unit thick walls

// Maze: 1=Wall, 0=Path
let maze = [
    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
    [1, 0, 0, 0, 1, 0, 0, 0, 0, 1],
    [1, 0, 1, 0, 1, 0, 1, 1, 0, 1],
    [1, 0, 1, 0, 0, 0, 0, 1, 0, 1],
    [1, 0, 1, 1, 1, 1, 0, 1, 0, 1],
    [1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
];

// Camera State
let cam = { x: TILE_SIZE * 1.5, y: TILE_SIZE * 1.5, angle: Math.PI / 2 }; // Start at (1.5, 1.5), facing South
const SECTOR_SIZE = 640;

// --- Utility Functions ---

function checkWall(x, y) {
    let mapX = Math.floor((x + TILE_SIZE / 2) / TILE_SIZE);
    let mapY = Math.floor((y + TILE_SIZE / 2) / TILE_SIZE);
    return maze[mapY][mapX] === 1;
}

function drawBackground() {
    ctx.fillStyle = 'black';
    ctx.fillRect(0, 0, C.width, C.height);
}

// --- Raycasting Core ---

function castRay(angle) {
    const maxDist = 5000;
    let dx = Math.cos(angle) * 10;
    let dy = Math.sin(angle) * 10;
    let x = cam.x + dx * 0.1;
    let y = cam.y + dy * 0.1;
    let dist = 0;

    while (dist < maxDist && !checkWall(x, y)) {
        x += dx;
        y += dy;
        dist += Math.hypot(dx, dy);
    }
    return Math.min(dist, 500); // Cap distance for rendering
}

// Main Raycasting Loop
function renderScene() {
    drawBackground();

    const screenWidth = C.width;
    for (let i = 0; i < screenWidth; i++) {
        let rayAngle = cam.angle - Math.PI / 2 + (i / screenWidth) * Math.PI;

        // Simple distance calculation (Raycasting approximation for the center point of the column)
        let dist = castRay(rayAngle);
        
        // Height calculation and fisheye correction
        const projectedHeight = (C.width / 2) / (dist === 0 ? 1 : Math.cos(rayAngle - cam.angle));
        const actualHeight = 64 * (Math.cos(rayAngle - cam.angle)) / dist;

        // Draw wall slice
        let shade = 1 - Math.min(1, dist / 500); // Simple fading based on distance
        ctx.fillStyle = `rgb(${20 + 80 * shade}, ${20 + 80 * shade}, ${20 + 80 * shade})`;
        ctx.fillRect(i, (C.height - actualHeight) / 2, 1, actualHeight);

        // Optional: Draw floor/ceiling lines to visualize the effect
        /*
        ctx.fillStyle = 'green'; ctx.fillRect(i, C.height / 2 + 5, 1, 5);
        ctx.fillStyle = 'brown'; ctx.fillRect(i, 0, 1, 5);
        */
    }
}

// --- Movement and Logic ---

function moveCamera() {
    const speed = 3;
    const turnSpeed = Math.PI / 40; // radians per frame

    // 1. Attempt to move forward
    let newX = cam.x + Math.cos(cam.angle) * speed;
    let newY = cam.y + Math.sin(cam.angle) * speed;

    if (!checkWall(newX, cam.y)) {
        cam.x = newX;
        cam.y = newY;
    } else if (Math.abs(cam.x - newX) > 5 && Math.abs(cam.y - newY) > 5) {
        // If blocked, try turning instead of simply stopping
    }

    // 2. Check for junction/blocking and turn automatically
    let canTurn = false;
    const testAngles = [Math.PI / 2, Math.PI, -Math.PI / 2]; // Try N, W, S relative to current angle
    for (const offset of testAngles) {
        let testAngle = cam.angle + offset;
        let testX = cam.x + Math.cos(testAngle) * 50;
        let testY = cam.y + Math.sin(testAngle) * 50;

        if (!checkWall(testX, testY)) {
            canTurn = true;
            break;
        }
    }

    // Simple Auto-Turning Logic: If blocked and we can turn, turn slightly right (easiest heuristic)
    if (!checkWall(newX, cam.y) && !canTurn) {
         cam.angle += turnSpeed * 0.5; // Slow rotation if stuck
    } else if (Math.abs(cos(cam.angle - Math.PI/2)*3) < 0.1 && checkWall(newX, cam.y)) {
        // Simple collision detection: If move fails AND we can turn
        let testAngle = cam.angle + Math.PI / 4; // Try turning right slightly
        let testX = cam.x + Math.cos(testAngle) * 50;
        let testY = cam.y + Math.sin(testAngle) * 50;

        if (!checkWall(testX, testY)) {
            cam.angle += turnSpeed; // Turn right
        } else {
             // If turning also fails, just stop/jitter angle slightly
             cam.angle = cam.angle + (Math.random() - 0.5) * 0.1;
        }
    }


    // Update display
    ctx.fillStyle = 'white';
    ctx.font = "12px monospace";
    ctx.fillText(`Pos: (${cam.x.toFixed(0)}, ${cam.y.toFixed(0)})`, 10, 20);
    ctx.fillText(`Angle: ${(cam.angle * 180 / Math.PI).toFixed(0)} deg`, 10, 40);
}

// --- Main Loop ---
function gameLoop() {
    renderScene();
    moveCamera();
    requestAnimationFrame(gameLoop);
}

// Start the simulation
gameLoop();

</script>
</body>
</html>
```
llama3.1:8bBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
	<title>Raycasting Maze</title>
	<style>
		body {
			margin: 0;
			background-color: #f0f0f0;
		}
		#maze-container {
			width: 800px;
			height: 600px;
			border: 1px solid black;
		}
	</style>
</head>
<body>
	<canvas id="maze" width="800" height="600"></canvas>
	<div id="stats">
		X: <span id="x">0</span> Y: <span id="y">0</span> Heading: <span id="heading">90</span>
	</div>

	<script>
		const canvas = document.getElementById('maze');
		const ctx = canvas.getContext('2d');
		const stats = document.getElementById('stats');
		let x = 50, y = 50;
		let heading = Math.PI / 4;

		function randomInt(min, max) {
			return min + Math.floor(Math.random() * (max - min + 1));
		}

		function wall(x, y) {
			return function() {
				ctx.fillStyle = '#000';
				ctx.fillRect(x, y, 2, 20);
				return true;
			};
		}

		const walls = [
			wall(100, 50),
			wall(200, 150),
			wall(300, 250),
			wall(400, 350),
		];

		function drawMaze() {
			ctx.fillStyle = '#fff';
			ctx.fillRect(0, 0, canvas.width, canvas.height);
			for (const wall of walls) {
				if (wall()) {}
			}
		}

		function castRay(x, y, heading) {
			let dist = Infinity;
			const rayY = Math.round(y + Math.sin(heading) * 10000);
			for (let i = 0; i < canvas.width / 2; i++) {
				if (walls.some(wall => wall(Math.floor(i + x), rayY))) {
					dist = Math.min(dist, i - x);
				}
			}
			return dist;
		}

		function drawScene() {
			ctx.fillStyle = '#fff';
			ctx.fillRect(0, 0, canvas.width, canvas.height);
			for (let i = 0; i < canvas.width / 2; i++) {
				const dist = castRay(x, y, heading + Math.PI * i / 100);
				const wallHeight = Math.round((1 - dist) * canvas.height);
				ctx.fillStyle = `hsl(${(i * 360) % 360}, 50%, ${wallHeight / canvas.height * 90}%)`;
				ctx.fillRect(i * 2, Math.floor(canvas.height / 2) - (canvas.height - wallHeight) / 2, 1, wallHeight);
			}
			stats.innerHTML = `X: ${Math.round(x)} Y: ${Math.round(y)} Heading: ${Math.round(heading * 180 / Math.PI)}°`;
		}

		function animate() {
			requestAnimationFrame(animate);
			if (x < 0 || x > canvas.width - 50) y += heading === Math.PI / 4 ? 1 : -1;
			if (y < 0 || y > canvas.height - 20) x += heading === 3 * Math.PI / 4 ? 1 : -1;
			heading = (heading + Math.PI / 200) % (2 * Math.PI);
			drawScene();
		}

		function reset() {
			x = randomInt(50, canvas.width - 100);
			y = randomInt(50, canvas.height - 20);
			heading = Math.PI / 4;
			stats.innerHTML = `X: ${Math.round(x)} Y: ${Math.round(y)} Heading: ${Math.round(heading * 180 / Math.PI)}°`;
			drawScene();
		}

		reset();

		drawMaze();
		animate();
	</script>
</body>
</html>
```
mistral-small:24bOKFORMAT
Show code
```html
<html>
<head>
<meta charset="UTF-8">
<title>Raycasting Maze</title>
<style>
body { margin: 0; overflow: hidden; }
canvas { display: block; }
</style>
</head>
<body>
<canvas id="mazeCanvas"></canvas>
<script>
let canvas = document.getElementById('mazeCanvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let ctx = canvas.getContext('2d');

const map = [
  '##########',
  '#.........#',
  '#.###.#.#.#',
  '#..#...#.#.',
  '#........#.',
  '######.#.#.',
  '#.....#..#.',
  '#.#####.##.',
  '#........#',
  '##########'
];

const mapWidth = map[0].length;
const mapHeight = map.length;

let playerX = 1;
let playerY = 1;
let playerA = 0;

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

function castRay(angle) {
  let x = Math.floor(playerX);
  let y = Math.floor(playerY);

  const cosA = Math.cos(angle);
  const sinA = Math.sin(angle);

  let dx;
  let dy;

  if (cosA > 0) { dx = 1; } else { dx = -1; }
  if (sinA > 0) { dy = 1; } else { dy = -1; }

  let distX = Math.abs(1 / cosA);
  let distY = Math.abs(1 / sinA);

  while (x >= 0 && x < mapWidth && y >= 0 && y < mapHeight) {
    if (map[y][x] === '#') return {dist: Math.sqrt(x * x + y * y), color: 'black'};
    if (cosA > 0) {x += dx; distX += 1 / cosA;}
    else {
      x -= dx;
      distY += 1 / sinA
    }
    if (sinA > 0) {y += dy; distX += 1/cosA;}
    else {
      y -= dy;
      distY += 1/sinA
    }
  }

}

function render() {
  ctx.clearRect(0, 0, canvas.width, canvas.height);

  const screenWidth = canvas.width / 5;
  for (let x = 0; x < screenWidth; x++) {
    let angle = playerA + Math.atan2(x - screenWidth / 2, canvas.width);
    let ray = castRay(angle);
    if (ray) {
      let height = (canvas.height * 1) / ray.dist;
      ctx.fillStyle = 'gray';
      ctx.fillRect(x * 5, (canvas.height - height) / 2, 5, height);
    }
  }

  drawPixel(playerX, playerY, 'red');
}

function update() {
  if (Math.random() < 0.1) {
    let move = Math.floor(Math.random() * 4);
    if (move === 0 && map[Math.floor(playerY)][Math.floor(playerX + 1)] !== '#') { playerX += 1; }
    else if (move === 1 && map[Math.floor(playerY - 1)][Math.floor(playerX)] !== '#') { playerY -= 1; }
    else if (move === 2 && map[Math.floor(playerY + 1)][Math.floor(playerX)] !== '#') { playerY += 1; }
    else if (move === 3 && map[Math.floor(playerY)][Math.floor(playerX - 1)] !== '#') { playerX -= 1; }

    let turn = Math.random() * 0.2 - 0.1;
    playerA += turn;
  }

  render();
}

function loop() {
  update();
  requestAnimationFrame(loop);
}

requestAnimationFrame(loop);

</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:14bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Autonomous Raycasting Maze</title>
    <style>
        body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; }
        canvas { border: 2px solid #333; image-rendering: pixelated; }
    </style>
</head>
<body>
    <canvas id="mazeCanvas"></canvas>
    <script>
        const canvas = document.getElementById('mazeCanvas');
        const ctx = canvas.getContext('2d');

        let W, H;
        W = 800;
        H = 600;
        canvas.width = W;
        canvas.height = H;

        // Maze constants
        const GRID_SIZE = 10; // Grid is N*N of cells (e.g., 20x20)
        const CELL_SIZE = 64;
        const MAZE_MAP = [];
        const TILE_SCALE = 1;

        // Player state
        let player = { x: 3.5 * CELL_SIZE, y: 3.5 * CELL_SIZE, dir: Math.PI / 2, heading: 0 };

        function generateMaze() {
            const maze = Array(GRID_SIZE).fill(0).map(() => Array(GRID_SIZE).fill(1));
            const stack = [];
            let startX = 1, startY = 1;
            maze[startY][startX] = 0;

            stack.push({ x: startX, y: startY });

            while (stack.length > 0) {
                const current = stack[stack.length - 1];
                const neighbors = [];
                for (let d = 0; d < 4; d++) {
                    let nx = current.x + Math.cos(d * Math.PI / 2) * 2;
                    let ny = current.y + Math.sin(d * Math.PI / 2) * 2;

                    if (nx >= 1 && nx < GRID_SIZE - 1 && ny >= 1 && ny < GRID_SIZE - 1 && maze[Math.floor(ny)][Math.floor(nx)] === 1) {
                        neighbors.push({ x: Math.floor(nx), y: Math.floor(ny) });
                    }
                }

                if (neighbors.length > 0) {
                    const next = neighbors[Math.floor(Math.random() * neighbors.length)];
                    const wallX = current.x + (next.x - current.x) / 2;
                    const wallY = current.y + (next.y - current.y) / 2;

                    maze[next.y][next.x] = 0;
                    maze[Math.floor(wallY)][Math.floor(wallX)] = 0; // Open path and connecting wall
                    stack.push({ x: next.x, y: next.y });
                } else {
                    stack.pop();
                }
            }
            return maze;
        }

        // Set the global maze map (using A* style coordinates for simplicity)
        function initializeMaze(mazeMap) {
             MAZE_MAP[Math.floor(player.y / CELL_SIZE)][Math.floor(player.x / CELL_SIZE)] = 0;
             for(let i=1; i<GRID_SIZE-1; i++) {
                 for(let j=1; j<GRID_SIZE-1; j++) {
                     MAZE_MAP[i][j] = mazeMap[Math.floor(i)][Math.floor(j)];
                 }
             }
        }

        function castRays() {
            ctx.clearRect(0, 0, W, H);
            const FOV = Math.PI / 3;
            const numRays = W;
            const angleStep = FOV / numRays;

            for (let i = 0; i < numRays; i++) {
                let rayAngle = player.heading - Math.PI/2 + i * angleStep; // Adjust starting angle for screen orientation

                // Simple grid-based raycasting check
                let x = player.x;
                let y = player.y;
                let dx = Math.cos(rayAngle);
                let dy = Math.sin(rayAngle);
                
                const maxDist = 20 * CELL_SIZE;
                let dist = 0;

                // Ray march (simple fixed step)
                while (dist < maxDist) {
                    x += dx * 1;
                    y += dy * 1;
                    dist++;

                    if(MAZE_MAP[Math.floor(y / CELL_SIZE)][Math.floor(x / CELL_SIZE)] === 1) {
                        break; // Hit a wall cell
                    }
                }

                // Correct distance for fisheye effect
                let correctedDist = dist * Math.cos(player.heading - rayAngle);
                if (correctedDist < 0.5) correctedDist = 0.5;

                const wallHeight = W / (correctedDist * Math.tan(FOV / 2));
                const shade = 1 - (Math.min(1, dist / maxDist));
                const color = `rgb(${50 + 50 * shade}, ${30 + 30 * shade}, ${40 + 30 * shade})`;

                ctx.fillStyle = color;
                ctx.fillRect(i * (W / numRays), 0, W / numRays, wallHeight);
            }
        }

        function moveCamera() {
            const speed = 5;
            const turnSpeed = Math.PI / 10;
            let moved = false;

            // Attempt Movement: Forward
            let nextX = player.x + Math.cos(player.heading) * speed;
            let nextY = player.y + Math.sin(player.heading) * speed;
            
            const checkCollision = (px, py) => {
                const gridX = Math.floor(px / CELL_SIZE);
                const gridY = Math.floor(py / CELL_SIZE);
                if (gridX < 0 || gridY < 0 || gridX >= GRID_SIZE || gridY >= GRID_SIZE) return true; // Out of bounds is a wall
                return MAZE_MAP[gridY][gridX] === 1;
            };

            if (!checkCollision(nextX, nextY)) {
                player.x = nextX;
                player.y = nextY;
                moved = true;
            }

            // Autonomous Turning Logic (Attempt to turn if blocked)
            if (!moved) {
                let attempts = [Math.PI/2, -Math.PI/2]; // Try right and left first
                for(const angleChange of attempts) {
                    player.heading += angleChange * 0.5; // Small rotation step
                    player.heading = player.heading % (2 * Math.PI);

                    // Check if the new direction allows movement
                    nextX = player.x + Math.cos(player.heading) * speed * 0.1;
                    nextY = player.y + Math.sin(player.heading) * speed * 0.1;
                    if (!checkCollision(nextX, nextY)) {
                        // Successfully turned and can move slightly
                        player.x += Math.cos(player.heading) * speed * 0.5;
                        player.y += Math.sin(player.heading) * speed * 0.5;
                        break; // Exit turn loop
                    }
                }
            }

            // Draw Debug Info (Position and Heading)
            ctx.fillStyle = '#FFF';
            ctx.fillText(`Pos: (${Math.floor(player.x/CELL_SIZE)}, ${Math.floor(player.y/CELL_SIZE)})`, 10, H - 20);
            ctx.fillText(`Dir: ${(player.heading / Math.PI).toFixed(1) * 180} deg`, 10, H - 5);
        }

        function animate() {
            moveCamera();
            castRays();
            requestAnimationFrame(animate);
        }

        // --- Initialization Sequence ---
        const maze = generateMaze();
        initializeMaze(maze);
        animate();

    </script>
</body>
</html>
```
deepseek-r1:14bERRBLANKMINIFIEDFORMAT
Show code
```html
<!DOCTYPE html>
<html><body style="background:black;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c width=400 height=256></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');let d=e=>{const a=(o)=>Math.floor(o);return{walled:(x,y)=>e[(y+0.5)/8][ (x+0.5)/8],cell:(x,y)=>[a(x/4),a(y/4)],dir:[]};}(window.innerWidth/4,window.innerHeight/8);

const maze=[],dirs=[[1,0],[0,1],[-1,0],[0,-1]];let m=20,n=15;for(let y=0;y<n;++y)maze[y]=new Array(m).fill(1);function generate(){let v=1,bounds=new Set();bounds.add([0,0]);while(bounds.size>0){const[a,b]=bounds.getRandomEntry();if(v%2==0)v++;maze[b][a]=0;for(let[dX,dY]of dirs){const X=a+dX,Y=b+dY;if(X>=0&&Y>=0&&X<m&&Y<n&&!maze[Y][X]){if(!v%3)break;bounds.delete([a,b]);bounds.add([X,Y])}}}

let dir=[1,0];let pos=[5,5],prevPos=pos.slice();function step(){const[dx,dy]=dir;let nextX=pos[0]+dx,nextY=pos[1]+dy;if(nextX<0||nextY<0||nextX>=m||nextY>=n||maze[nextY][nextX]===1){if(prevPos[0]==pos[0]&&prevPos[1]==pos[1])return;const j=a=>{let d=Infinity,k=j=>j%2==0?d=Math.min(d,j):0;for(let i of dirs)k([...pos,...i]);dir=[Math.cos( (a* Math.PI)/4),Math.sin((a* Math.PI)/4)];};if(Math.random()<.15){const a=dirs[Math.floor(Math.random()*4)];j(a[0]*90)}return}prevPos=pos.slice();pos=[nextX,nextY]}}

function render(){const size=2;ctx.fillStyle='black';for(let y=0;y<256;++y)for(let x=0;x<400;++x){const X=x/4,Y=y/8,c=d(Y,X);if(c.walled(X,Y)) continue;if(!c.walled(X-1,Y)||!c.walled(X+1,Y)||!c.walled(X,Y-1)||!c.walled(X,Y+1)) {const dx=c.cell(X+0.5, Y)-c.cell( X-0.5, Y), dy=c.cell( X, Y+0.5 )-c.cell( X, Y-0.5 );if(dx||dy){const len=2/Math.sqrt((x-200)/4^2 + (y-128)/4^2);ctx.fillStyle=`rgba(255,255,255,${len})`;if(len<2) ctx.fillRect(x,y,1,1)}}}}

let t=0,camX=5,camY=5,h=0;function animate(){requestAnimationFrame(animate);const size=4;ctx.fillStyle='black';for(let y=0;y<c.height;++y){const rayAngle=h + (y - c.height/2)/size;const ray=[Math.cos(rayAngle), Math.sin(rayAngle)];let d=Infinity;x=0 to c.width by 1}{if(!d) break;const X=camX+ray[0]*d,Y=camY+ray[1]*d;if(X<0||X>=m||Y<0||Y>=n) continue;if(maze[Y][X]===1){d=Math.sqrt( (camX - X)^2 + (camY - Y)^2 );const len= d * Math.cos((y - c.height/2)/size);if(len<d) {d=len;}}ctx.fillStyle=`hsl(${Math.min(d*5, 360)},100%,${d<4?95:70}%)`;if(y> camY* (n/m * size)) ctx.fillRect(x,y,1,1)}}}

let lastX=5,lastY=5;function move(){const[dx,dy]=dir;if(lastX==camX&&lastY==camY) step();else {lastX=camX;lastY=camY;camX+=dx;camY+=dy}if(camX<0||camX>=m||camY<0||camY>=n){generate();camX=5,camY=5,dir=[1,0]}}

function draw(){ctx.fillStyle='white';const scale=2;ctx.font='8px monospace';ctx.fillText( `Pos: ${(camX).toFixed(0)}, ${ (camY).toFixed(0)}  Dir: ${(dir[0]).toFixed(0)}, ${ (dir[1]).toFixed(0)}`,5,15);}

animate();
setInterval(move,33);
</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:35bERRSTATFORMAT
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>Grid Maze Raycasting</title>
    <style>
        body { margin: 0; overflow: hidden; }
        canvas { display: block; }
    </style>
</head>
<body>
    <canvas></canvas>
    <script>
        const canvas = document.querySelector("canvas");
        const ctx = canvas.getContext("2d");
        const WIDTH = canvas.width = window.innerWidth;
        const HEIGHT = canvas.height = window.innerHeight;

        let posX, posY, ang, grid, animId, cellSize = 30;
        init();
        
        function init() {
            posX = -WIDTH/2 + cellSize * 5; // Start position x
            posY = HEIGHT/2 - cellSize * 5; // Start position y
            ang = Math.PI / 2; // Starting angle (facing right)
            grid = generateMaze();
            animId = requestAnimationFrame(render);
        }

        function generateMaze() {
            const w = WIDTH / cellSize | 0, h = HEIGHT / cellSize | 0; 
            const maze = new Array(w).fill().map(() => new Array(h));

            for(let y=1; y<h-1; ++y)
                for(let x=1; x<w-1; ++x) {
                    if (Math.random() < 0.25) maze[x][y] = 1; // 25% probability of a wall
                    else maze[x][y] = 0;
                }
            return maze;
        }

        function render(t) {
            ctx.fillStyle = "#18476D"; // Dark background
            ctx.fillRect(0, 0, WIDTH, HEIGHT);
            animId = requestAnimationFrame(render);

            // Raycast from the current position and angle
            for (let x=0; x<WIDTH; ++x) {
                const rayDirX = Math.cos(ang + x * 2*Math.PI/WIDTH),
                      rayDirY = Math.sin(ang + x * 2*Math.PI/WIDTH);

                let dist = 1, hitX = -1, hitY = -1;
                // March forward until we find a wall or pass the maze's edge, while keeping track of current cell position
                do {
                    const nextX = posX + rayDirX * dist | 0,
                          nextY = posY + rayDirY * dist | 0;

                    hitX = nextX < 0 ? -1 : (nextX >= grid[0].length) ? -2 : nextX; // Hit left wall (-1), right wall (-2), or no collision
                    hitY = nextY < 0 ? -1 : (nextY >= grid.length) ? -2 : nextY; // Top(-1)/bottom(-2) walls, or no collision

                    if (hitX > -1 && hitY > -1) {
                        dist += cellSize / Math.sqrt(rayDirX * rayDirX + rayDirY * rayDirY); // Distance to the next wall
                    }
                } while ((dist < WIDTH/2 || !maze[posX+hitX][posY+hitY]) && (hitX != -1) && (hitY != -1));

                if (hitX == -2) hitX = grid[0].length; // Hit right edge, convert to a right wall
                else if(hitY == -2) hitY = grid.length;  // Hit bottom edge, convert to a top wall

                const rayLength = dist / WIDTH * HEIGHT + 1; // Correct the distance for fisheye effect
                ctx.fillStyle = (dist < WIDTH/4 ? "#07A" : "#AF3"); // Color depends on proximity
                ctx.fillRect(x, HEIGHT-rayLength, 1, rayLength);
            }

            // Update position and angle based on current cell
            const nextX = posX + Math.cos(ang) * (cellSize / 2),
                  nextY = posY + Math.sin(ang) * (cellSize / 2);
            if (!grid[nextX][nextY]) {
                posX = nextX; posY = nextY; // Move forward, but only if there's no wall in front
            }

            const cellWalls = [1, grid[posX+1][posY], grid[posX-1][posY], grid[posX][posY+1], grid[posX][posY-1]]; // Check for walls around current cell
            ang = Math.PI/2*cellWalls.indexOf(0); // Update angle to the next open direction, if any

            ctx.fillStyle = "#F50"; 
            ctx.font = "bold 18px sans-serif";
            ctx.textAlign = "center";
            ctx.fillText(`X: ${posX}, Y: ${posY}`, WIDTH - 32, HEIGHT - 4); // Display position
        }

        window.addEventListener("resize", () => { cancelAnimationFrame(animId); init(); });
    </script>
</body>
</html>
```
deepseek-r1:32bERROKFORMAT
Show code
```html
<!DOCTYPE html><html><head><title>Auto-Moving FPS Maze</title></head><body style="margin:0;overflow:hidden"><canvas id="c"></canvas><div id="info" style="position:absolute;top:10px;left:10px;color:white;background:black;padding:5px;"></div><script>
const canvas=document.getElementById('c'),ctx=canvas.getContext('2d');
let w,h,cx=2.5,cy=2.5,angle=0,gx=0,gy=0,speed=.1,maze=[],gridSize=16,step=0;
const MAX_DIST=12,COLS=800/2,ROWS=COLS*canvas.devicePixelRatio;

function init() {
  canvas.width=800;canvas.height=450;
  maze=[];let s=gridSize;
  for(let y=0;y<s;y++) {maze[y]=[];for(let x=0;x<s;x++) maze[y][x]=(y==0||y==s-1||x==0||x==s-1)?1:Math.random()<.4?1:0;}
}

function move() {
  step++;
  if(step%50==0) {
    let dir=[[1,0],[0,-1],[-1,0],[0,1]][~~(Math.random()*4)];
    if(maze[gy+dir[1]][gx+dir[0]]===0) {gy+=dir[1];gx+=dir[0];angle=Math.atan2(dir[0],dir[1]);}
  }
  let dx=Math.cos(angle)*speed,dy=-Math.sin(angle)*speed;
  cx+=dx;cy-=dy;
}

function castRay(ang) {
  let x=cx,y=cy,dist=0;
  while(dist<MAX_DIST) {
    if(maze[Math.floor(y)][Math.floor(x)]===1) return dist;
    dist+=.1;x+=Math.cos(ang)*.1;y+=-Math.sin(ang)*.1;
  }
  return MAX_DIST;
}

function draw() {
  ctx.fillStyle='#202030';ctx.fillRect(0,0,canvas.width,canvas.height);
  for(let col=0;col<COLS;col++) {
    let angle=Math.PI/2 + (col/COLS - .5)*Math.PI;
    let dist=castRay(angle);
    let scale=1/(dist*.3+1),height=scale*450,ofs=(450-height)/2,y1=ofs,y2=ofs+height;
    ctx.fillStyle=`hsl(${(1/dist*90).toFixed() + 180},70%,${(1/dist*70+30).toFixed()}%)`;
    ctx.fillRect(col*2,y1,2,height);
  }
}

function animate() {
  move();
  draw();
  ctx.fillStyle='white';ctx.font='16px monospace';
  let ang=angle+.5*(Math.PI/2);let x=Math.floor(cx),y=Math.floor(cy);
  info.innerHTML=`Pos: (${x},${y})\nAngle: ${(ang*180/Math.PI).toFixed(0)}°`;
  requestAnimationFrame(animate);
}

init();animate();
</script></body></html>
```
No usable answer reached the harness (ERR). Counted as a did-not-finish.
Outside the Brain cluster — same task, same character budget, collected through their own tooling (response times not comparable)
Claude Opus 5frontier referenceOK
Show code
<!doctype html>
<html><head><meta charset="utf-8"><title>Raycast maze walkthrough</title>
<style>
html,body{margin:0;height:100%;background:#000;overflow:hidden}
canvas{display:block;width:100vw;height:100vh}
#hud{position:fixed;left:12px;top:11px;font:13px ui-monospace,monospace;color:#ffd9a6;
background:rgba(0,0,0,.55);padding:5px 9px;border-radius:5px}
</style></head><body>
<canvas id="c"></canvas><div id="hud">pos</div>
<script>
const cv=document.getElementById('c'),g=cv.getContext('2d'),hud=document.getElementById('hud');
let W,H;
function fit(){W=cv.width=innerWidth;H=cv.height=innerHeight}
fit();addEventListener('resize',fit);

const MAP=[
 "1111111111111111",
 "1000000010000001",
 "1011110010111101",
 "1010000000100101",
 "1010111110100101",
 "1010100000100001",
 "1000100111111101",
 "1111100100000101",
 "1000000100110101",
 "1011111100010001",
 "1010000000010111",
 "1010111111010001",
 "1010100000010101",
 "1000100111000101",
 "1111100000001101",
 "1111111111111111"].map(r=>r.split('').map(Number));
const MS=MAP.length;

let px=1.5,py=1.5,dir=0,turning=0,tgt=0;
const FOV=Math.PI/3;

function wall(x,y){
  const i=Math.floor(x),j=Math.floor(y);
  if(i<0||j<0||i>=MS||j>=MS)return 1;
  return MAP[j][i];
}
function free(x,y){return !wall(x,y)}

let t0=0;
function frame(tm){
  if(!t0)t0=tm;
  const dt=Math.min(.05,(tm-(frame.last||tm))/1000);frame.last=tm;

  // Selbstaendig laufen: geradeaus, an Sackgassen/Ecken drehen.
  if(turning>0){
    const s=Math.min(turning,dt*2.2);
    dir+=tgt*s;turning-=s;
  } else {
    const nx=px+Math.cos(dir)*dt*1.7, ny=py+Math.sin(dir)*dt*1.7;
    if(free(nx+Math.cos(dir)*.25,ny+Math.sin(dir)*.25)){px=nx;py=ny}
    else{
      const left=free(px+Math.cos(dir-1.5708)*.6,py+Math.sin(dir-1.5708)*.6);
      tgt=left?-1:1;turning=1.5708;
    }
  }

  const sky=g.createLinearGradient(0,0,0,H/2);
  sky.addColorStop(0,'#0c1830');sky.addColorStop(1,'#2b3b57');
  g.fillStyle=sky;g.fillRect(0,0,W,H/2);
  const fl=g.createLinearGradient(0,H/2,0,H);
  fl.addColorStop(0,'#241d16');fl.addColorStop(1,'#0a0806');
  g.fillStyle=fl;g.fillRect(0,H/2,W,H/2);

  const COLS=Math.min(W,900);
  const cw=W/COLS;
  for(let c=0;c<COLS;c++){
    const a=dir-FOV/2+FOV*(c/COLS);
    const sx=Math.cos(a),sy=Math.sin(a);
    let d=0,hit=0,side=0;
    let x=px,y=py;
    while(d<22){
      d+=.012;
      x=px+sx*d;y=py+sy*d;
      if(wall(x,y)){
        hit=1;
        const fx=x-Math.floor(x),fy=y-Math.floor(y);
        side=(Math.min(fx,1-fx)<Math.min(fy,1-fy))?0:1;
        break;
      }
    }
    if(!hit)continue;
    const corr=d*Math.cos(a-dir);          // Fischauge herausrechnen
    const hgt=Math.min(H*3,H/corr*.86);
    const shade=Math.max(0,1-corr/13)*(side?.72:1);
    g.fillStyle='rgb('+(210*shade+8|0)+','+(150*shade+8|0)+','+(96*shade+10|0)+')';
    g.fillRect(c*cw,H/2-hgt/2,cw+1,hgt);
  }

  hud.textContent='pos '+px.toFixed(2)+', '+py.toFixed(2)
    +'  ·  heading '+((dir*180/Math.PI)%360).toFixed(0)+'°';
  requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
</script></body></html>
GPT-5.5 (Codex)frontier referenceOKMINIFIED
Show code
<!doctype html><html><head><meta charset=utf-8><title>Ray Maze</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#ddd;font:14px monospace}canvas{display:block;width:100vw;height:100vh}#h{position:fixed;left:12px;top:10px;text-shadow:0 1px 3px #000}</style></head><body><canvas id=c></canvas><div id=h></div><script>
let C=c.getContext("2d"),W,H,map,px,py,a,path=[],pi=0,seed=1,t=0,last=0;
function R(){seed=seed*1664525+1013904223|0;return(seed>>>0)/4294967296}
function gen(){seed=Date.now()|0;let n=17,m=17;map=Array.from({length:m},(_,y)=>Array.from({length:n},(_,x)=>x*y<1||x==n-1||y==m-1?1:1));let s=[[1,1]],v={"1,1":1};map[1][1]=0;while(s.length){let q=s[s.length-1],ds=[[2,0],[-2,0],[0,2],[0,-2]].sort(()=>R()-.5),ok=0;for(let d of ds){let x=q[0]+d[0],y=q[1]+d[1];if(x>0&&y>0&&x<n-1&&y<m-1&&!v[x+","+y]){v[x+","+y]=1;map[y][x]=map[q[1]+d[1]/2][q[0]+d[0]/2]=0;s.push([x,y]);ok=1;break}}if(!ok)s.pop()}let e=[n-2,m-2];map[e[1]][e[0]]=0;path=[[1.5,1.5]];let q=[[1,1]],pre={"1,1":""},dirs=[[1,0],[-1,0],[0,1],[0,-1]];while(q.length){let p=q.shift();if(p[0]==e[0]&&p[1]==e[1])break;for(let d of dirs){let x=p[0]+d[0],y=p[1]+d[1],k=x+","+y;if(!map[y]?.[x]&&!(k in pre)){pre[k]=p[0]+","+p[1];q.push([x,y])}}}let cur=e.join(",");let rev=[];while(cur){let z=cur.split(",").map(Number);rev.push([z[0]+.5,z[1]+.5]);cur=pre[cur]}path=rev.reverse();px=path[0][0];py=path[0][1];pi=1;a=Math.atan2(path[1][1]-py,path[1][0]-px)}
function hit(ang){let dx=Math.cos(ang),dy=Math.sin(ang),x=px,y=py,ix=x|0,iy=y|0,ddx=Math.abs(1/dx),ddy=Math.abs(1/dy),sx=dx<0?-1:1,sy=dy<0?-1:1,sdx=dx<0?(x-ix)*ddx:(ix+1-x)*ddx,sdy=dy<0?(y-iy)*ddy:(iy+1-y)*ddy,side=0,d=0;for(let i=0;i<64;i++){if(sdx<sdy){d=sdx;sdx+=ddx;ix+=sx;side=0}else{d=sdy;sdy+=ddy;iy+=sy;side=1}if(map[iy]?.[ix])return[d,side]}return[64,0]}
function frame(ms){requestAnimationFrame(frame);if(!last)last=ms;let dt=Math.min((ms-last)/1e3,.05);last=ms;t+=dt;if(pi>=path.length){gen();return}let g=path[pi],dx=g[0]-px,dy=g[1]-py,dist=Math.hypot(dx,dy);if(dist<.04){pi++;return}let ta=Math.atan2(dy,dx),da=Math.atan2(Math.sin(ta-a),Math.cos(ta-a));a+=da*Math.min(1,dt*5);let sp=1.8*dt;px+=Math.cos(ta)*Math.min(sp,dist);py+=Math.sin(ta)*Math.min(sp,dist);draw()}
function draw(){let w=c.width=innerWidth,h=c.height=innerHeight;C.fillStyle="#151820";C.fillRect(0,0,w,h/2);C.fillStyle="#252118";C.fillRect(0,h/2,w,h/2);let f=Math.PI/3;for(let x=0;x<w;x++){let ra=a-f/2+f*x/w,res=hit(ra),d=res[0]*Math.cos(ra-a),sh=Math.max(0,210-d*22)*(res[1]?.78:1),lh=Math.min(h,h/d),y=(h-lh)/2;C.fillStyle=`rgb(${sh},${sh*.85},${sh*.6})`;C.fillRect(x,y,1,lh)}C.strokeStyle="#0008";C.lineWidth=2;C.strokeRect(0,0,w,h);h0.textContent=""}
let h0=document.getElementById("h");function hud(){h0.textContent=`x ${px.toFixed(2)} y ${py.toFixed(2)} heading ${((a*180/Math.PI%360+360)%360).toFixed(0)} deg`;requestAnimationFrame(hud)}
gen();addEventListener("resize",draw);requestAnimationFrame(frame);hud();
</script></body></html>
Claude Sonnet 5frontier referenceOK
Show code
<!DOCTYPE html><html><head><meta charset="utf8"><title>Raycast Maze</title><style>html,body{margin:0;background:#000;overflow:hidden}canvas{display:block}</style></head><body><canvas id="c"></canvas><script>
const cv=document.getElementById('c'),ctx=cv.getContext('2d');
let W,H;function resize(){W=cv.width=innerWidth;H=cv.height=innerHeight;}resize();addEventListener('resize',resize);
let map,mw,mh,cx,cy,dir,t,ang,targAng,steps,dirs=[[1,0],[0,1],[-1,0],[0,-1]];
function genMaze(w,h){
  let g=[];for(let y=0;y<h;y++){g.push(new Array(w).fill(1));}
  function carve(x,y){g[y][x]=0;
    let dd=[[2,0],[-2,0],[0,2],[0,-2]];
    for(let i=dd.length-1;i>0;i--){let j=Math.floor(Math.random()*(i+1));[dd[i],dd[j]]=[dd[j],dd[i]];}
    for(const p of dd){let nx=x+p[0],ny=y+p[1];
      if(nx>0&&nx<w-1&&ny>0&&ny<h-1&&g[ny][nx]==1){g[y+p[1]/2][x+p[0]/2]=0;carve(nx,ny);}
    }
  }
  carve(1,1);
  return g;
}
function isOpen(x,y){return x>=0&&y>=0&&x<mw&&y<mh&&map[y][x]==0;}
function openDirs(x,y,exclude){let r=[];for(let i=0;i<4;i++){if(i==exclude)continue;let nx=x+dirs[i][0],ny=y+dirs[i][1];if(isOpen(nx,ny))r.push(i);}return r;}
function init(){
  mw=15;mh=15;map=genMaze(mw,mh);
  cx=1;cy=1;t=0;
  let od=openDirs(cx,cy,-1);
  dir=od[Math.floor(Math.random()*od.length)];
  ang=targAng=Math.atan2(dirs[dir][1],dirs[dir][0]);
  steps=0;
}
init();
function pickDir(){
  let back=(dir+2)%4;
  let od=openDirs(cx,cy,back);
  if(od.length==0){od=openDirs(cx,cy,-1);}
  if(od.includes(dir)&&Math.random()<0.6){return dir;}
  return od[Math.floor(Math.random()*od.length)];
}
let last=performance.now();
function frame(now){
  let dt=Math.min((now-last)/1000,0.05);last=now;
  let speed=1.6;
  t+=speed*dt;
  if(t>=1){
    t-=1;cx+=dirs[dir][0];cy+=dirs[dir][1];steps++;
    dir=pickDir();
    targAng=Math.atan2(dirs[dir][1],dirs[dir][0]);
    if(targAng-ang>Math.PI)targAng-=2*Math.PI;
    if(targAng-ang<-Math.PI)targAng+=2*Math.PI;
  }
  ang+=(targAng-ang)*Math.min(dt*6,1);
  let px=cx+0.5+dirs[dir][0]*t,py=cy+0.5+dirs[dir][1]*t;
  ctx.fillStyle='#333';ctx.fillRect(0,0,W,H/2);
  ctx.fillStyle='#111';ctx.fillRect(0,H/2,W,H/2);
  let fov=Math.PI/3;
  for(let i=0;i<W;i++){
    let ra=ang-fov/2+(i/W)*fov;
    let rdx=Math.cos(ra),rdy=Math.sin(ra);
    let mapX=Math.floor(px),mapY=Math.floor(py);
    let dDX=Math.abs(1/rdx),dDY=Math.abs(1/rdy);
    let stepX,stepY,sideX,sideY;
    if(rdx<0){stepX=-1;sideX=(px-mapX)*dDX;}else{stepX=1;sideX=(mapX+1-px)*dDX;}
    if(rdy<0){stepY=-1;sideY=(py-mapY)*dDY;}else{stepY=1;sideY=(mapY+1-py)*dDY;}
    let side=0;
    for(let k=0;k<64;k++){
      if(sideX<sideY){sideX+=dDX;mapX+=stepX;side=0;}else{sideY+=dDY;mapY+=stepY;side=1;}
      if(mapX<0||mapY<0||mapX>=mw||mapY>=mh||map[mapY][mapX]==1)break;
    }
    let dist=side==0?(sideX-dDX):(sideY-dDY);
    let corr=Math.max(0.01,dist*Math.cos(ra-ang));
    let lh=Math.min(H*3,H/corr);
    let shade=Math.max(0,255-corr*40-side*40);
    ctx.fillStyle='rgb('+(shade*0.3|0)+','+(shade*0.6|0)+','+(shade|0)+')';
    ctx.fillRect(i,(H-lh)/2,1,lh);
  }
  ctx.fillStyle='#0f0';ctx.font='16px monospace';
  ctx.fillText('pos ('+px.toFixed(2)+', '+py.toFixed(2)+')  heading '+((ang*180/Math.PI)|0)+'°',10,24);
  if(steps>200){init();}
  requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
</script></body></html>
Claude Haiku 4.5frontier referenceOKMINIFIED
Show code
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{margin:0;background:#000;overflow:hidden}#c{display:block}#i{position:absolute;top:5px;left:5px;color:#0f0;font-family:monospace;font-size:12px}</style></head><body><canvas id="c"></canvas><div id="i"></div><script>const c=document.getElementById('c'),ctx=c.getContext('2d'),i=document.getElementById('i');c.width=800;c.height=600;const mz=[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]];let cx=1.5,cy=1.5,a=0;function dr(){ctx.fillStyle='#111';ctx.fillRect(0,0,800,600);let fov=Math.PI/3;let dx=Math.cos(a),dy=Math.sin(a);for(let col=0;col<800;col++){let ang=a-fov/2+fov*col/800;let rdx=Math.cos(ang),rdy=Math.sin(ang);let dist=1e9;for(let s=0;s<100;s+=0.1){let rx=cx+rdx*s,ry=cy+rdy*s;let mx=Math.floor(rx),my=Math.floor(ry);if(mx<0||mx>=5||my<0||my>=5||mz[my][mx]){dist=s;break}}let c_dist=dist*Math.cos(ang-a);let h=Math.max(10,600/Math.max(0.5,c_dist));let br=Math.max(30,255*(1-c_dist/10));ctx.fillStyle=`rgb(${br},${br},${br})`;ctx.fillRect(col,300-h/2,1,h)}let ck=Math.max(0,Math.min(4,Math.floor(cx)));let lk=Math.max(0,Math.min(4,Math.floor(cy)));let cn=0;for(let dx=-1;dx<=1;dx++){for(let dy=-1;dy<=1;dy++){if(mz[lk+dy]&&!mz[lk+dy][ck+dx])cn++}}if(cn>2&&Math.random()<0.02){a+=Math.PI/2}let sp=0.02;cx+=Math.cos(a)*sp;cy+=Math.sin(a)*sp;let wmx=Math.floor(cx),wmy=Math.floor(cy);if(wmx<0||wmx>=5||wmy<0||wmy>=5||mz[wmy][wmx]){cx-=Math.cos(a)*sp;cy-=Math.sin(a)*sp;a+=Math.PI/4}i.textContent=`Pos: (${cx.toFixed(1)},${cy.toFixed(1)}) Ang: ${(a*180/Math.PI).toFixed(0)}°`}setInterval(dr,50);</script></body></html>
Results at a glance— every model in this round with score, response time and status.

Who wrote what

ModelBlind scoreLatencyStatus
qwen3-coder:30b —38.7 sOK
qwen3.5:9b —67.0 sOK
llama3.1:8b —116.4 sOK
mistral-small:24b —195.4 sOK
gemma4:26b ——harness
qwen3:14b —71.7 sOK
deepseek-r1:14b —133.5 sOK
qwen3:8b ——harness
command-r:35b —279.8 sOK
deepseek-r1:32b —68.6 sOK
qwq:32b ——DNF