R80 · Aggregation by continuous drift
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 particles clustering by CONTINUOUS MOVEMENT on a <canvas>. A seed sits in the middle; 800 particles with floating-point positions drift under Brownian motion plus a weak pull towards the centre, and stick permanently when they come within one radius of the cluster, growing a branching structure. No grid, no cells — continuous coordinates only. Show the number of stuck particles 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
Show code
<!DOCTYPE html>
<html><body><canvas id="c"></canvas><script>const canvas = document.getElementById('c');const ctx = canvas.getContext('2d');let W=window.innerWidth;let H=window.innerHeight;canvas.width=W;canvas.height=H;const N=800;const STICK_RADIUS=5;const DT=0.98;const CENTER={x:W/2,y:H/2};let particles=[];let stuckCount=0;function init(){particles=[];stuckCount=0;for(let i=0;i<N;i++){particles.push({x:(Math.random()*W),y:(Math.random()*H),vx:(Math.random()-0.5)*0.5,vy:(Math.random()-0.5)*0.5,stuck:false});}requestAnimationFrame(loop)}function update(){for(let i=0;i<N;i++){const p=particles[i];if(!p.stuck){const dx=CENTER.x-p.x;const dy=CENTER.y-p.y;const distSq=dx*dx+dy*dy;const pullForce=1/(distSq+500);p.vx+=dx*pullForce*0.005;p.vy+=dy*pullForce*0.005;}p.vx*=DT;p.vy*=DT;p.x+=p.vx;p.y+=p.vy;const targetDist=(Math.hypot(CENTER.x-p.x,CENTER.y-p.y));if(targetDist<STICK_RADIUS*2){p.stuck=true;p.vx=0;p.vy=0;stuckCount++;}else{p.stuck=false;}}const clusterRadius=Math.max(1,Math.sqrt(particles.filter(p=>p.stuck).reduce((sum, p)=>sum+p.x*p.x,0)/N)*W);return Math.min(250,clusterRadius*1.2)}function draw(radius){ctx.fillStyle='black';ctx.fillRect(0,0,W,H);for(let p of particles){if(!p.stuck){ctx.globalAlpha=0.3;ctx.beginPath();ctx.arc(p.x,p.y,1.5,0,2*Math.PI);ctx.fill();}else{ctx.fillStyle='rgba(100,200,255,0.8)';ctx.beginPath();ctx.arc(p.x,p.y,2,0,2*Math.PI);ctx.fill();}}ctx.globalAlpha=1;ctx.fillStyle='#333';ctx.font='16px Arial';ctx.fillText(`Stuck: ${stuckCount}/${N}`,10,30);ctx.fillText(`Radius: ${radius.toFixed(1)}`,10,55);update();}function loop(){requestAnimationFrame(loop);update();draw(Math.hypot(...particles.filter(p=>p.stuck).map(p=>[p.x-CENTER.x, p.y-CENTER.y]))));}window.addEventListener('resize',()=>({W:window.innerWidth,H:window.innerHeight,canvas.width=W,canvas.height=H,init(),loop()}));init();</script></body></html>Show code
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;flex-direction:column;align-items:center;background:black;">
<canvas id=c width=800 height=800></canvas>
<div id=i style="color:white;font-size:14px;"></div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
let i=document.getElementById('i');
let w=h=800;
let particles=[],cluster=[],maxStuck=0,stickCount=0,radius=0;
class Particle{
constructor(seed=false){
this.x=Math.random()*w;
this.y=Math.random()*h;
if(!seed){
this.x=w/2+10,this.y=h/2+10;
return;
}
this.r=3;
this.dx=(Math.random()-0.5)*0.1;
this.dy=(Math.random()-0.5)*0.1;
}
update(){
if(!this.seed){
let dx=this.x - w/2, dy=this.y - h/2;
let dist=Math.hypot(dx,dy);
if(dist < radius+this.r && Math.abs(this.r-3)<1){
this.stuck=true;
stickCount++;
maxStuck=Math.max(maxStuck,dist);
return;
}
this.x += (Math.random()-0.5)*0.02;
this.y += (Math.random()-0.5)*0.02;
if(dist>100) this.x=w/2+this.dx*0.1,this.y=h/2+this.dy*0.1;
}
}
}
function drawParticles(){
ctx.beginPath();
for(let p of particles){
if(p.stuck){
ctx.fillStyle='hsl(140,90%,50%)';
ctx.fillRect(p.x-1,p.y-1,2,2);
continue;
}
ctx.fillStyle='#fff';
ctx.beginPath();
ctx.arc(p.x,p.y,2,0,Math.PI*2);
ctx.fill();
}
}
function drawCluster(){
ctx.strokeStyle='hsl(140,90%,50%)';
for(let i=0;i<cluster.length-1;i++){
let a=cluster[i],b=cluster[i+1];
ctx.beginPath();
ctx.moveTo(a.x,a.y);
ctx.lineTo(b.x,b.y);
ctx.stroke();
}
}
function anim(){
ctx.fillStyle='black';
ctx.fillRect(0,0,w,h);
particles.forEach(p => p.update());
cluster.unshift({x:w/2,y:h/2});
if(stickCount>0){
radius=(maxStuck/10+radius*9/10)/1;
i.textContent=`Cluster: ${stickCount} | Radius: ${(radius).toFixed(1)}`;
}
drawParticles();
drawCluster();
ctx.fillStyle='red';
ctx.beginPath();
ctx.arc(w/2,h/2,3,0,Math.PI*2);
ctx.fill();
if(!stickCount%500){
setTimeout(()=>{
particles=Array.from({length:800}, (_,i)=>new Particle(i));
stickCount=maxStuck=radius=0;
cluster=[];
},1);
}
requestAnimationFrame(anim);
}
particles = Array.from({length:800}, (_,i)=>new Particle(i));
cluster = [{x:w/2,y:h/2}];
anim();
</script>
</body></html>
```Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particle Cluster Simulation</title>
<style>body {margin: 0; overflow: hidden;} canvas {display: block; background: #111;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
function init() {
W = H = window.innerWidth < 800 ? window.innerWidth : 800;
canvas.width = W;
canvas.height = H;
particles = [];
stuckParticles = [];
seed = {x: W / 2, y: H / 2};
const N_PARTICLES = 800;
const STICK_RADIUS = 15;
const DRAG = 0.985;
for (let i = 0; i < N_PARTICLES; i++) {
particles.push({
x: Math.random() * W,
y: Math.random() * H,
vx: (Math.random() - 0.5) * 2,
vy: (Math.random() - 0.5) * 2,
stuck: false
});
}
stuckParticles = [];
}
// Global state management for the simulation loop
let particles;
let seed;
const STICK_RADIUS = 15;
const DRAG = 0.985;
const ATTRACTION_STRENGTH = 0.005;
const BROWNIAN_FORCE = 0.2;
function updateParticles() {
for (let i = 0; i < particles.length; i++) {
const p = particles[i];
if (!p.stuck) {
// 1. Brownian Motion (Random Force)
p.vx += ((Math.random() - 0.5) * BROWNIAN_FORCE);
p.vy += ((Math.random() - 0.5) * BROWNIAN_FORCE);
// 2. Central Pull (Attraction)
const dx = seed.x - p.x;
const dy = seed.y - p.y;
const distSq = dx * dx + dy * dy;
p.vx += dx * ATTRACTION_STRENGTH / Math.sqrt(distSq + 1);
p.vy += dy * ATTRACTION_STRENGTH / Math.sqrt(distSq + 1);
// Apply drag and move
p.vx *= DRAG;
p.vy *= DRAG;
p.x += p.vx;
p.y += p.vy;
// Boundary check (wrap or bounce)
if (p.x < 0 || p.x > W) { p.vx *= -1; p.x = Math.max(Math.min(p.x, W), Math.min(p.x, W)); }
if (p.y < 0 || p.y > H) { p.vy *= -1; p.y = Math.max(Math.min(p.y, H), Math.min(p.y, H)); }
// 3. Clustering/Sticking Check
let isNearCluster = false;
for (const s of stuckParticles) {
const dx_s = p.x - s.x;
const dy_s = p.y - s.y;
if (dx_s * dx_s + dy_s * dy_s < STICK_RADIUS * STICK_RADIUS) {
isNearCluster = true;
break;
}
}
if (isNearCluster && !p.stuck) {
p.stuck = true;
stuckParticles.push({x: p.x, y: p.y});
}
}
}
}
function draw() {
ctx.clearRect(0, 0, W, H);
// Draw stuck particles (the cluster)
for (const s of stuckParticles) {
ctx.fillStyle = '#3a9b4c';
ctx.beginPath();
ctx.arc(s.x, s.y, 1 + Math.random() * 0.5, 0, Math.PI * 2);
ctx.fill();
}
// Draw moving particles
for (const p of particles) {
ctx.fillStyle = p.stuck ? '#3a9b4c' : '#8fa8ff';
ctx.beginPath();
ctx.arc(p.x, p.y, 1, 0, Math.PI * 2);
ctx.fill();
}
// Display stats
const stuckCount = stuckParticles.length;
let minX = W, maxX = 0, minY = H, maxY = 0;
if (stuckCount > 0) {
for(const s of stuckParticles) {
minX = Math.min(minX, s.x); maxX = Math.max(maxX, s.x);
minY = Math.min(minY, s.y); maxY = Math.max(maxY, s.y);
}
}
const clusterWidth = (maxX - minX) || 0;
const clusterHeight = (maxY - minY) || 0;
const clusterRadius = Math.sqrt(clusterWidth * clusterWidth + clusterHeight * clusterHeight) / 2;
ctx.fillStyle = 'rgba(255, 255, 255, 0.8)';
ctx.font = '14px monospace';
ctx.fillText(`Stuck Particles: ${stuckCount} / 800`, 10, 20);
ctx.fillText(`Cluster Radius: ${clusterRadius.toFixed(1)}`, 10, 40);
}
function animate() {
updateParticles();
draw();
requestAnimationFrame(animate);
}
window.addEventListener('resize', init);
init();
animate();
</script>
</body>
</html>
```Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particle Clustering</title>
<style>
canvas { border: 1px solid black; }
#info { position: absolute; top: 10px; left: 10px; color: white; background: rgba(0, 0, 0, 0.5); padding: 5px; }
</style>
</head>
<body style="margin: 0;">
<canvas id="clusterCanvas" width="800" height="600"></canvas>
<div id="info">Stuck Particles: 0<br>Cluster Radius: 0.0</div>
<script>
const canvas = document.getElementById('clusterCanvas');
const ctx = canvas.getContext('2d');
const info = document.getElementById('info');
let stuckParticles = 0;
let clusterRadius = 0;
class Particle {
constructor(x, y) {
this.x = x;
this.y = y;
this.rx = Math.random() - 0.5;
this.ry = Math.random() - 0.5;
this.stuck = false;
}
update() {
if (!this.stuck) {
const dx = this.seedX - this.x;
const dy = this.seedY - this.y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 10) {
this.stuck = true;
stuckParticles++;
clusterRadius = Math.max(clusterRadius, dist);
} else {
this.x += this.rx * 0.5 - dx * 0.01;
this.y += this.ry * 0.5 - dy * 0.01;
this.rx *= 0.98;
this.ry *= 0.98;
}
}
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, 2, 0, Math.PI * 2);
ctx.fillStyle = this.stuck ? 'red' : 'blue';
ctx.fill();
}
}
const particles = [];
const seedX = canvas.width / 2;
const seedY = canvas.height / 2;
for (let i = 0; i < 800; i++) {
particles.push(new Particle(Math.random() * canvas.width, Math.random() * canvas.height));
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let particle of particles) {
particle.update();
particle.draw();
}
info.innerHTML = `Stuck Particles: ${stuckParticles}<br>Cluster Radius: ${clusterRadius.toFixed(1)}`;
if (stuckParticles === 800) {
setTimeout(() => {
location.reload();
}, 2000);
return;
}
requestAnimationFrame(animate);
}
animate();
function drawSeed() {
ctx.beginPath();
ctx.arc(seedX, seedY, 5, 0, Math.PI * 2);
ctx.fillStyle = 'yellow';
ctx.fill();
}
setInterval(drawSeed, 16);
</script>
</body>
</html>
```Show code
```html
<!DOCTYPE html>
<html>
<head>
<title>Clustering Simulation</title>
<style>body {margin:0;overflow:hidden;background:#111;}canvas {display:block;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
let particles = [];
let stuckCount = 0;
function setup() {
W = H = window.innerWidth * 0.95;
canvas.width = W;
canvas.height = H;
particles = [];
stuckCount = 0;
}
function Particle(x, y) {
this.x = x;
this.y = y;
this.vx = (Math.random() - 0.5) * 0.5;
this.vy = (Math.random() - 0.5) * 0.5;
this.stuck = false;
}
Particle.prototype.update = function(center, radius) {
if (this.stuck) return;
// Brownian motion
this.vx += (Math.random() - 0.5) * 0.2;
this.vy += (Math.random() - 0.5) * 0.2;
// Weak pull towards center (0, 0)
const dx = center[0] - this.x;
const dy = center[1] - this.y;
const distSq = dx * dx + dy * dy;
const forceStrength = 0.005 / Math.max(distSq, 1);
this.vx += dx * forceStrength;
this.vy += dy * forceStrength;
// Dampening and movement
this.vx *= 0.98;
this.vy *= 0.98;
this.x += this.vx;
this.y += this.vy;
// Boundary check (simple bounce)
if (this.x < 0 || this.x > W) { this.vx *= -1; this.x = Math.max(0, Math.min(W, this.x)); }
if (this.y < 0 || this.y > H) { this.vy *= -1; this.y = Math.max(0, Math.min(H, this.y)); }
// Clustering check
const distToCenter = Math.sqrt(dx * dx + dy * dy);
if (distToCenter < radius * 2) { // Note: Using 2*R to allow for a slightly larger initial pull area
this.stuck = true;
stuckCount++;
this.vx = 0; this.vy = 0;
}
};
Particle.prototype.draw = function() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.stuck ? 1.5 : 1, 0, Math.PI * 2);
ctx.fillStyle = this.stuck ? '#66ccff' : '#aaddff';
ctx.fill();
};
function init() {
setup();
const center = [W / 2, H / 2];
for (let i = 0; i < 800; i++) {
particles.push(new Particle(Math.random() * W, Math.random() * H));
}
requestAnimationFrame(animate);
}
function animate() {
ctx.fillStyle = 'rgba(17, 17, 17, 0.5)'; // Trail effect
ctx.fillRect(0, 0, W, H);
const center = [W / 2, H / 2];
const clusterRadius = 20; // The effective radius for sticking (visual feedback)
particles.forEach(p => {
p.update(center, clusterRadius);
p.draw();
});
// Stats display
ctx.fillStyle = 'white';
ctx.font = '14px monospace';
ctx.fillText(`Stuck Particles: ${stuckCount} / 800`, 20, 30);
ctx.fillText(`Cluster Radius: ${Math.sqrt(particles.filter(p => p.stuck).map(p => Math.pow(p.x - W/2, 2) + Math.pow(p.y - H/2, 2))).reduce((a, b) => a + b, 0) / stuckCount || 1)**.5:.1f}`, 320, 30);
requestAnimationFrame(animate);
}
window.addEventListener('resize', () => {
setup();
});
init();
</script>
</body>
</html>
```Show code
```html
<!DOCTYPE html>
<html><head><title>Particle Clustering</title></head><body style="margin:0;display:flex;justify-content:center;background:black;">
<canvas id="c"></canvas>
<script>
let c=document.getElementById("c"),ctx=c.getContext("2d")
c.width=800,c.height=800
let running=true,particles=[],seedX=400,seedY=400,stuck=0,radius=1,mass=1
function init(){
stuck=mass=radius=1
particles=[{x:400,y:400,attached:true}]
for(let i=1;i<800;i++)particles.push({x:Math.random()*800,y:Math.random()*800,attached:false})
running=true
}
function draw(){
if(!running)return
ctx.fillStyle="#000",ctx.fillRect(0,0,800,800)
// Draw cluster
let gradient=ctx.createRadialGradient(seedX,seedY,radius*0.9,seedX,seedY,2*radius)
gradient.addColorStop(0,"#369"),gradient.addColorStop(1,"#135")
ctx.fillStyle=gradient
ctx.beginPath()
ctx.arc(seedX,seedY,radius+mass/400,0,Math.PI*2)
ctx.fill()
// Draw attached particles
ctx.fillStyle="#ff0"
for(let p of particles.filter(p=>p.attached))ctx.fillRect(p.x-2,p.y-2,4,4)
// Draw free particles
ctx.fillStyle="#fff"
for(let p of particles.filter(p=>!p.attached))ctx.fillRect(p.x-1,p.y-1,2,2)
// Text overlay
ctx.fillStyle="#fff"
ctx.font="16px monospace"
ctx.fillText(`Stuck: ${stuck} / 800`,10,30)
ctx.fillText(`Radius: ${radius.toFixed(1)}`,10,50)
requestAnimationFrame(draw)
}
function update(){
if(!running)return
for(let p of particles.filter(p=>!p.attached)){
// Brownian motion
let dx=Math.random()-0.5,dy=Math.random()-0.5
// Weak pull towards center
dx-=((p.x - seedX)*mass)/1e4
dy-=((p.y - seedY)*mass)/1e4
p.x+=dx*2
p.y+=dy*2
// Check boundaries
if(p.x<0)p.x=0
if(p.x>799)p.x=799
if(p.y<0)p.y=0
if(p.y>799)p.y=799
// Check attachment
let dx2=p.x-seedX,dy2=p.y-seedY,dist=Math.sqrt(dx2*dx2+dy2*dy2)
if(dist<radius){
p.attached=true
stuck++
radius=Math.min(350,Math.pow(stuck/800,1/3)*400)
mass=stuck*2.5
}
}
// Check completion
if(stuck>=800)running=false
requestAnimationFrame(update)
}
init()
draw()
update()
// Auto-restart when finished (just show text)
window.onload=function(){
init(),draw(),update()
}
</script></body></html>
```Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particle Clustering</title>
<script>
const canvas = document.getElementById("myCanvas");
const ctx = canvas.getContext("2d");
let clusterRadius = 0;
let stuckParticles = 0;
let particles = [];
function init() {
for (let i = 0; i < 800; i++) {
createParticle();
}
animate();
}
function createParticle(x = Math.random(), y = Math.random()) {
const radius = 1 + 2 * Math.random();
particles.push({
x: canvas.width / 2,
y: canvas.height / 2,
vx: (Math.random() - 0.5) * 0.2,
vy: (Math.random() - 0.5) * 0.2,
radius
});
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (const particle of particles) {
const dx = Math.abs(particle.x - canvas.width / 2);
const dy = Math.abs(particle.y - canvas.height / 2);
if (dx < clusterRadius || dy < clusterRadius) {
createParticle();
stuckParticles++;
particle.radius = 0;
} else {
const forceX = (canvas.width / 2 - particle.x) * 0.01 + particle.vx;
const forceY = (canvas.height / 2 - particle.y) * 0.01 + particle.vy;
particle.vx += forceX * 0.05;
particle.vy += forceY * 0.05;
if (!isNaN(particle.radius)) {
ctx.beginPath();
ctx.arc(particle.x, particle.y, particle.radius, 0, Math.PI * 2);
ctx.fillStyle = '#00FF00';
ctx.fill();
ctx.closePath();
}
particle.x += particle.vx;
particle.y += particle.vy;
}
if (clusterRadius < canvas.height / 2) {
clusterRadius++;
}
}
requestAnimationFrame(animate);
}
init();
</script>
</head>
<body onload="init()">
<h1>Particle Clustering</h1>
<canvas id="myCanvas" width="800" height="600"></canvas>
<p>Stuck Particles: <span id="stuckParticles">0</span></p>
<p>Cluster Radius: <span id="clusterRadius">0.0</span>px</p>
</body>
</html>
```Show code
<think> Alright, I need to create an HTML file that simulates particles clustering. Let me start by understanding the requirements. The user wants a self-contained HTML file, so everything—HTML, CSS, JavaScript—must be in one file. The max line limit is 120, so I have to keep it concise. First, the structure. The HTML should have a canvas element and a script. The canvas will be used to draw the particles and the cluster. The script will handle the animation loop using requestAnimationFrame, which is essential for smooth animation. Since there's no user input, the simulation should start automatically and restart when done. The simulation parameters: 800 particles. Each particle starts with random velocities? Or maybe they start at random positions? Hmm. The problem says "drift under Brownian motion plus a weak pull towards the centre." Brownian motion means random movements, so each particle has a random direction and maybe some noise added each frame. The pull towards the center is a force that attracts them back. When they come within the cluster's radius (which grows as particles stick), they "stick," meaning they stop moving and become part of the cluster. Wait, the cluster starts with a seed in the middle. The cluster radius starts at zero? Or maybe the seed is a single point. When a particle comes within one radius, it sticks. Wait, the problem says "within one radius of the cluster," so maybe initially the cluster radius is 1 when the first particle sticks? Hmm, need to clarify. Probably, the cluster's radius grows each time a particle sticks to it. Each new particle adds to the radius, so the cluster expands as particles stick. The radius is the maximum distance of any stuck particle from the center, perhaps? Let me think of the data structures. Each particle has position (x,y), velocity (vx, vy), and a boolean indicating if it's stuck. The cluster has a radius (current maximum distance from center), and a count of stuck particles. Initialization: start with all particles at random positions around the center? Or are they spread out? The problem says "drift under Brownian motion," so they start at random positions maybe? Alternatively, perhaps they start near the center but then move away? Wait, maybe the initial positions are random, and they are pulled back. The seed is at the center (0,0) or (canvasWidth/2, canvasHeight/2). The center is the starting point. Wait, the problem says "a seed sits in the middle." So the cluster starts at the center. The first particle that comes within the cluster's radius (initially 1?) will stick. Wait, but the seed is the center. Maybe the cluster's radius starts at 0, and when a particle comes within 1 unit (radius), it sticks, then the radius expands. Or perhaps the cluster radius is the maximum distance from the center of any stuck particle. So when a particle sticks, the radius is updated to be the maximum of the current radius and the distance from the center plus the particle's radius? Wait, the problem says "when they come within one radius of the cluster." Hmm, maybe the cluster has a radius, and particles within 1 radius (unit) of the cluster's edge can stick? Or maybe the particles have their own radius, but the problem mentions "one radius," so probably the sticking condition is when the distance between a free particle and the cluster's center is less than or equal to the current cluster radius plus 1? Not sure. The problem states "stick permanently when they come within one radius of the cluster." Maybe the cluster's radius is the maximum distance of any stuck particle from the center, and a free particle sticks if its distance from the center is less than (clusterRadius + 1). Then each stuck particle adds to the cluster's radius. Alternatively, maybe the cluster starts as a point (radius 0), and when a particle comes within 1 unit from the center, it sticks, so the cluster's radius becomes 1 plus the distance? Wait, perhaps it's simpler: each time a particle sticks, the cluster's radius is the maximum of its current radius and the distance from the center of the new particle plus 1? Hmm. Alternatively, maybe each particle that sticks increases the cluster's radius by 1. But that might be too simplistic. The problem says "branching structure," so perhaps the radius is the maximum distance of any stuck particle from the center. The sticking condition is when a free particle comes within (current radius + 1). Because when a particle is within 1 unit of the cluster's radius, it can stick. Wait, the wording is: "come within one radius of the cluster". Maybe the radius is the current cluster's radius, and particles within that radius can stick? That might not make sense. Maybe the radius is the distance from the center, and the particle must come within 1 unit of the current cluster's radius? Not sure. Let me think again. The problem says: "stick permanently when they come within one radius of the cluster". The "radius" here might refer to the cluster's current radius. So, when a particle is within a distance equal to (current cluster radius + 1) units from the center? Or within (current cluster radius) units? The wording is ambiguous. Hmm. Alternatively, perhaps the cluster starts as radius 0. Each particle that sticks adds 1 to the radius. Wait, but that might not make a branching structure. Maybe the cluster's radius is the maximum distance from the center of any stuck particle. So, when a free particle comes within the cluster's current radius plus 1, it sticks, and then the cluster radius is updated to the maximum between previous radius and (distance of the new particle from center). That way, the radius expands as particles are added. Alternatively, perhaps "one radius" is a unit of 1, so any particle within the current cluster's radius plus 1? Hmm, I might have to proceed with a possible interpretation and see. Let me outline the steps: 1. Set up canvas: center at (250, 250) if it's 500x500. 2. Initialize 800 particles. Each has: - x and y coordinates (maybe starting randomly around the center? Or spread out?) - velocity (vx, vy) initialized randomly for Brownian motion? - a flag isStuck. - maybe a radius, but the problem says particles have a radius? Or maybe they are points. The problem mentions "one radius", so perhaps each particle has a radius of 1? Or the distance is checked as less than 1 unit. Wait, the problem says "when they come within one radius of the cluster". Maybe each particle has a radius of 1, so the distance between the particle and the cluster's edge must be less than or equal to 1? Alternatively, the cluster has a radius, and particles within that radius can stick. But the wording is "come within one radius of the cluster". Maybe the cluster's radius is R, and particles within R + 1 can stick. But this is unclear. Since the problem says "branching structure", perhaps when a particle comes within the current cluster radius, it sticks and becomes part of the cluster, increasing the cluster's radius. Let me proceed with the following approach: - The cluster starts at the center (250, 250), and initially has radius 0. - Each free particle moves under Brownian motion plus a small pull towards the center. - When a free particle's distance from the center is less than (current cluster radius + 1), it sticks. - When a particle sticks, the cluster's radius is
Show code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Continuous DLA</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#08090d;color:#e9eef8;font:14px system-ui}
canvas{display:block;width:100vw;height:100vh}
#hud{position:fixed;left:14px;top:12px;padding:8px 10px;background:#111827cc;border:1px solid #263245;border-radius:6px}
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="hud"></div>
<script>
const canvas=document.getElementById("c"),ctx=canvas.getContext("2d"),hud=document.getElementById("hud");
let W,H,cx,cy,parts,stuck,rad,doneAt;
const N=800,r=2,rr=(r*2)*(r*2);
function resize(){W=canvas.width=innerWidth*devicePixelRatio;H=canvas.height=innerHeight*devicePixelRatio;ctx.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0)}
addEventListener("resize",resize);
function reset(){
resize();cx=innerWidth/2;cy=innerHeight/2;parts=[];stuck=[{x:cx,y:cy}];rad=r;doneAt=0;
let spawn=Math.min(innerWidth,innerHeight)*.45;
for(let i=0;i<N;i++){
let a=Math.random()*Math.PI*2,d=spawn*(.45+.55*Math.random());
parts.push({x:cx+Math.cos(a)*d,y:cy+Math.sin(a)*d,s:false});
}}
function step(){
let live=0,maxD=rad+75,kill=Math.hypot(innerWidth,innerHeight);
for(const p of parts){
if(p.s)continue;live++;
let dx=cx-p.x,dy=cy-p.y,d=Math.hypot(dx,dy)||1;
p.x+=(Math.random()-.5)*4+dx/d*.14;
p.y+=(Math.random()-.5)*4+dy/d*.14;
if(d>maxD&&Math.random()<.05){let a=Math.atan2(p.y-cy,p.x-cx)+(Math.random()-.5);p.x=cx+Math.cos(a)*maxD;p.y=cy+Math.sin(a)*maxD}
if(d>kill){let a=Math.random()*Math.PI*2;p.x=cx+Math.cos(a)*maxD;p.y=cy+Math.sin(a)*maxD}
for(let i=0;i<stuck.length;i++){
let q=stuck[i],x=p.x-q.x,y=p.y-q.y;
if(x*x+y*y<=rr){p.s=true;stuck.push({x:p.x,y:p.y});rad=Math.max(rad,Math.hypot(p.x-cx,p.y-cy));break}
}}}
function draw(){
ctx.fillStyle="rgba(8,9,13,.24)";ctx.fillRect(0,0,innerWidth,innerHeight);
ctx.fillStyle="#56d38b";ctx.beginPath();
for(const q of stuck){ctx.moveTo(q.x+r,q.y);ctx.arc(q.x,q.y,r,0,Math.PI*2)}
ctx.fill();ctx.fillStyle="#7aa2ff";ctx.beginPath();
for(const p of parts)if(!p.s){ctx.moveTo(p.x+1.1,p.y);ctx.arc(p.x,p.y,1.1,0,Math.PI*2)}
ctx.fill();hud.textContent=`stuck: ${stuck.length} / ${N+1} radius: ${rad.toFixed(1)}`;
}
function loop(t){
for(let i=0;i<3;i++)step();
draw();
if(stuck.length>N&&!doneAt)doneAt=t;
if(doneAt&&t-doneAt>1800)reset();
requestAnimationFrame(loop);
}
reset();requestAnimationFrame(loop);
</script>
</body>
</html>Show code
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>DLA</title>
<style>
html,body{margin:0;background:#05070d;overflow:hidden;height:100%}
canvas{display:block}
#hud{position:fixed;top:10px;left:12px;color:#9fd;font:14px monospace;text-shadow:0 0 4px #000}
</style></head>
<body>
<canvas id="c"></canvas>
<div id="hud"></div>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
let W,H,cx,cy;
function resize(){W=c.width=innerWidth;H=c.height=innerHeight;cx=W/2;cy=H/2;}
resize();addEventListener('resize',resize);
const N=800,R=2,STICK=4.5,CELL=STICK*2.2;
let px,py,alive,sx,sy,grid,stuckCount,clusterRadius,spawnR,noGrowth;
function key(x,y){return ((x/CELL)|0)+'_'+((y/CELL)|0);}
function addStuck(x,y){
sx.push(x);sy.push(y);
const k=key(x,y);
if(!grid.has(k))grid.set(k,[]);
grid.get(k).push(sx.length-1);
stuckCount++;
const d=Math.hypot(x-cx,y-cy);
if(d>clusterRadius){clusterRadius=d;noGrowth=0;}
}
function checkStick(x,y){
const gx=(x/CELL)|0,gy=(y/CELL)|0;
for(let a=-1;a<=1;a++)for(let b=-1;b<=1;b++){
const arr=grid.get((gx+a)+'_'+(gy+b));
if(!arr)continue;
for(const idx of arr){
if((x-sx[idx])**2+(y-sy[idx])**2<STICK*STICK)return true;
}
}
return false;
}
function respawn(i){
const a=Math.random()*Math.PI*2,r=spawnR;
px[i]=cx+Math.cos(a)*r;py[i]=cy+Math.sin(a)*r;
}
function init(){
px=new Float64Array(N);py=new Float64Array(N);alive=new Uint8Array(N).fill(1);
sx=[];sy=[];grid=new Map();stuckCount=0;clusterRadius=1;noGrowth=0;
spawnR=Math.min(W,H)*0.42;
addStuck(cx,cy);
for(let i=0;i<N;i++)respawn(i);
ctx.fillStyle='#05070d';ctx.fillRect(0,0,W,H);
}
init();
function step(){
for(let i=0;i<N;i++){
if(!alive[i])continue;
px[i]+=(Math.random()-0.5)*2.2;
py[i]+=(Math.random()-0.5)*2.2;
const dx=cx-px[i],dy=cy-py[i],d=Math.hypot(dx,dy)||1;
px[i]+=dx/d*0.35;py[i]+=dy/d*0.35;
if(checkStick(px[i],py[i])){
addStuck(px[i],py[i]);alive[i]=0;
}else if(d>spawnR*1.35){
respawn(i);
}
}
noGrowth++;
}
function draw(){
ctx.fillStyle='rgba(5,7,13,0.35)';
ctx.fillRect(0,0,W,H);
ctx.fillStyle='#6cf';
for(let i=0;i<N;i++){
if(!alive[i])continue;
ctx.fillRect(px[i],py[i],1.6,1.6);
}
for(let i=0;i<sx.length;i++){
const d=Math.hypot(sx[i]-cx,sy[i]-cy)/clusterRadius;
const hue=200-d*160;
ctx.fillStyle=`hsl(${hue},90%,60%)`;
ctx.beginPath();ctx.arc(sx[i],sy[i],R,0,7);ctx.fill();
}
document.getElementById('hud').textContent=
`stuck particles: ${stuckCount} / ${N} cluster radius: ${clusterRadius.toFixed(1)}px`;
}
function loop(){
step();draw();
if(stuckCount>=N-2||noGrowth>1400||clusterRadius>Math.min(W,H)*0.47)init();
requestAnimationFrame(loop);
}
loop();
</script>
</body></html>Show code
<!DOCTYPE html><html><head><title>r80</title></head><body><canvas id="c"></canvas><script>
let c=document.getElementById('c'),x=c.getContext('2d');c.width=800;c.height=600;
let p=[],stuck=[],c_=[400,300],crad=10,sw=200,sh=150;
for(let i=0;i<800;i++)p.push({x:Math.random()*sw,y:Math.random()*sh,vx:(Math.random()-0.5)*2,vy:(Math.random()-0.5)*2});
function draw(){
x.fillStyle="#fff";x.fillRect(0,0,800,600);
let s=Math.floor(750/sw);
// Update
let ns=[];
p.forEach(pa=>{
// Brownian
pa.vx+=(Math.random()-0.5)*0.2;pa.vy+=(Math.random()-0.5)*0.2;
// Drift to center
let dx=c_[0]/s-pa.x,dy=c_[1]/s-pa.y,d=Math.sqrt(dx*dx+dy*dy);
if(d>1){pa.vx+=dx/d*0.05;pa.vy+=dy/d*0.05;}
pa.x+=pa.vx;pa.y+=pa.vy;
// Damping
pa.vx*=0.98;pa.vy*=0.98;
// Wrap
if(pa.x<0)pa.x+=sw;if(pa.x>=sw)pa.x-=sw;if(pa.y<0)pa.y+=sh;if(pa.y>=sh)pa.y-=sh;
// Check collision
if(Math.sqrt((pa.x*s-c_[0])**2+(pa.y*s-c_[1])**2)<crad+5){stuck.push(pa);crad+=0.5;}
else ns.push(pa);
});
p=ns;
// Draw cluster
x.fillStyle="#f00";x.beginPath();x.arc(c_[0],c_[1],crad,0,Math.PI*2);x.fill();
// Draw free
x.fillStyle="#0f0";p.forEach(pa=>{x.beginPath();x.arc(pa.x*s,pa.y*s,2,0,Math.PI*2);x.fill();});
x.fillStyle="#000";x.font="14px mono";x.fillText("Stuck:"+stuck.length+" Radius:"+crad.toFixed(1),100,50);
requestAnimationFrame(draw);
}draw();
</script></body></html>Results at a glance— every model in this round with score, response time and status.
Who wrote what
| Model | Blind score | Latency | Status |
|---|---|---|---|
| qwen3:8b | — | — | harness |
| qwen3.5:9b | — | 36.2 s | OK |
| deepseek-r1:14b | — | 81.0 s | OK |
| gemma4:26b | — | — | harness |
| qwen3:14b | — | 33.4 s | OK |
| mistral-small:24b | — | 116.5 s | OK |
| qwen3-coder:30b | — | 19.3 s | OK |
| llama3.1:8b | — | — | DNF |
| deepseek-r1:32b | — | 133.7 s | OK |
| command-r:35b | — | 131.6 s | OK |
| qwq:32b | — | 134.0 s | OK |
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.
Show code
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Continuous Diffusion-Limited Aggregation</title>
<style>
html,body{margin:0;height:100%;background:#05060c;overflow:hidden}
canvas{display:block}
#hud{position:fixed;top:14px;left:16px;pointer-events:none;
font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;color:#8ea3c4;letter-spacing:.08em;text-transform:uppercase}
#hud b{color:#7ef2d4;font-weight:600}
#hud i{font-style:normal;color:#f0a4d0}
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="hud">stuck <b id="s">1</b>/800 · cluster radius <i id="r">0.0</i> px · run <b id="g">1</b></div>
<script>
const cv=document.getElementById('c'),ctx=cv.getContext('2d');
const elS=document.getElementById('s'),elR=document.getElementById('r'),elG=document.getElementById('g');
const N=800,PR=2.1,STICK=PR*2,TAU=Math.PI*2;
let W,H,cx,cy,spawnR,free,stuck,maxR,run=1,hold=0,age=0;
function resize(){W=cv.width=innerWidth;H=cv.height=innerHeight;cx=W/2;cy=H/2;spawnR=Math.min(W,H)*0.46;}
function spawn(){const a=Math.random()*TAU,d=spawnR*Math.sqrt(0.12+0.88*Math.random());
return{x:cx+Math.cos(a)*d,y:cy+Math.sin(a)*d};}
function reset(){resize();stuck=[{x:cx,y:cy,h:0}];maxR=0;age=0;hold=0;free=[];
for(let i=0;i<N;i++)free.push(spawn());}
function step(){
const lim=maxR+STICK+8;
for(let i=free.length-1;i>=0;i--){
const p=free[i];
p.x+=(Math.random()-0.5)*3.6;
p.y+=(Math.random()-0.5)*3.6;
let dx=cx-p.x,dy=cy-p.y,d=Math.sqrt(dx*dx+dy*dy)||1e-6;
const pull=0.30+0.85*(d/spawnR);
p.x+=dx/d*pull;p.y+=dy/d*pull;
if(d>spawnR*1.3){const q=spawn();p.x=q.x;p.y=q.y;continue;}
if(d>lim)continue;
for(let j=stuck.length-1;j>=0;j--){
const q=stuck[j],ax=p.x-q.x,ay=p.y-q.y;
if(ax*ax+ay*ay<STICK*STICK){
const nx=cx-p.x,ny=cy-p.y,rr=Math.sqrt(nx*nx+ny*ny);
stuck.push({x:p.x,y:p.y,h:stuck.length/N});
if(rr>maxR)maxR=rr;
free.splice(i,1);
break;
}
}
}
}
function draw(){
ctx.fillStyle='rgba(5,6,12,0.34)';ctx.fillRect(0,0,W,H);
ctx.strokeStyle='rgba(70,95,140,0.16)';ctx.beginPath();
ctx.arc(cx,cy,Math.max(maxR,4),0,TAU);ctx.stroke();
ctx.globalCompositeOperation='lighter';
for(let i=0;i<free.length;i++){
const p=free[i];
ctx.fillStyle='rgba(90,120,170,0.42)';
ctx.fillRect(p.x-0.9,p.y-0.9,1.8,1.8);
}
for(let i=0;i<stuck.length;i++){
const p=stuck[i];
ctx.fillStyle='hsl('+(188+p.h*168)+',88%,'+(46+p.h*22)+'%)';
ctx.beginPath();ctx.arc(p.x,p.y,PR,0,TAU);ctx.fill();
}
const t=stuck[stuck.length-1];
ctx.fillStyle='rgba(255,255,255,0.9)';
ctx.beginPath();ctx.arc(t.x,t.y,PR*1.3,0,TAU);ctx.fill();
ctx.globalCompositeOperation='source-over';
}
function frame(){
age++;
if(free.length){for(let k=0;k<4;k++)step();}
else hold++;
if(age>7000)hold=90;
if(hold>60){run++;elG.textContent=run;ctx.fillStyle='#05060c';ctx.fillRect(0,0,W,H);reset();}
draw();
elS.textContent=stuck.length;
elR.textContent=maxR.toFixed(1);
requestAnimationFrame(frame);
}
addEventListener('resize',()=>{const o=cx,p=cy;resize();
const dx=cx-o,dy=cy-p;
for(const q of stuck){q.x+=dx;q.y+=dy;}
for(const q of free){q.x+=dx;q.y+=dy;}
ctx.fillStyle='#05060c';ctx.fillRect(0,0,W,H);});
reset();
ctx.fillStyle='#05060c';ctx.fillRect(0,0,W,H);
frame();
</script>
</body>
</html>