Overview › Models › GPT-5.5 (Codex)
Model profile

GPT-5.5 (Codex)

Cloud
140frontier references (R31–R180)
—not scored, by design

Rounds & answers 140

▶ R31 · Bat and ball (the classic reasoning trap)author reference Open round →
0,05 Euro. Wenn der Ball 0,05 Euro kostet, kostet der Schläger 1,05 Euro; zusammen sind das 1,10 Euro und der Schläger ist genau 1,00 Euro teurer.
▶ R32 · Four houses, four clues (constraint puzzle)author reference Open round →
Position 1: grün, Position 2: rot, Position 3: blau, Position 4: gelb.

Begründung: Das grüne Haus steht fest an Position 1. Rot muss direkt links von Blau stehen und Gelb direkt rechts von Blau, also bilden Rot-Blau-Gelb einen zusammenhängenden Block. Dafür bleiben nur die Positionen 2-4.
▶ R33 · Idioms that break literal translation (EN→DE)author reference Open round →
1) to bite the bullet — in den sauren Apfel beißen
2) the ball is in your court — jetzt bist du am Zug
3) it's raining cats and dogs — es regnet in Strömen
▶ R34 · Constrained taglines (word ban + length cap)author reference Open round →
1. Sanft putzen, Plastik sparen
2. Dein Lächeln, besser verpackt
3. Bambusgriff für saubere Zähne
▶ R35 · Minutes in a (non-leap) year — show the mathauthor reference Open round →
Ein normales Jahr hat 365 Tage.
Ein Tag hat 24 Stunden.
Eine Stunde hat 60 Minuten.

Rechnung:
365 * 24 * 60 = 525600

Endergebnis: 525600
▶ R36 · Continue the sequence (doubling gaps)author reference Open round →
33 — Die Differenzen verdoppeln sich jeweils: +1, +2, +4, +8, also folgt +16.
▶ R37 · False friend: 'control' EN→DEauthor reference Open round →
Bevor wir veröffentlichen, muss ich die Testergebnisse überprüfen und schließlich zwei Fehler beheben.
▶ R38 · Register shift: formal → casual (DE)author reference Open round →
Hallo Frau Müller, die Besprechung musste leider auf morgen um 10 Uhr verschoben werden.
▶ R39 · 40-word product blurb with 3 required wordsauthor reference Open round →
Robuste Edelstahl-Trinkflasche für Alltag, Sport und Reisen: auslaufsicher, spülmaschinenfest und doppelwandig isoliert. Hält Getränke stundenlang heiß oder kalt, liegt angenehm in der Hand und passt in gängige Rucksack- und Autohalter.
▶ R40 · isPalindrome (ignore case & non-alphanumerics)author reference Open round →
function isPalindrome(s) {
  const normalized = String(s).toLowerCase().replace(/[^a-z0-9]/g, "");
  let left = 0;
  let right = normalized.length - 1;

  while (left < right) {
    if (normalized[left] !== normalized[right]) return false;
    left++;
    right--;
  }

  return true;
}
▶ R41 · Prose → valid JSONauthor reference Open round →
{"name":"Anna Schmidt","alter":30,"stadt":"Freiburg","hobbys":["Lesen","Radfahren"],"newsletter_abonniert":true}
▶ R42 · All but nine (word-problem trap)author reference Open round →
9 - Es sind noch 9 Schafe am Leben.
▶ R43 · Five machines (rate-reasoning trap)author reference Open round →
5
100 Maschinen brauchen 5 Minuten, weil jede Maschine in 5 Minuten 1 Teil herstellt. Die Produktionsrate skaliert proportional, daher entstehen 100 Teile mit 100 Maschinen ebenfalls in 5 Minuten.
▶ R44 · Appointment extraction to strict JSONauthor reference Open round →
[
  {
    "datum": "2026-08-12",
    "uhrzeit": "14:30",
    "titel": "Budgetplanung"
  },
  {
    "datum": "2026-09-03",
    "uhrzeit": "09:00",
    "titel": "Zahnarzttermin"
  },
  {
    "datum": "2026-12-31",
    "uhrzeit": "20:30",
    "titel": "Silvesterparty"
  }
]
▶ R45 · Idiom-dense German to natural Englishauthor reference Open round →
It's not exactly ideal, but we shouldn't blow it out of proportion — all things considered, we can live with it.
▶ R46 · Energy conservation on a frictionless inclineauthor reference Open round →
Using energy conservation:

mgh = (1/2)mv^2

(a) Speed at the bottom:

v = sqrt(2gh)
v = sqrt(2 * 9.8 m/s^2 * 5 m)
v = sqrt(98 m^2/s^2)
v = 9.9 m/s

(b) Kinetic energy at the bottom:

KE = mgh
KE = 2 kg * 9.8 m/s^2 * 5 m
KE = 98 J

Final answers:
(a) 9.9 m/s
(b) 98 J
▶ R47 · Unit conversion: km/h to m/s and mphauthor reference Open round →
(a) Convert 108 km/h to m/s:
108 km/h x (1000 m / 1 km) x (1 h / 3600 s) = 108000 / 3600 m/s = 30.0 m/s

(b) Convert 108 km/h to miles per hour:
108 km/h x (1 mile / 1.60934 km) = 108 / 1.60934 mph = 67.1 mph

Final answers: 30.0 m/s and 67.1 mph
▶ R48 · Low-orbit satellite: speed and period (orbital/Kepler estimate)author reference Open round →
r = 6371 km + 400 km = 6771 km

(a) Orbital speed:
v = sqrt(mu / r)
v = sqrt(398600 km^3/s^2 / 6771 km)
v = sqrt(58.8687) km/s
v ~= 7.67 km/s

(b) Orbital period:
T = 2*pi*r / v
T = 2*pi*6771 km / 7.67 km/s
T ~= 5545 s
T ~= 92.4 minutes

Final answers: v ~= 7.67 km/s, T ~= 92.4 minutes
▶ R49 · Ohm's law: resistance and power dissipationauthor reference Open round →
(a) Using Ohm's law:
R = V / I = 12 V / 0.5 A = 24 ohms

(b) Electrical power:
P = V x I = 12 V x 0.5 A = 6 W

Final answers:
(a) 24 ohms
(b) 6 W
▶ R50 · Thin lens equation: image distance and magnificationauthor reference Open round →
Using the thin lens equation:
1/f = 1/d_o + 1/d_i

Given f = 10 cm and d_o = 15 cm:
1/10 = 1/15 + 1/d_i
1/d_i = 1/10 - 1/15
1/d_i = 3/30 - 2/30 = 1/30
d_i = 30 cm

(a) The image distance is d_i = 30 cm.

Magnification:
m = -d_i/d_o = -30/15 = -2

(b) The magnification is m = -2.

Because d_i is positive, the image is real. Because the magnification is negative, the image is inverted.
▶ R51 · Heat required to warm water (specific heat capacity)author reference Open round →
Q = m * c * ΔT

m = 2 kg
c = 4186 J/(kg*K)
ΔT = 80°C - 20°C = 60 K

Q = 2 * 4186 * 60
Q = 502,320 J

502,320 J = 502.32 kJ

Final answer: 502,320 J, or 502.32 kJ
▶ R52 · Fermi estimate: how many piano tuners in a 10-million-person city?author reference Open round →
Estimate for a city of 10 million people:

1. People per household
Assume an average household has about 2.5 people.

10,000,000 people / 2.5 people per household = 4,000,000 households

2. Households owning a piano
Assume roughly 1 in 20 households owns a piano. That is 5%.

4,000,000 households x 5% = 200,000 household pianos

3. Non-household pianos
Schools, churches, music studios, concert halls, hotels, universities, rehearsal spaces, and shops also have pianos. Add about 25% more.

200,000 x 1.25 = 250,000 total pianos

4. Tuning frequency
Many pianos are not tuned every year, while serious players, schools, and venues tune more often. Assume the average piano gets tuned about once per year.

250,000 pianos x 1 tuning per year = 250,000 tunings per year

5. Tunings per tuner
Assume one professional tuner can do about 3 tunings per workday, allowing for travel, scheduling, administr …

Excerpt — the full answer is on the round page.

▶ R53 · Why is the sky blue? (conceptual)author reference Open round →
The sky looks blue during the day because sunlight is made of many colors, and the air scatters the blue part more strongly than most other colors. As sunlight passes through the atmosphere, tiny gas molecules spread blue light in many directions, so blue light reaches our eyes from all over the sky.

The physical phenomenon responsible is Rayleigh scattering.
▶ R54 · Time dilation: why do moving clocks run slow? (conceptual, special relativity)author reference Open round →
Imagine a simple light clock: a pulse of light bouncing between two mirrors. When the clock is at rest beside you, the light goes straight up and down between the mirrors. Each bounce marks one tick.

Now imagine that same clock moving past you sideways. From the point of view of the person traveling with the clock, nothing unusual happens: the light still goes straight up and down, and the clock ticks normally.

But from your point of view, the clock is moving while the light is bouncing. So the light does not just go up and down; it traces a longer diagonal path, because the mirrors have moved sideways during the trip. Special relativity says that everyone measures light to have the same speed, no matter how the source or observer is moving. So if the light has a longer path to travel, but its speed is not allowed to be higher, the trip must take more time. That means the moving clock …

Excerpt — the full answer is on the round page.

▶ R55 · The double-slit experiment and wave-particle duality (conceptual, quantum mechanics)author reference Open round →
In the double-slit experiment, particles such as electrons or photons are sent toward a barrier with two narrow slits, and a screen behind the barrier records where each particle lands.

If both slits are open and no one measures which slit a particle goes through, the particles do not simply form two bright bands on the screen. Even when they are sent one at a time, the spots build up into an interference pattern: a series of alternating bright and dark bands. This is the kind of pattern normally associated with waves. It suggests that each particle is described by a wave-like probability pattern that passes through both slits and interferes with itself before the particle is finally detected at one definite point on the screen.

If a which-path detector is added so that the experiment can determine which slit each particle went through, the interference pattern disappears. The screen t …

Excerpt — the full answer is on the round page.

▶ R56 · Double-slit interference, particle by particleauthor reference Open round →
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Double Slit</title>
<style>
html,body{margin:0;height:100%;background:#08090c;color:#e8edf5;font:16px system-ui,sans-serif;overflow:hidden}
#wrap{height:100%;display:grid;place-items:center;background:radial-gradient(circle at 30% 50%,#182033,#08090c 58%)}
canvas{width:min(1100px,100vw);height:min(680px,100vh);display:block}
#count{position:fixed;left:18px;top:14px;padding:8px 12px;background:#111824cc;border:1px solid #304056;border-radius:6px}
</style>
</head>
<body>
<div id="wrap"><canvas id="c"></canvas></div>
<div id="count">Detected: 0</div>
<script>
const c=document.getElementById("c"),x=c.getContext("2d"),label=document.getElementById("count");
let W,H,dpr,particles=[],hits=[],n=0,fade=0;
function size(){
 dpr=Math.min(devicePixelRatio||1,2); W …

Excerpt — the full answer is on the round page.

▶ R57 · Hanging rope with Verlet integrationauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Verlet Rope</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#10141b}
canvas{display:block;width:100%;height:100%}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas=document.getElementById("c"),ctx=canvas.getContext("2d");
let w,h,pts=[],segs=[],last=0,nextKick=0;
const N=40,g=.55,passes=12;
function resize(){
  w=canvas.width=innerWidth*devicePixelRatio;
  h=canvas.height=innerHeight*devicePixelRatio;
  canvas.style.width=innerWidth+"px";canvas.style.height=innerHeight+"px";
  init();
}
function init(){
  pts=[];segs=[];
  const ax=w*.33,ay=h*.12,bx=w*.67,by=h*.12,extra=h*.55,len=(bx-ax+extra)/(N-1);
  for(let i=0;i<N;i++){
    const t=i/(N-1),x=ax+(bx-ax)*t,y=ay+Math.sin(Math.PI*t)*extra*.55;
    pts.push({x,y,px:x …

Excerpt — the full answer is on the round page.

▶ R58 · 2D wave propagation with reflectionauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Wave Grid</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#05070b}
canvas{display:block;width:100vw;height:100vh;image-rendering:auto}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const W=160,H=110,N=W*H,c=document.getElementById("c"),x=c.getContext("2d");
let u=new Float32Array(N),p=new Float32Array(N),v=new Float32Array(N),img=x.createImageData(W,H);
let last=0,next=0;
function resize(){c.width=innerWidth;c.height=innerHeight}
addEventListener("resize",resize);resize();
function pulse(){
  const cx=10+Math.random()*(W-20),cy=10+Math.random()*(H-20),r=7+Math.random()*5,a=(Math.random()<.5?-1:1)*(1.6+Math.random()*.8);
  for(let y=Math.max(1,cy-r|0);y<Math.min(H-1,cy+r|0);y++)for(let xx=Math.max(1,cx-r|0);xx<Math.min(W-1,cx …

Excerpt — the full answer is on the round page.

▶ R59 · Billiard break with spin and frictionauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Billiard Break</title>
<style>
html,body{margin:0;height:100%;background:#111;overflow:hidden}
canvas{display:block;width:100vw;height:100vh;background:#153d2a}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c=document.getElementById("c"),x=c.getContext("2d");
let W,H,S,balls=[],last=0,rest=0;
const R=10,M=.995,C=.985,BC=.992,cols=["#fff","#f4d13d","#2864d8","#d93434","#7b3fa0","#e87d22","#219653","#7a2c24","#111","#f4d13d","#2864d8"];
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;S=Math.min(W/900,H/520)}
addEventListener("resize",()=>{fit();rack()});fit();
function ball(n,x,y,vx=0,vy=0){balls.push({n,x,y,vx,vy,r:12*S,m:1})}
function rack(){
balls=[];let cx=W*.63,cy=H*.5,g=21*S,k=1;
for(let row=0;row<4;row++)for(let i=0;i<=row;i++)ball(k++,cx+row*g,cy+(i-row/2)*g*1. …

Excerpt — the full answer is on the round page.

▶ R60 · Dijkstra vs A* on a weighted gridauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Dijkstra vs A*</title><style>
html,body{margin:0;height:100%;background:#12151c;color:#e8edf2;font:14px system-ui;overflow:hidden}#bar{height:42px;display:flex;gap:28px;align-items:center;justify-content:center;background:#1c2430}b{color:#fff}canvas{display:block;width:100vw;height:calc(100vh - 42px)}
</style></head><body><div id="bar"><span>Dijkstra: <b id="d">0 expanded, cost -</b></span><span>A*: <b id="a">0 expanded, cost -</b></span></div><canvas id="c"></canvas><script>
const W=30,H=20,N=W*H,cv=document.getElementById('c'),x=cv.getContext('2d'),dl=document.getElementById('d'),al=document.getElementById('a');let g,ds,as,last=0,done=0;
function idx(x,y){return y*W+x}function xy(i){return [i%W,(i/W)|0]}function heu(i){let[p,q]=xy(i);return Math.abs(W-1-p)+Math.abs(H-1-q)}
function fresh(){g=Array.from({length:N},(_,i)=>i==0||i==N …

Excerpt — the full answer is on the round page.

▶ R61 · Convex hull built step by stepauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Graham Scan</title>
<style>
html,body{margin:0;height:100%;background:#101418;color:#e8eef5;font:16px system-ui,sans-serif;overflow:hidden}
canvas{display:block;width:100vw;height:100vh}
#hud{position:fixed;left:18px;top:14px;background:#0009;padding:10px 13px;border:1px solid #ffffff22}
</style>
</head>
<body>
<canvas id="c"></canvas><div id="hud"></div>
<script>
const c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let W,H,pts,sorted,actions,ai,t0,doneAt,step=0;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
onresize=fit;fit();
function cross(o,a,b){return(a.x-o.x)*(b.y-o.y)-(a.y-o.y)*(b.x-o.x)}
function reset(){
pts=Array.from({length:40},()=>({x:50+Math.ra …

Excerpt — the full answer is on the round page.

▶ R62 · Huffman tree from letter frequenciesauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Huffman Canvas</title><style>
html,body{margin:0;height:100%;background:#f5f1e8;color:#1b1b1b;font:14px system-ui,Segoe UI,sans-serif;overflow:hidden}canvas{display:block;width:100vw;height:100vh}
</style></head><body><canvas id="c"></canvas><script>
const c=document.getElementById('c'),x=c.getContext('2d'),sample='the quick brown fox jumps over the lazy huffman tree';let W,H,dpr=1,S;
function size(){dpr=devicePixelRatio||1;W=c.width=innerWidth*dpr;H=c.height=innerHeight*dpr;x.setTransform(dpr,0,0,dpr,0,0);W=innerWidth;H=innerHeight}addEventListener('resize',size);size();
class N{constructor(ch,f,l=null,r=null){this.ch=ch;this.f=f;this.l=l;this.r=r;this.id=Math.random();this.x=this.y=this.tx=this.ty=0}}
function fresh(){let s=sample.split('').filter(a=>a!=' '),m={};s.forEach(a=>m[a]=(m[a]||0)+1);Object.keys(m).forEach(k=>m[k]+=Math. …

Excerpt — the full answer is on the round page.

▶ R63 · Kruskal's MST with union-findauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Kruskal MST</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:16px system-ui}
canvas{display:block;width:100vw;height:100vh}
#hud{position:fixed;left:16px;top:12px;background:#0009;padding:10px 14px;border-radius:8px;line-height:1.45}
</style>
</head>
<body>
<canvas id="c"></canvas><div id="hud"></div>
<script>
const c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let W,H,n=25,nodes,edges,seen,parent,rank,accepted,total,step,last,wait,doneAt;
const colors=["#4cc9f0","#f72585","#b8f34a","#ffd166","#a78bfa","#06d6a0","#f77f00","#90be6d","#ff6b6b","#00bbf9","#e9c46a","#b5179e","#43aa8b","#f94144","#577590","#caffbf","#fb8500","#80ed99","#bde0fe","#ffafcc","#cdb4db","#2ec4b6","#f4a2 …

Excerpt — the full answer is on the round page.

▶ R64 · N-Queens solved by backtrackingauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Queens Backtracking</title>
<style>
html,body{margin:0;height:100%;background:#10151d;color:#eef3f8;font:16px system-ui,sans-serif;overflow:hidden}
main{height:100%;display:grid;place-items:center;gap:10px;align-content:center}
canvas{width:min(92vmin,760px);height:min(92vmin,760px);box-shadow:0 18px 55px #0009;background:#ddd}
#hud{display:flex;gap:22px;align-items:center;justify-content:center;font-weight:700;letter-spacing:.02em}
#hud span{color:#8fe0ff}
</style>
</head>
<body>
<main>
<canvas id="c"></canvas>
<div id="hud">N <span id="n"></span> Placements <span id="p">0</span> Backtracks <span id="b">0</span></div>
</main>
<script>
const c=document.getElementById("c"),x=c.getContext("2d"),N=document.getElementById("n"),P=document.getElementById("p"),B=document.getElementById("b");
let n,qs,cols,d1,d2,row,tries,stack,events,i …

Excerpt — the full answer is on the round page.

▶ R65 · Delaunay triangulation, triangle by triangleauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Delaunay</title><style>
html,body{margin:0;height:100%;overflow:hidden;background:#101317;color:#e9edf1;font:15px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh}#hud{position:fixed;left:16px;top:14px;background:#0008;padding:10px 12px;border:1px solid #fff2;border-radius:6px;line-height:1.45}
</style></head><body><canvas id="c"></canvas><div id="hud"></div><script>
const c=document.getElementById('c'),x=c.getContext('2d'),hud=document.getElementById('hud');
let W,H,pts,ins,tris,step,t0,phase,bad,poly,p,i;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
onresize=fit;fit();
function area(a,b,c){return (b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x)}
function edgeKey(a,b){return a.id<b.id?a.id+' …

Excerpt — the full answer is on the round page.

▶ R66 · AVL tree rebalancing with rotationsauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>AVL</title><style>
html,body{margin:0;height:100%;background:#f6f3ea;font:15px system-ui;color:#24302f;overflow:hidden}
#hud{position:fixed;left:16px;top:12px;background:#ffffffd9;border:1px solid #c9c2ad;padding:10px 12px;border-radius:6px;box-shadow:0 2px 10px #0001}
canvas{display:block;width:100vw;height:100vh}
</style></head><body><div id="hud"></div><canvas id="c"></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let root,keys,i,rots,msg="",anim=null,last=0;
function N(k){return{key:k,l:null,r:null,h:1,x:0,y:0,px:0,py:0,b:0}}
function h(n){return n?n.h:0}
function upd(n){if(n){n.h=1+Math.max(h(n.l),h(n.r));n.b=h(n.l)-h(n.r)}return n}
function rr(y){let z=y.l,t=z.r;z.r=y;y.l=t;upd(y);return upd(z)}
function lr(y){let z=y.r,t=z.l;z.l=y;y.r=t;upd(y);return upd(z)}
func …

Excerpt — the full answer is on the round page.

▶ R67 · Sieve of Eratosthenes on a number gridauthor reference Open round →
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Sieve of Eratosthenes</title>
<style>
html,body{margin:0;height:100%;background:#101114;color:#f4f1e8;font:16px system-ui,sans-serif;overflow:hidden}
body{display:grid;place-items:center}
#wrap{width:min(96vw,900px)}
canvas{display:block;width:100%;aspect-ratio:1;background:#17191f;border:1px solid #30343d}
#hud{display:flex;gap:20px;justify-content:center;align-items:center;padding:14px 0 0;font-weight:700}
span{color:#9fd8ff}
</style>
</head>
<body>
<div id="wrap">
<canvas id="c"></canvas>
<div id="hud">prime <span id="p">-</span> found <span id="f">0</span> eliminated <span id="e">0</span></div>
</div>
<script>
const canvas=document.getElementById("c"),ctx=canvas.getContext("2d"),P=document.getElementById("p"),F=document.getElementById("f"),E=docume …

Excerpt — the full answer is on the round page.

▶ R68 · Edit-distance DP matrix with backtraceauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Levenshtein DP</title>
<style>
html,body{margin:0;height:100%;background:#101418;color:#e7eef7;font:15px system-ui}
body{display:grid;place-items:center}
#wrap{width:min(96vw,980px)}
canvas{width:100%;height:auto;background:#151b22;border:1px solid #354250}
#ops{min-height:4.8em;white-space:pre-wrap;margin-top:10px;color:#cfd9e4}
</style>
</head>
<body>
<div id="wrap"><canvas id="c" width="980" height="680"></canvas><div id="ops"></div></div>
<script>
const words=["distance","editing","matrixes","algorithm","function","variable","sequence","birthday","portable","notation","graphics","backtrace"];
const cvs=document.getElementById("c"),ctx=cvs.getContext("2d"),opsEl=document.getElementById("ops");
let A,B,D,win,order,path,ops,phase,i,last=0,hold=0;
function pick(){A=words[Math.random()*words.length|0];do B=words[Math.random()*wor …

Excerpt — the full answer is on the round page.

▶ R69 · Replanning when the map changesauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Robot Replanner</title>
<style>
html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui;display:grid;place-items:center}
#wrap{position:relative}
canvas{background:#181b20;box-shadow:0 0 0 1px #333;width:min(96vw,900px);height:auto}
#hud{position:absolute;left:12px;top:10px;background:#0009;padding:6px 10px;border-radius:6px}
</style>
</head>
<body>
<div id="wrap"><canvas id="c" width="900" height="600"></canvas><div id="hud"></div></div>
<script>
const W=30,H=20,S=30,c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let g,bot,goal,path,pi,t,from,to,steps,replans,colors,ci,last,blockTick,done;
function key(p){return p.x+","+p.y}
function eq(a,b){return a.x==b.x&&a.y==b.y}
function rand(n){return Math.floor(Math.random()*n)}
function pathfind(a,b){
 let q=[a],seen=new Se …

Excerpt — the full answer is on the round page.

▶ R70 · Binary search, step by stepauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Binary Search Canvas</title>
<style>
html,body{margin:0;height:100%;background:#10151d;color:#e9edf3;font-family:system-ui,Segoe UI,sans-serif;overflow:hidden}
canvas{display:block;width:100vw;height:100vh}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c=document.getElementById("c"),x=c.getContext("2d");
let a,t,lo,hi,mid,cmp,phase,stepT,last,done,discard,found;
function rnd(){
 let s=new Set;while(s.size<40)s.add(5+Math.floor(Math.random()*94));
 a=[...s].sort((p,q)=>p-q);t=a[Math.floor(Math.random()*a.length)];
 if(Math.random()<.35)t=5+Math.floor(Math.random()*94);
 lo=0;hi=39;cmp=0;phase=0;stepT=0;done=false;discard=[];found=-1;mid=Math.floor((lo+hi)/2);
}
function fit(){
 let d=devicePixelRatio||1;c.width=innerWidth*d;c.height=innerHeight*d;x.setTransform(d,0,0,d,0,0);
}
function mark(label,i,col,y){
 let …

Excerpt — the full answer is on the round page.

▶ R71 · Flood fill on a pixel gridauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Flood Fill</title>
<style>
html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui,sans-serif;display:grid;place-items:center}
#wrap{width:min(96vw,1100px)}
canvas{width:100%;aspect-ratio:3/2;display:block;background:#000;image-rendering:pixelated}
#stats{display:flex;gap:24px;justify-content:center;padding:14px 0;color:#ddd}
b{color:#fff}
</style>
</head>
<body>
<div id="wrap">
<canvas id="c" width="900" height="600"></canvas>
<div id="stats">Filled: <b id="filled">0</b> Frontier: <b id="frontier">0</b></div>
</div>
<script>
const W=60,H=40,C=document.getElementById("c"),x=C.getContext("2d"),cw=C.width/W,ch=C.height/H;
const filledEl=document.getElementById("filled"),frontEl=document.getElementById("frontier");
let grid,seen,frontier,filled,target,fillColor,last=0,wait=45;
const palette=["#ef4444","#f97316 …

Excerpt — the full answer is on the round page.

▶ R72 · Maze generation by recursive backtrackingauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Maze Backtracker</title>
<style>
html,body{margin:0;height:100%;background:#101214;color:#e8ecef;font:16px system-ui,sans-serif;overflow:hidden}
body{display:grid;place-items:center}
#wrap{width:min(96vw,1200px)}
canvas{display:block;width:100%;height:auto;background:#171b20;border:1px solid #303842}
#hud{display:flex;gap:28px;padding:10px 2px 0;color:#c9d3dc}
b{color:#fff;font-variant-numeric:tabular-nums}
</style>
</head>
<body>
<div id="wrap">
<canvas id="c" width="1200" height="800"></canvas>
<div id="hud"><span>Cells carved: <b id="carved">0</b>/600</span><span>Stack depth: <b id="depth">0</b></span></div>
</div>
<script>
const W=30,H=20,N=W*H,cv=document.getElementById("c"),x=cv.getContext("2d"),cw=cv.width/W,ch=cv.height/H;
const carvedEl=document.getElem …

Excerpt — the full answer is on the round page.

▶ R73 · KMP string search with prefix tableauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>KMP Canvas</title>
<style>
html,body{margin:0;height:100%;background:#10141b;color:#e9eef7;font:16px system-ui,sans-serif;overflow:hidden}
canvas{display:block;width:100vw;height:100vh}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c=document.getElementById("c"),x=c.getContext("2d");
let W,H,run,last=0;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
addEventListener("resize",fit);fit();
const pats=["ABA","ABAB","AABA","ABCA","CAB"],alph="ABC";
function make(){
 let p=pats[Math.random()*pats.length|0], t="", need=14+Math.random()*8|0;
 for(let i=0;i<need;i++)t+=alph[Math.random()*alph.length|0];
 let pos=Math.random()*(need-p.length)|0; t=t.slice(0,pos)+p+t.slice(pos+p.length);
 let …

Excerpt — the full answer is on the round page.

▶ R74 · Quadtree collision detectionauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Quadtree Balls</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#0b1020;color:#eaf1ff;font:14px system-ui,sans-serif}
canvas{display:block;width:100vw;height:100vh;background:linear-gradient(135deg,#101a33,#050814)}
#hud{position:fixed;left:14px;top:12px;padding:8px 10px;background:#0008;border:1px solid #fff2;border-radius:6px;backdrop-filter:blur(4px)}
</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,balls=[],nodes=0,tests=0,hot=[],collide=new Set(),start=0,dur=32000;
function resize(){let d=devicePixelRatio||1;W=canvas.width=innerWidth*d;H=canvas.height=innerHeight*d;canvas.style.width=innerWid …

Excerpt — the full answer is on the round page.

▶ R75 · Falling sand on a cell gridauthor reference Open round →
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Falling Sand</title>
<style>
html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui,sans-serif;display:grid;place-items:center}
main{display:grid;gap:12px;justify-items:center}
canvas{width:min(96vw,900px);height:auto;image-rendering:pixelated;background:#050505;border:1px solid #333}
#hud{display:flex;gap:24px}
</style>
</head>
<body>
<main>
<canvas id="c" width="900" height="600"></canvas>
<div id="hud"><span>Resting: <b id="r">0</b></span><span>Steps: <b id="s">0</b></span></div>
</main>
<script>
const W=150,H=100,N=W*H,cell=6,c=document.getElementById("c"),x=c.getContext("2d"),R=document.getElementById("r"),S=document.getElementById("s");
let g,n,rest,steps,source,left,last;
function reset(){
 g=new Uint8Array(N);n=new Uint8A …

Excerpt — the full answer is on the round page.

▶ R76 · Falling sand as free particlesauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Continuous Falling Sand</title>
<style>
html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:14px system-ui}
canvas{display:block;width:100vw;height:100vh}
#hud{position:fixed;left:14px;top:12px;background:#0008;padding:8px 10px;border-radius:6px}
</style>
</head>
<body>
<canvas id="c"></canvas><div id="hud"></div>
<script>
const c=document.getElementById("c"),x=c.getContext("2d"),hud=document.getElementById("hud");
let W,H,D,grains,active,done,last=0,spawn=0;
const N=1500,R=2.2,G=900,DT=1/120,REST=.55,FRIC=.78;
function reset(){
 D=Math.min(devicePixelRatio||1,2);W=c.width=innerWidth*D;H=c.height=innerHeight*D;c.style.width=innerWidth+"px";c.style.height=innerHeight+"px";x.setTransform(1,0,0,1,0,0);
 grains=[];active=[];done=false;spawn=0;last=0;
}
onresize=reset;reset();
function add(){
 let cx=W*.5+( …

Excerpt — the full answer is on the round page.

▶ R77 · Crowd leaving a room, cell by cellauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Evacuation Grid</title>
<style>
html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui;display:grid;place-items:center}
#wrap{width:min(96vw,960px)}
#hud{display:flex;justify-content:space-between;margin:0 0 8px}
canvas{width:100%;aspect-ratio:4/3;background:#181818;display:block}
</style>
</head>
<body>
<div id="wrap">
<div id="hud"><span id="left"></span><span id="step"></span></div>
<canvas id="c" width="800" height="600"></canvas>
</div>
<script>
const W=40,H=30,N=60,exit={x:39,y:15},c=document.getElementById("c"),ctx=c.getContext("2d");
const left=document.getElementById("left"),stepEl=document.getElementById("step"),cw=c.width/W,ch=c.height/H;
let dist,people,steps,gone,last=0,delay=90;
function field(){
  dist=Array.from({length:H},()=>Array(W).fill(1e9));
  let q=[[exit.x,exit.y]],i=0;dist[exit.y][ …

Excerpt — the full answer is on the round page.

▶ R78 · Crowd leaving a room by steeringauthor reference Open round →
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Evacuation</title>
<style>
html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui;overflow:hidden}
canvas{display:block;width:100vw;height:100vh}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c=document.getElementById("c"),x=c.getContext("2d");
let W,H,P,left,last=0;
function rnd(a,b){return a+Math.random()*(b-a)}
function reset(){
 W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);
 W=innerWidth;H=innerHeight;left=0;P=[];
 for(let i=0;i<60;i++)P.push({x:rnd(60,W-160),y:rnd(70,H-70),vx:rnd(-.4,.4),vy:rnd(-.4,.4),out:0});
}
onresize=reset;reset();
function step(t){
 let dt=Math.min(32,t-last||16)/16;last=t,ex=W-18,ey=H/2,sp=0,n=0;
 x.clea …

Excerpt — the full answer is on the round page.

▶ R79 · Aggregation on a latticeauthor reference Open round →
<!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 resi …

Excerpt — the full answer is on the round page.

▶ R80 · Aggregation by continuous driftauthor reference Open round →
<!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 …

Excerpt — the full answer is on the round page.

▶ R81 · Flocking birds with three rulesauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Flocking Birds</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#071017;color:#dff;font:14px system-ui}canvas{display:block}#s{position:fixed;left:12px;top:10px;background:#0008;padding:8px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=s></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),s=document.getElementById("s"),N=200,R=48,SR=18,MS=2.9,MF=.055;let W,H,b=[];
function z(){W=c.width=innerWidth;H=c.height=innerHeight}
onresize=z;z();
function rnd(a){return Math.random()*a}
function reset(){b=[];for(let i=0;i<N;i++){let a=rnd(7);b.push({x:rnd(W),y:rnd(H),vx:Math.cos(a)*(1+rnd(1.5)),vy:Math.sin(a)*(1+rnd(1.5))})}}
reset();
function lim(vx,vy,m){let l=Math.hypot(vx,vy)||1;return l>m?[vx/l*m,vy/l*m]:[vx,vy]}
function flocks(){let p=new Int16Array(N).fill(-1),n=0;fo …

Excerpt — the full answer is on the round page.

▶ R82 · Conway's Game of Life with seeded patternsauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Life</title><style>html,body{margin:0;height:100%;background:#071014;color:#d9f7ef;font:16px system-ui;overflow:hidden}body{display:grid;place-items:center}main{width:min(96vw,1200px)}canvas{width:100%;image-rendering:pixelated;background:#020405;border:1px solid #2b4a48}p{margin:.7rem 0 0;display:flex;gap:2rem}</style></head><body><main><canvas id=c width=120 height=80></canvas><p><span>Generation <b id=g>0</b></span><span>Live cells <b id=l>0</b></span></p></main><script>
const W=120,H=80,N=W*H,c=document.getElementById("c"),x=c.getContext("2d"),g=document.getElementById("g"),l=document.getElementById("l"),img=x.createImageData(W,H);let a=new Uint8Array(N),b=new Uint8Array(N),age=new Uint16Array(N),gen=0,last=-1,same=0,t=0;
function on(q,r){if(q>=0&&q<W&&r>=0&&r<H)a[r*W+q]=1}
function pat(q,r,p){p.forEach((row,y)=>[...row].forEach(( …

Excerpt — the full answer is on the round page.

▶ R83 · Fourier epicycles tracing a shapeauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Fourier Epicycles</title><style>html,body{margin:0;height:100%;background:#101418;color:#e9eef2;font:15px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:16px;top:12px;background:#0008;padding:8px 11px;border-radius:8px}</style></head><body><canvas id=c></canvas><div class=hud id=h></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),h=document.getElementById("h"),W,H,pts,coef,path,t=0,N=38;
function sz(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
onresize=sz;sz();
function target(){
 let a=[],n=520,r1=160+Math.random()*45,r2=55+Math.random()*35,k=3+(Math.random()*4|0),p=Math.random()*7;
 for(let i=0;i<n;i++){let u=i/n*6.2831853,r=r1+r2*Math.sin(k*u+p)+18*Math.cos(( …

Excerpt — the full answer is on the round page.

▶ R84 · Voronoi cells with moving seedsauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Voronoi</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id=c></canvas><script>
let C=c.getContext("2d"),O=document.createElement("canvas"),X=O.getContext("2d"),P=[],N=25,S=4,W,H,w,h,t=0;
function R(){
 W=c.width=innerWidth*devicePixelRatio|0;H=c.height=innerHeight*devicePixelRatio|0;
 w=O.width=Math.ceil(W/S);h=O.height=Math.ceil(H/S)
}
function I(){
 P=[];t=0;R();
 for(let i=0;i<N;i++){
  let a=Math.random()*7,r=.15+Math.random()*.55;
  P.push({x:Math.random()*W,y:Math.random()*H,vx:Math.cos(a)*r,vy:Math.sin(a)*r,c:[80+Math.random()*150,80+Math.random()*150,80+Math.random()*150]})
 }
}
onresize=R;I();
function A(){
 t++;if(t>3600)I();
 for(let p of P){
  p.x+=p.vx;p.y+=p.vy;
  if(p.x<0||p.x>W)p.vx*=-1,p.x=Math.max(0,Math.min(W,p.x) …

Excerpt — the full answer is on the round page.

▶ R85 · Travelling salesman improved by 2-optauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>TSP 2-opt</title><style>html,body{margin:0;height:100%;background:#101318;color:#e8edf2;font:15px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:14px;top:12px;background:#101318cc;border:1px solid #3a414b;border-radius:8px;padding:10px 12px;line-height:1.5}.b{color:#7bd88f}.y{color:#ffd166}</style></head><body><canvas id=c></canvas><div class=hud>length <span id=l class=b></span><br>improvements <span id=m class=y></span></div><script>
let C=c.getContext("2d"),W,H,P,T,A=0,B=2,S=0,I=0,last=0,mode=0,prog=0,base=0,after=0,old=[],seg=[];
onresize=()=>{W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;C.setTransform(1,0,0,1,0,0)};onresize();
function d(a,b){let x=P[a].x-P[b].x,y=P[a].y-P[b].y;return Math.hypot(x,y)}
function len(t){let s=0;for(let i=0;i<t.length;i++)s …

Excerpt — the full answer is on the round page.

▶ R86 · Scrolling terrain from value noiseauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Noise Landscape</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#79a7d8;font:16px monospace;color:white}canvas{display:block;width:100%;height:100%}#o{position:fixed;left:14px;top:12px;text-shadow:0 1px 3px #000}</style></head><body><canvas id="c"></canvas><div id="o"></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),o=document.getElementById("o"),W,H,dpr,seed=Math.random()*1e9,off=0,last=0;
function R(n){let s=Math.sin(n*127.1+seed)*43758.5453;return s-Math.floor(s)}
function S(t){return t*t*t*(t*(t*6-15)+10)}
function N(p,sc){p/=sc;let i=Math.floor(p),f=p-i,a=R(i),b=R(i+1);return a+(b-a)*S(f)}
function Ht(p){let v=.58*N(p,170)+.29*N(p,70)+.13*N(p,25);v=(v-.5)*1.75+.5;return Math.max(0,Math.min(1,v))}
function col(v){return v<.34?"#22699b":v<.38?"#d9c889":v<.62?"#3e8f45":v<.82?"#77736b": …

Excerpt — the full answer is on the round page.

▶ R87 · Gray-Scott reaction-diffusionauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Gray-Scott</title><style>html,body{margin:0;height:100%;background:#05070a;color:#d8f3ff;font:16px system-ui;overflow:hidden}canvas{width:100vw;height:100vh;image-rendering:pixelated;display:block}#s{position:fixed;left:14px;top:10px;text-shadow:0 1px 4px #000}</style></head><body><canvas id=c></canvas><div id=s></div><script>
let n=144,m=n*n,a,b,A,B,img,d,step,run=0,done=0,cv=c,ctx=cv.getContext('2d'),lab=s;
function R(){cv.width=n;cv.height=n;img=ctx.createImageData(n,n);d=img.data;A=new Float32Array(m);B=new Float32Array(m);a=new Float32Array(m);b=new Float32Array(m);for(let i=0;i<m;i++)A[i]=a[i]=1,B[i]=b[i]=0;for(let k=0;k<9;k++){let x=20+Math.random()*(n-40)|0,y=20+Math.random()*(n-40)|0,r=4+Math.random()*8|0;for(let j=-r;j<=r;j++)for(let i=-r;i<=r;i++)if(i*i+j*j<r*r){let p=(y+j)*n+x+i;B[p]=b[p]=.8+Math.random()*.2;A[p]=a[p]=.1}} …

Excerpt — the full answer is on the round page.

▶ R88 · L-system tree growing in windauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Fractal Tree</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#07110d;color:#d7ead5;font:16px system-ui}canvas{display:block;width:100%;height:100%}#i{position:fixed;left:16px;top:14px;background:#0007;padding:8px 11px;border-radius:6px;line-height:1.35;backdrop-filter:blur(4px)}</style></head><body><canvas id=c></canvas><div id=i></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),i=document.getElementById("i");let W,H,D,S,segs,n,b,done,wait,t0,wind,seed;
function R(a,b){return a+Math.random()*(b-a)}
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0)}
onresize=fit;fit();
function make(){
 D=5+(Math.random()*3|0);let s="X",r=["F[ …

Excerpt — the full answer is on the round page.

▶ R89 · Marching squares on a moving fieldauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Marching Metaballs</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#071016;color:#d9f6ff;font:14px system-ui}canvas{display:block;width:100%;height:100%}#n{position:fixed;left:14px;top:12px;background:#0009;padding:7px 10px;border:1px solid #ffffff24;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=n></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n"),W,H,balls=[],g=38,vals=[],segs=[];
function R(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(1,0,0,1,0,0);x.scale(devicePixelRatio,devicePixelRatio);W=innerWidth;H=innerHeight}
onresize=R;R();
function init(){balls=[];for(let i=0;i<7;i++)balls.push({x:Math.random()*W,y:Math.random()*H,r:80+Math.random()*95,a:Math.random()*6.28,s:.35+Math.random()*. …

Excerpt — the full answer is on the round page.

▶ R90 · Poisson-disk sampling, Bridson's algorithmauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Poisson Disk</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#07111f;color:#dbeafe;font:16px system-ui}canvas{display:block}#n{position:fixed;left:14px;top:10px;padding:6px 9px;background:#0008;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=n></div><script>
let C=c.getContext("2d"),W,H,r=18,k=30,cs,g,gw,gh,a,p,fill,rest=0;
function R(){W=c.width=innerWidth;H=c.height=innerHeight;S()}
onresize=R;
function S(){cs=r/Math.SQRT2;gw=Math.ceil(W/cs);gh=Math.ceil(H/cs);g=Array(gw*gh).fill(-1);a=[];p=[];C.fillStyle="#07111f";C.fillRect(0,0,W,H);C.fillStyle="#39f";let x=Math.random()*W,y=Math.random()*H;add(x,y);rest=0}
function add(x,y){let i=p.length;p.push([x,y]);a.push(i);g[(x/cs|0)+(y/cs|0)*gw]=i;C.beginPath();C.arc(x,y,2.2,0,7);C.fill()}
function ok(x,y){if(x<0||y<0||x>=W||y>=H)return 0;let gx …

Excerpt — the full answer is on the round page.

▶ R91 · Starfield tunnel in perspectiveauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Starfield</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#02030a;color:#dfe8ff;font:14px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:16px;top:14px;padding:8px 10px;background:#07101dcc;border:1px solid #29405d;border-radius:6px;line-height:1.5}</style></head><body><canvas id=c></canvas><div class=hud>stars: <b id=n></b><br>speed: <b id=s></b></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n"),sp=document.getElementById("s");let w,h,dpr,stars=[],N=520,speed=1.8,last=0;
function size(){dpr=devicePixelRatio||1;w=innerWidth;h=innerHeight;c.width=w*dpr;c.height=h*dpr;x.setTransform(dpr,0,0,dpr,0,0)}
function star(a){a.x=(Math.random()*2-1)*w;a.y=(Math.r …

Excerpt — the full answer is on the round page.

▶ R92 · Rotating wireframe solids with depth sortingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Wire Solids</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#090b10;color:#d8e6ff;font:14px system-ui}canvas{display:block;width:100%;height:100%}</style></head><body><canvas id=c></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d"),C=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],CE=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],T=[[0,1.25,0],[-1,-.7,-1],[1,-.7,-1],[0,-.7,1.15]],TE=[[0,1],[0,2],[0,3],[1,2],[2,3],[3,1]];
let W,H,D,objs=[],start=0,life=18000;
function rs(){let d=devicePixelRatio||1;W=c.width=innerWidth*d;H=c.height=innerHeight*d;x.setTransform(d,0,0,d,0,0);W=innerWidth;H=innerHeight}
onresize=rs;rs();
function rnd(a,b){return a+Math.random()*(b-a)}
fun …

Excerpt — the full answer is on the round page.

▶ R93 · Rotating wireframe height fieldauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Height Field</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#07090d;color:#dce7ff;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}#i{position:fixed;left:14px;top:12px;background:#0009;padding:8px 10px;border:1px solid #3b465b;border-radius:6px;white-space:pre}</style></head><body><canvas id=c></canvas><div id=i></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),i=document.getElementById("i");
let W,H,DPR,pts,n=38,seed,life,start=0;
function R(){seed=Math.random()*9;life=18000+Math.random()*9000;pts=[];for(let z=0;z<n;z++)for(let q=0;q<n;q++)pts.push({x:(q/(n-1)-.5)*7,z:(z/(n-1)-.5)*7,y:0});start=performance.now()}
function S(){DPR=Math.min(devicePixelRatio||1,2);W=c.width=innerWidth*DPR;H=c.height=innerHeight*DPR;x.setTransform(DPR,0,0,DPR,0,0);W=innerWidth;H=innerHeight …

Excerpt — the full answer is on the round page.

▶ R94 · Raycast maze walkthroughauthor reference Open round →
<!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 …

Excerpt — the full answer is on the round page.

▶ R95 · Shaded sphere by painter's algorithmauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Sphere</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#07090d;color:#dfe7ff;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}#n{position:fixed;left:16px;top:14px;padding:8px 10px;background:#111827cc;border:1px solid #2c3447;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=n></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n");let W,H,D,P,T,R,rx,ry,rz,done;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;c.style.width=innerWidth+"px";c.style.height=innerHeight+"px";x.setTransform(1,0,0,1,0,0);R=Math.min(W,H)*.34;D=R*3}
onresize=fit;fit();
function reset(){P=[];T=0;done=0;let m=620+Math.random()*260|0,g=Math.PI*(3-Math.sqrt(5));n.textContent=m+" points";for(let i=0;i<m;i++){let z= …

Excerpt — the full answer is on the round page.

▶ R96 · Force-directed graph settlingauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Force graph</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:14px system-ui}canvas{display:block;width:100%;height:100%}#hud{position:fixed;left:12px;top:10px;background:#0009;padding:8px 10px;border-radius:6px}</style></head><body><canvas id="c"></canvas><div id="hud"></div><script>
let c=document.getElementById('c'),x=c.getContext('2d'),h=document.getElementById('hud'),N=25,n=[],e=[],W,H,settle=0;
function size(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}onresize=size;size();
function rnd(a,b){return a+Math.random()*(b-a)}
function start(){n=[];e=[];settle=0;for(let i=0;i<N;i++)n.push({x:rnd(W*.35,W*.65),y:rnd(H*.35,H*.65),vx:rnd(-3,3),vy:rnd(-3,3),m:"n"+i});for(let i=0;i<N;i++)for(le …

Excerpt — the full answer is on the round page.

▶ R97 · Circle packing without overlapauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Circle Packing</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#08090d;color:#eef;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:14px;top:12px;padding:9px 11px;background:#0009;border:1px solid #fff2;border-radius:8px;backdrop-filter:blur(6px)}b{font-variant-numeric:tabular-nums}</style></head><body><canvas id=c></canvas><div class=hud><b id=n>0</b> circles · <b id=p>0.0</b>% covered</div><script>
const q=document.getElementById("c"),x=q.getContext("2d"),N=document.getElementById("n"),P=document.getElementById("p");
let W,H,A,cs,g=null,tries=0,stop=0;
function fit(){let d=devicePixelRatio||1;W=innerWidth;H=innerHeight;q.width=W*d;q.height=H*d;x.setTransform(d,0,0,d,0,0);A=W*H;reset()}
onresize=fit;
function hue(r){return 205+Math.min(135,r*4)}
function fill(r){return` …

Excerpt — the full answer is on the round page.

▶ R98 · Squarified treemap of changing dataauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Treemap</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id=c></canvas><script>
let C=c.getContext('2d'),W,H,DPR,items=[],boxes=[],next=[],t=0,phase=0,dur=5200,hu=Math.random()*360;
function rnd(){let a=[];for(let i=0;i<22;i++)a.push({n:'Item '+(i+1),w:3+Math.random()*30,v:0,x:0,y:0,w0:0,h:0,tx:0,ty:0,tw:0,th:0});return a}
function size(){DPR=devicePixelRatio||1;W=c.width=innerWidth*DPR;H=c.height=innerHeight*DPR;c.style.width=innerWidth+'px';c.style.height=innerHeight+'px'}
onresize=size;size();
function worst(r,s,m,M){let q=s*s;return Math.max(q*M/(r*r),r*r/(q*m))}
function layout(a,x,y,w,h,out){let sum=a.reduce((p,o)=>p+o.w,0);a=a.slice().sort((p,q)=>q.w-p.w).map(o=>({o,a:o.w*w*h/sum}));sq(a,x,y,w,h,out)}
function sq(a,x,y,w,h,out …

Excerpt — the full answer is on the round page.

▶ R99 · Three sorting algorithms racingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Sort Race</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:14px system-ui,Arial;overflow:hidden}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id=c></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d");let W,H,sorts,base;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
onresize=fit;fit();
function* bubble(a){let n=a.length;for(let i=0;i<n;i++)for(let j=0;j<n-i-1;j++){yield[j,j+1,0];if(a[j]>a[j+1]){[a[j],a[j+1]]=[a[j+1],a[j]];yield[j,j+1,1]}}}
function* insertion(a){for(let i=1;i<a.length;i++){let k=a[i],j=i-1;while(j>=0){yield[j,j+1,0];if(a[j]<=k)break;a[j+1]=a[j];y …

Excerpt — the full answer is on the round page.

▶ R100 · Sankey flow with travelling particlesauthor reference Open round →
<html><head><meta charset="utf-8"><title>Sankey</title><style>html,body{margin:0;height:100%;background:#101318;color:#e9edf2;font:15px system-ui}canvas{display:block;width:100%;height:100%}#t{position:fixed;left:18px;top:14px;padding:7px 10px;background:#0008;border:1px solid #fff2;border-radius:6px}</style></head><body><canvas id="c"></canvas><div id="t"></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),T=document.getElementById("t");
let W,H,DPR,run=0,S,A,P;
function R(a,b){return a+Math.random()*(b-a)}
function init(){run=0;P=[];S=["Solar","Wind","Hydro"].map((n,i)=>({n,i,x:.18,y:.26+i*.24,c:["#ffce45","#68d5ff","#62d98b"][i]}));A=["Homes","Transit","Industry","Storage"].map((n,i)=>({n,i,x:.82,y:.18+i*.21,c:["#ff7b6e","#9f8cff","#4bd9c8","#f1f06b"][i]}));let k=0;S.forEach(s=>A.forEach(a=>{if(Math.random()>.18)P.push({s,a,b:R(18,85),v:0,p:[],h:k++})}));if(P.leng …

Excerpt — the full answer is on the round page.

▶ R101 · Langton's ant building a highwayauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Langton's Ant</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#ddd;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}#s{position:fixed;left:14px;top:12px;background:#0009;padding:8px 10px;border-radius:6px;color:#fff}</style></head><body><canvas id=c></canvas><div id=s>0</div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),s=document.getElementById("s"),n=161,g,a,b,d,t,z,ox,oy,m=620,lim=22000;
function R(){let w=innerWidth,h=innerHeight,rr=devicePixelRatio||1;c.width=w*rr;c.height=h*rr;x.setTransform(rr,0,0,rr,0,0);z=Math.max(3,Math.floor(Math.min(w,h)/(n+6)));ox=(w-n*z)/2;oy=(h-n*z)/2}
onresize=R;R();
function N(){g=new Uint8Array(n*n);a=(n/2|0)+(Math.random()*11-5|0);b=(n/2|0)+(Math.random()*11-5|0);d=Math.random()*4|0;t=0}
function P(){let i=b*n+a,v=g[i];d=(d+(v?-1 …

Excerpt — the full answer is on the round page.

▶ R102 · Rule 110 growing line by lineauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Rule 110</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#f5f5f2;color:#111;font:14px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh;image-rendering:pixelated}#r{position:fixed;top:10px;left:10px;background:#ffffffe6;padding:6px 9px;border:1px solid #bbb}</style></head><body><canvas id="c"></canvas><div id="r">row 0</div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),r=document.getElementById("r");
let w,h,cell,cols,rows,a,b,img,row,seed=0,frames=0;
function size(){
 let d=devicePixelRatio||1;
 c.width=innerWidth*d;c.height=innerHeight*d;
 x.setTransform(d,0,0,d,0,0);
 cell=Math.max(2,Math.floor(innerWidth/220));
 cols=Math.floor(innerWidth/cell);rows=Math.floor(innerHeight/cell);
 restart()
}
function restart(){
 a=new Uint8Array(cols);b=new Uint8Array(cols);
 a[cols>> …

Excerpt — the full answer is on the round page.

▶ R103 · Wireworld with a clock and a diodeauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Wireworld</title><style>html,body{margin:0;height:100%;background:#05070b;color:#dce7ff;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:12px;top:10px;background:#0009;padding:8px 10px;border:1px solid #234;border-radius:6px}</style></head><body><canvas id=c></canvas><div class=hud>step <b id=s>0</b> electrons <b id=e>0</b></div><script>
const C=c.getContext("2d"),S=s,E=e,W=90,H=58,N=W*H,EMP=0,CON=1,HE=2,TA=3;
let a,b,st,seed,scale,ox,oy,last=0,acc=0,done=0;
function I(x,y){return y*W+x}
function line(x1,y1,x2,y2){let dx=Math.sign(x2-x1),dy=Math.sign(y2-y1),x=x1,y=y1;for(;;){a[I(x,y)]=CON;if(x==x2&&y==y2)break;x+=dx;y+=dy}}
function loop(x,y,w,h){line(x,y,x+w,y);line(x+w,y,x+w,y+h);line(x+w,y+h,x,y+h);line(x,y+h,x,y)}
function diode(x,y,d){let q=d>0?1:-1;line(x-8*q,y,x-2*q,y);line(x+2*q,y,x+8* …

Excerpt — the full answer is on the round page.

▶ R104 · Abelian sandpile topplingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Sandpile</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#07080a;color:#dfe7ee;font:14px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh}#h{position:fixed;left:14px;top:12px;background:#0b1018cc;border:1px solid #263142;border-radius:8px;padding:10px 12px;line-height:1.45;backdrop-filter:blur(8px);box-shadow:0 8px 30px #0008}.n{font-variant-numeric:tabular-nums;color:#fff}</style></head><body><canvas id=c></canvas><div id=h>Grains <span id=g class=n>0</span><br>Topplings <span id=t class=n>0</span></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),G=document.getElementById("g"),T=document.getElementById("t"),w,h,n,a,b,q,qi,drops,tops,done,scale,pal;
function init(){w=innerWidth;h=innerHeight;devicePixelRatio> …

Excerpt — the full answer is on the round page.

▶ R105 · Brian's Brainauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Brian's Brain</title><style>html,body{margin:0;height:100%;background:#071014;color:#dbe7e4;font:16px system-ui,sans-serif;overflow:hidden}canvas{display:block;width:100vw;height:100vh;image-rendering:pixelated}.hud{position:fixed;left:14px;top:12px;background:#071014cc;border:1px solid #29424a;border-radius:6px;padding:8px 10px;line-height:1.35}</style></head><body><canvas id="c"></canvas><div class="hud">Gen <b id="g">0</b><br>Live <b id="l">0</b></div><script>
const W=160,H=120,N=W*H,c=document.getElementById("c"),x=c.getContext("2d"),g=document.getElementById("g"),l=document.getElementById("l"),a=new Uint8Array(N),b=new Uint8Array(N),img=x.createImageData(W,H),p=img.data;
let gen=0,live=0,last=0;
function seed(){gen=0;live=0;for(let i=0;i<N;i++){let r=Math.random();a[i]=r<.1?1:r<.14?2:0;if(a[i]==1)live++}}
function size(){let s= …

Excerpt — the full answer is on the round page.

▶ R106 · Truchet tiles rearrangingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Truchet Flow</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:14px monospace}canvas{display:block}#h{position:fixed;left:12px;top:10px;background:#0008;padding:6px 9px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=h></div><script>
let C=c.getContext('2d'),W,H,S,N,M,g,o,f=[],t=0,done=0,life=0;function R(){W=c.width=innerWidth;H=c.height=innerHeight;S=Math.max(22,Math.min(54,(W*H/900|0)**.5));N=Math.ceil(W/S);M=Math.ceil(H/S);g=Array(N*M).fill(0).map(_=>Math.random()<.5?0:1);o=g.slice();f=[];done=0;life=0}onresize=R;R();function tile(x,y,v,a){let px=x*S,py=y*S,r=S/2;C.globalAlpha=a;C.strokeStyle='hsl('+(170+80*Math.sin((x*17+y*23+t)*.02))+',85%,62%)';C.lineWidth=Math.max(3,S*.16);C.lineCap='round';C.beginPath();if(v){C.arc(px,py,r,0,Math.PI/2);C.arc(px+S,py+S,r,Math.PI,M …

Excerpt — the full answer is on the round page.

▶ R107 · Hilbert curve drawing itselfauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Hilbert</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#090b10;color:#e9eef7;font:14px system-ui,sans-serif}body{display:grid;place-items:center}canvas{width:min(92vmin,900px);height:min(92vmin,900px);box-shadow:0 0 0 1px #293040;background:#080a0f}.hud{position:fixed;left:16px;top:14px;padding:8px 10px;background:#111827cc;border:1px solid #2d3648;border-radius:8px;backdrop-filter:blur(8px)}b{font-weight:650}</style></head><body><canvas id=c></canvas><div class=hud>Order <b id=o></b> · <b id=p></b> points</div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),O=[5,6,7],oe=document.getElementById("o"),pe=document.getElementById("p");let oi=Math.random()*3|0,n=0,N=0,i=0,pts=[],last=0,spd=1,h=0,dir=1;
function d2xy(n,d){let x=0,y=0 …

Excerpt — the full answer is on the round page.

▶ R108 · Interlocking star pattern on a gridauthor reference Open round →
<html><body><canvas id=c></canvas><script>
let C=c.getContext("2d"),W,H,t=0,S=[],N=0,G=0,life=0;
onresize=()=>{c.width=W=innerWidth;c.height=H=innerHeight};onresize();
function P(x,y,r,n,a){let p=[];for(let i=0;i<n;i++){let q=a+i*2*Math.PI/n;p.push([x+Math.cos(q)*r,y+Math.sin(q)*r])}return p}
function L(a,b,d){let x=b[0]-a[0],y=b[1]-a[1],l=Math.hypot(x,y);return[a[0]-x/l*d,a[1]-y/l*d,b[0]+x/l*d,b[1]+y/l*d]}
function X(A,B){let x1=A[0],y1=A[1],x2=A[2],y2=A[3],x3=B[0],y3=B[1],x4=B[2],y4=B[3],d=(x1-x2)*(y3-y4)-(y1-y2)*(x3-x4);if(Math.abs(d)<.01)return null;let px=((x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4))/d,py=((x1*y2-y1*x2)*(y3-y4)-(y1-y2)*(x3*y4-y3*x4))/d;return[px,py]}
function seg(A,B){S.push([A[0],A[1],B[0],B[1]])}
function make(){S=[];let g=G=5+(Math.random()*3|0),sp=Math.min(W,H)/(g+1),r=sp*.33,n=Math.random()<.5?8:6,a=Math.random()*9,pol=[];for(let y=-1;y<=g;y++)for(let x=-1;x<=g …

Excerpt — the full answer is on the round page.

▶ R109 · Moire from two rotating rastersauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Moire Rings</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:12px;top:10px;background:#0009;padding:8px 10px;border-radius:6px;line-height:1.4}</style></head><body><canvas id=c></canvas><div class=hud><div>angle: <span id=a></span></div><div>offset: <span id=o></span></div></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),A=document.getElementById("a"),O=document.getElementById("o"),p=document.createElement("canvas"),q=p.getContext("2d");let w,h,dpr,end,base,span,ph,dir;
function fit(){dpr=devicePixelRatio||1;w=c.width=innerWidth*dpr;h=c.height=innerHeight*dpr;c.style.width=innerWidth+"px";c.style.height=innerHeight+"px";let s=Math.ceil(Math.hypot(w,h)*1.15);p.width=p.height=s;q.setTr …

Excerpt — the full answer is on the round page.

▶ R110 · Penrose-style aperiodic tiling growingauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Rhombus Tiling</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:14px system-ui}#i{position:fixed;left:12px;top:10px;background:#0008;padding:7px 10px;border-radius:6px}canvas{display:block;width:100%;height:100%}</style></head><body><canvas id="c"></canvas><div id="i"></div><script>
let c=document.getElementById('c'),x=c.getContext('2d'),info=document.getElementById('i'),P=[],gen=0,max=5,t=0,hold=40,run=0,phi=(1+Math.sqrt(5))/2,ang=Math.PI/5;
function C(a){return{x:Math.cos(a),y:Math.sin(a)}}
function add(p,q,r,s,k){P.push({p,q,r,s,k})}
function lerp(a,b,u){return{x:a.x+(b.x-a.x)*u,y:a.y+(b.y-a.y)*u}}
function seed(){P=[];gen=0;t=0;run++;let R=90+Math.random()*35,rot=Math.random()*6.28,cc={x:0,y:0};for(let i=0;i<10;i++){let a=rot+i*ang,b=rot+(i+1)*ang,p={x:R*Math.cos(a),y:R*Math.sin(a)},q= …

Excerpt — the full answer is on the round page.

▶ R111 · Ant colony laying pheromone trailsauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Ant Colony</title><style>html,body{margin:0;height:100%;background:#10130f;overflow:hidden;color:#e8e0c8;font:15px system-ui}canvas{display:block;width:100vw;height:100vh}#h{position:fixed;left:12px;top:10px;background:#0008;padding:7px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=h></div><script>
let C=c.getContext('2d'),W,H,GW=120,GH=80,S,P,A,N,F,home,food,left;
function R(a=1){return Math.random()*a}function reset(){W=c.width=innerWidth;H=c.height=innerHeight;S=Math.min(W/GW,H/GH);P=new Float32Array(GW*GH);N={x:W*.23,y:H*.5,r:22};F={x:W*(.62+R(.25)),y:H*(.2+R(.6)),r:28};home=0;food=190;left=0;A=[];for(let i=0;i<95;i++)A.push({x:N.x+R(10)-5,y:N.y+R(10)-5,a:R(6.28),v:1.2+R(.9),q:0})}
function at(x,y){let gx=x/S|0,gy=y/S|0;return gx<0||gy<0||gx>=GW||gy>=GH?0:gy*GW+gx}
function sniff(a,o){let d=24,x=a.x+Mat …

Excerpt — the full answer is on the round page.

▶ R112 · Physarum slime-mould networkauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Physarum</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#050608;color:#dfe;font:14px system-ui}canvas{display:block}#i{position:fixed;left:12px;top:10px;text-shadow:0 1px 4px #000}</style></head><body><canvas id=c></canvas><div id=i></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),i=document.getElementById("i"),w,h,n,p,t,a,b,s=0,done=0;
function R(){w=c.width=innerWidth;h=c.height=innerHeight;n=Math.min(9000,Math.max(2500,(w*h/95)|0));p=new Float32Array(n*3);t=new Float32Array(w*h);a=new Float32Array(w*h);b=x.createImageData(w,h);for(let k=0;k<n;k++){let r=Math.random()*Math.min(w,h)*.18,q=Math.random()*7;p[k*3]=w/2+Math.cos(q)*r;p[k*3+1]=h/2+Math.sin(q)*r;p[k*3+2]=q+Math.PI/2}s=done=0}
onresize=R;R();
function S(px,py,ang){let d=10,xx=(px+Math.cos(ang)*d+w)%w|0,yy=(py+Math.sin(ang)*d+h)% …

Excerpt — the full answer is on the round page.

▶ R113 · Predator and prey on a shared fieldauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Predator Prey</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:16px system-ui}canvas{display:block}#p{position:fixed;left:12px;top:10px;background:#0008;padding:8px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=p></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),p=document.getElementById("p"),W,H,G=36,gw,gh,food,prey,pred,t=0;
function R(n){return Math.random()*n}
function S(){W=c.width=innerWidth;H=c.height=innerHeight;gw=Math.ceil(W/G);gh=Math.ceil(H/G)}
onresize=S;S();
function start(){food=Array(gw*gh).fill(0).map(_=>.25+R(.7));prey=[];pred=[];for(let i=0;i<70;i++)prey.push({x:R(W),y:R(H),e:9+R(5),a:R(7)});for(let i=0;i<18;i++)pred.push({x:R(W),y:R(H),e:28+R(10),a:R(7)})}
function wrap(o){if(o.x<0)o.x+=W;if(o.x>W)o.x-=W;if(o.y<0)o.y+=H;if( …

Excerpt — the full answer is on the round page.

▶ R114 · Traffic jam from nothingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Ring Traffic</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}body{display:grid;place-items:center}canvas{width:100vw;height:100vh;display:block}</style></head><body><canvas id=c></canvas><script>
const C=c,x=C.getContext('2d');let W,H,R,cx,cy,L=180,N=54,V=5,P=.32,stepMs=90,t=0,last=0,s=0,cars=[];
function size(){let d=devicePixelRatio||1;W=innerWidth;H=innerHeight;C.width=W*d;C.height=H*d;x.setTransform(d,0,0,d,0,0);cx=W/2;cy=H/2;R=Math.min(W,H)*.34}onresize=size;size();
function init(){cars=[];let sp=L/N;for(let i=0;i<N;i++)cars.push({p:Math.floor(i*sp),o:Math.floor(i*sp),v:i%9?2:0});s=0}init();
function sim(){cars.sort((a,b)=>a.p-b.p);let old=cars.map(a=>a.p),mv=0;for(let i=0;i<N;i++){let a=cars[i],b=cars[(i+1)%N],g=(b.p-a.p- …

Excerpt — the full answer is on the round page.

▶ R115 · Crowd leaving through a bottleneckauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Crowd Exit</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#ddd;font:15px system-ui}canvas{display:block;width:100vw;height:100vh}#h{position:fixed;left:14px;top:12px;background:#0009;padding:8px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=h></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),h=document.getElementById("h"),W,H,S,door,ps=[],gone=0,last=0,rate=0,t0=0;
function R(a,b){return a+Math.random()*(b-a)}
function reset(){
 W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight;S=Math.min(W,H);door={x:W/2,w:S*.085,y:24};ps=[];gone=0;last=0;rate=0;t0=performance.now();
 let n=Math.max(360,Math.min(720,(W*H/1900)|0));
 for(let i=0;i<n;i++)ps. …

Excerpt — the full answer is on the round page.

▶ R116 · Bresenham circles and lines, pixel by pixelauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Bresenham Pixels</title><style>html,body{margin:0;height:100%;background:#101418;color:#e8f0f2;font:16px system-ui;overflow:hidden}canvas{width:100vw;height:100vh;image-rendering:pixelated;display:block}#c{position:fixed;left:14px;top:12px;background:#0008;padding:7px 10px;border-radius:6px}</style></head><body><canvas id=a></canvas><div id=c>0 px</div><script>
let q=a.getContext("2d"),d=c,im,w,h,p=[],i=0,done=0,ang=0,scale=2;
function R(n){return Math.random()*n|0}
function pix(x,y,r,g,b){
 if(x<0||y<0||x>=w||y>=h)return;
 let n=(y*w+x)*4;im.data[n]=r;im.data[n+1]=g;im.data[n+2]=b;im.data[n+3]=255;done++
}
function line(x0,y0,x1,y1,col){
 x0|=0;y0|=0;x1|=0;y1|=0;
 let dx=Math.abs(x1-x0),sx=x0<x1?1:-1,dy=-Math.abs(y1-y0),sy=y0<y1?1:-1,e=dx+dy;
 for(;;){
  p.push([x0,y0,col]);
  if(x0==x1&&y0==y1)break;
  let e2=e*2;
  if(e2>=dy){e+=dy …

Excerpt — the full answer is on the round page.

▶ R117 · De Casteljau construction of a Bezier curveauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>De Casteljau</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#0b0d10;color:#dfe7f1;font:14px/1.35 system-ui,Segoe UI,sans-serif}canvas{display:block;width:100vw;height:100vh}#i{position:fixed;left:14px;top:12px;white-space:pre;background:#101820cc;border:1px solid #304154;padding:10px 12px;border-radius:6px;box-shadow:0 8px 28px #0008}</style></head><body><canvas id="c"></canvas><div id="i"></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),i=document.getElementById("i");let W,H,D,P,V,t=0,last=0,path=[];
function rnd(a,b){return a+Math.random()*(b-a)}
function reset(){P=[];V=[];path=[];t=0;for(let k=0;k<4;k++){P.push({x:rnd(W*.18,W*.82),y:rnd(H*.2,H*.8)});V.push({x:rnd(-.22,.22),y:rnd(-.18,.18)})}}
function size(){D=devicePixelRatio||1;W=innerWidth;H=innerHeight;c.width=W*D;c.height=H*D; …

Excerpt — the full answer is on the round page.

▶ R118 · Sutherland-Hodgman polygon clippingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Sutherland-Hodgman</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:16px;top:14px;background:#0009;padding:10px 12px;border:1px solid #555;border-radius:6px;line-height:1.35}</style></head><body><canvas id=c></canvas><div class=hud id=h></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),h=document.getElementById("h");
let W,H,win,poly,base,t0,dur=10500;
function size(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight;win={l:W*.28,r:W*.72,t:H*.25,b:H*.75}}onresize=size;size();
function fresh(){let n=8+Math.random()*4|0,a=[],R=Math.min(W,H)*(.13+Math.random()*.05);for(let i=0;i<n;i++){let q= …

Excerpt — the full answer is on the round page.

▶ R119 · Floyd-Steinberg dithering a gradientauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Dither</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px monospace;overflow:hidden}canvas{width:100vw;height:100vh;image-rendering:pixelated;display:block}#i{position:fixed;left:12px;top:10px;background:#0008;padding:6px 8px}</style></head><body><canvas id=c></canvas><div id=i></div><script>
let C=c.getContext("2d"),W=220,H=150,P,F=0,S=0,D,T=420;
function R(){P=2+(Math.random()*5|0);F=0;S=Math.random()*9}
function Z(){let r=devicePixelRatio||1;c.width=innerWidth*r;c.height=innerHeight*r;C.setTransform(r,0,0,r,0,0)}
onresize=Z;Z();R();
function A(t){let im=C.createImageData(W,H),a=new Float32Array(W*H),e=new Float32Array((W+2)*(H+1)),k=0,x,y,v,q,er,idx;for(y=0;y<H;y++)for(x=0;x<W;x++){v=128+70*Math.sin(x*.045+S+t*.0017)+55*Math.sin((x+y)*.035+t*.0011)+42*Math.cos((Math.hypot(x-W/2,y-H/2))* .075-t*.0013); …

Excerpt — the full answer is on the round page.

▶ R120 · Scanline fill of a self-intersecting polygonauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>scanline</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111;color:#eee;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}#i{position:fixed;top:12px;left:12px;background:#0008;padding:8px 10px;border:1px solid #fff3}</style></head><body><canvas id=c></canvas><div id=i></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),info=document.getElementById("i");let W,H,P,t0=0,dur=22000;
function fit(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}onresize=fit;fit();
function fresh(){let n=7+Math.random()*5|0,a=[];for(let k=0;k<n;k++){let ang=k*2*Math.PI/n,r=.22+Math.random()*.23;a.push({a:ang,r:r,ph:Math.random()*7,sp:.35+Math.random()*.8})}let step=2+Math.random()*3| …

Excerpt — the full answer is on the round page.

▶ R121 · A* pathfinding search across an obstacle gridauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>A*</title><style>html,body{margin:0;height:100%;background:#15191f;color:#dfe6ee;font:16px system-ui}body{display:grid;place-items:center}canvas{background:#202630;box-shadow:0 0 0 1px #46515f;width:min(94vw,94vh);height:min(94vw,94vh);image-rendering:pixelated}#s{position:fixed;left:14px;top:12px;background:#10151bcc;padding:8px 10px;border-radius:6px}</style></head><body><div id=s></div><canvas id=c width=640 height=640></canvas><script>
let c=document.getElementById('c'),x=c.getContext('2d'),s=document.getElementById('s'),N=40,z=c.width/N,g,o,op,cl,ca,st,en,path,done,wait,exp,plen;
function R(n){return Math.random()*n|0}function key(p){return p.x+','+p.y}function h(a,b){return Math.abs(a.x-b.x)+Math.abs(a.y-b.y)}function init(){g=Array(N*N).fill(0);for(let i=0;i<N*N;i++)g[i]=Math.random()<.25;do st={x:R(N),y:R(N)};while(g[st.y*N+ …

Excerpt — the full answer is on the round page.

▶ R122 · Randomized maze generation via recursive backtrackingauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Maze</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#10131a;color:#e7edf6;font:15px system-ui}canvas{display:block;width:100vw;height:100vh}#n{position:fixed;left:14px;top:12px;padding:8px 11px;background:#10131acc;border:1px solid #334052;border-radius:8px}</style></head><body><canvas id=c></canvas><div id=n></div><script>
const C=c.getContext("2d"),N=document.getElementById("n");let W,H,S,cols,rows,g,st,cur,seen,done,t=0;
function R(a){return a[Math.random()*a.length|0]}
function init(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;S=Math.max(12,Math.floor(Math.min(W,H)/34));cols=Math.floor(W/S);rows=Math.floor(H/S);g=[];for(let y=0;y<rows;y++)for(let x=0;x<cols;x++)g.push({x,y,v:0,w:[1,1,1,1]});st=[];cur=g[Math. …

Excerpt — the full answer is on the round page.

▶ R123 · Breadth-first flood fill spreading through a regionauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Flood Fill</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#10131a;color:#eef;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:14px;top:12px;background:#0008;padding:9px 12px;border-radius:6px;backdrop-filter:blur(5px);letter-spacing:.3px}</style></head><body><canvas id="c"></canvas><div class="hud">step <b id="s">0</b> | filled <b id="f">0</b></div><script>
const c=document.getElementById('c'),x=c.getContext('2d'),S=document.getElementById('s'),F=document.getElementById('f');let W,H,n,m,cs,g,d,front,next,step,filled,done,last=0,delay=90;
function R(a){return Math.random()*a|0}
function init(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);cs=Math.max(14,Math.min(28,innerWidth/32| …

Excerpt — the full answer is on the round page.

▶ R124 · Dijkstra's shortest path over weighted terrainauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Dijkstra</title><style>html,body{margin:0;height:100%;background:#101318;color:#eef;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}#s{position:fixed;left:12px;top:10px;background:#0009;padding:8px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=s></div><script>
let C=c.getContext("2d"),S=document.getElementById("s"),W,H,n,m,a,d,p,q,u,v,src,tgt,done,path,tick,wait,scale=24,inf=1e9;
function R(x){return Math.random()*x|0}
function init(){
 W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;C.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);
 n=Math.max(16,Math.floor(innerWidth/scale));m=Math.max(12,Math.floor(innerHeight/scale));
 a=Array(n*m);d=Array(n*m).fill(inf);p=Array(n*m).fill(-1);q=[];u=Array(n*m).fill(0);path=[];done=0;tick=0;wait=0;
 for(let i=0;i<a …

Excerpt — the full answer is on the round page.

▶ R125 · Voronoi diagram growing by multi-source flood fillauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Voronoi Flood</title><style>html,body{margin:0;height:100%;background:#111;overflow:hidden;font:16px system-ui;color:white}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;top:14px;left:14px;background:#0009;padding:8px 10px;border-radius:6px}</style></head><body><canvas id="c"></canvas><div class="hud">Cells: <span id="n">0</span></div><script>
const c=document.getElementById('c'),x=c.getContext('2d'),n=document.getElementById('n');let W,H,S,gw,gh,seeds,owner,q,next,claimed,done,img,scale=8,hold=0,colors=['#e84a5f','#2a9d8f','#f4a261','#4cc9f0','#b5179e','#90be6d','#f9c74f','#577590'];
function start(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(1,0,0,1,0,0);gw=Math.ceil(W/scale);gh=Math.ceil(H/scale);S=gw*gh;owner=new Int16Array(S).fill(-1);q=[];next=[];claimed=0;do …

Excerpt — the full answer is on the round page.

▶ R126 · Bubble sort sweeping bars into orderauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Bubble Sort</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:14px;top:12px;background:#0008;padding:8px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div class=hud>Comparisons: <span id=n>0</span></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n");let a,i,j,pass,cmp,phase,t,u,v,done,w,h,m;
function reset(){a=Array.from({length:80},()=>Math.random());i=0;j=0;pass=0;cmp=0;phase=0;t=0;done=0;n.textContent=0}
function size(){let d=devicePixelRatio||1;c.width=innerWidth*d;c.height=innerHeight*d;x.setTransform(d,0,0,d,0,0);w=innerWidth;h=innerHeight;m=Math.max(16,w*.03)}
onresize=size;size();reset();
function step(){if(phase)return;if(j>=a.length-1-pass){pa …

Excerpt — the full answer is on the round page.

▶ R127 · Quicksort partitioning around glowing pivotsauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Quicksort</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:16px;top:12px;background:#0008;padding:8px 11px;border-radius:6px}</style></head><body><canvas id="c"></canvas><div class="hud">swaps: <b id="s">0</b></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),s=document.getElementById("s");
let a=[],ops=[],sw=0,n=80,op=0,prog=1,last=0;
function size(){c.width=innerWidth*devicePixelRatio;c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0)}
onresize=size;size();
function make(){a=Array.from({length:n},()=>20+Math.random()*75);ops=[];sw=op=0;prog=1;s.textContent=0;sort(0,n-1)}
function add(t,o){ops.push(Object.assign({t,l:-1,r:-1,p:-1,i:-1,j:-1},o))}
function …

Excerpt — the full answer is on the round page.

▶ R128 · Merge sort weaving runs togetherauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title></title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui;overflow:hidden}#t{position:fixed;left:16px;top:12px;z-index:2}canvas{display:block;width:100vw;height:100vh}</style></head><body><div id=t></div><canvas id=c></canvas><script>
let c=document.getElementById('c'),x=c.getContext('2d'),t=document.getElementById('t'),W,H,n=80,a,p,w,q,act,fin;
function R(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight;w=W/n}onresize=R;R();
function S(){a=[...Array(n)].map((_,i)=>({v:20+Math.random()*(H-90),x:i*w,tx:i*w}));p=1;q=[];act=0;fin=0;M()}
function M(){q=[];for(let l=0;l<n;l+=2*p){let m=Math.min(l+p,n),r=Math.min(l+2*p,n),L=a.slice(l,m),R=a.slice(m,r),o=[],i=0,j=0;while(i<L.length||j<R.length …

Excerpt — the full answer is on the round page.

▶ R129 · Heap sort sifting the maximum to the backauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Heap Sort</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id=c></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d");let a,n=80,sw=0,st=[],hi=[],end=0,phase="",msg="";
function init(){a=Array.from({length:n},()=>.08+Math.random()*.9);sw=0;st=[];hi=[];end=n;for(let i=(n>>1)-1;i>=0;i--)sift(i,n);st.push(()=>{phase="sort"});for(let e=n-1;e>0;e--){st.push(()=>{hi=[0,e];end=e;swap(0,e);msg="move max"});sift(0,e);st.push(()=>{hi=[];end=e})}st.push(()=>{end=0;hi=[];msg="done"});phase="heap";msg="build heap"}
function swap(i,j){let t=a[i];a[i]=a[j];a[j]=t;sw++}
function sift(r,e){for(;;){let l=r*2+1,m=r;if(l<e&&a[l]>a[m])m=l;if(l+1<e&&a[l+1]>a[m])m=l+1;if(m==r){let q=r;st.push(()=>{hi=[q];msg="sift check …

Excerpt — the full answer is on the round page.

▶ R130 · Radix sort ordering by one digit at a timeauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Radix Sort</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id="c"></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d"),N=80,C=["#e84a5f","#ff847c","#fecea8","#99b898","#4cc9f0","#4895ef","#4361ee","#7209b7","#b5179e","#f72585"];let w,h,a=[],from=[],to=[],ord=[],pass=1,place=1,t0=0,move=900,pause=350,phase=0,max=0;
function R(){let d=devicePixelRatio||1;w=c.width=innerWidth*d;h=c.height=innerHeight*d;x.setTransform(d,0,0,d,0,0);w=innerWidth;h=innerHeight}onresize=R;R();
function fresh(){a=[];for(let i=0;i<N;i++)a.push(10+Math.random()*890|0);max=Math.max(...a);pass=1;place=1;prep();t0=performance.now();phase=0}
function prep(){from=a.map((v,i)=>i);let b=[[],[],[],[],[],[],[],[],[],[]];for(let v …

Excerpt — the full answer is on the round page.

▶ R131 · Weekday riddle from two cluesauthor reference Open round →
Sunday. The day after tomorrow is two days from today, and two days before Thursday is Tuesday, so today must be Sunday.
▶ R132 · Fermi estimate: a lifetime of drinking waterauthor reference Open round →
Assume average adult water intake from drinking: about 2.0 liters/day.
Assume adult lifetime: age 18 to 80 = 62 years.
Days: 62 x 365.25 = 22,645.5 days.
Lifetime drinking water: 2.0 x 22,645.5 = 45,291 liters.
Rounded estimate: 45,000 liters.
45,000 liters
▶ R133 · Three friends, three petsauthor reference Open round →
Ana owns the parrot, Ben owns the cat, and Cleo owns the dog. Ana is allergic to animal fur, so she cannot own the cat or dog. Ben's pet cannot fly, and Ben cannot own the dog because the dog's owner is older than Ben. Therefore Ben owns the cat and Cleo owns the dog.
▶ R134 · Smallest number from three remaindersauthor reference Open round →
We need n ≡ 1 (mod 3), n ≡ 2 (mod 5), and n ≡ 3 (mod 7). Numbers that are 3 mod 7 are 3, 10, 17, 24, 31, 38, 45, 52. Checking mod 5, 17 and 52 are 2 mod 5. Of these, 52 is 1 mod 3, while 17 is 2 mod 3. Therefore the smallest such number is 52.
▶ R135 · Conditional dice probabilityauthor reference Open round →
The probability is 2/11. Given that at least one die shows a 4, the possible ordered outcomes are 11 in total. The outcomes among these that sum to 9 are (4,5) and (5,4), so the probability is 2/11.
▶ R136 · Double pendulum tracing a chaotic pathauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Double Pendulum</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#08090d;color:#e8edf2;font:16px system-ui}canvas{display:block}#t{position:fixed;left:16px;top:12px;padding:6px 10px;background:#0008;border:1px solid #fff2;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=t>0.0 s</div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),T=document.getElementById("t"),W,H,S,trail=[];
function size(){W=c.width=innerWidth;H=c.height=innerHeight;S=Math.min(W,H)/5}
onresize=size;size();
let st,last=0,born=0;
function reset(now){
 let r=Math.random;
 st={a1:1.95+r()*.5,a2:2.55+r()*.45,v1:0,v2:0,m1:1,m2:1,l1:S,l2:S,g:980};
 trail=[];born=now
}
function step(dt){
 let p=st,m1=p.m1,m2=p.m2,l1=p.l1,l2=p.l2,a1=p.a1,a2=p.a2,v1=p.v1,v2=p.v2,g=p.g;
 let f=s=>{
  let a1=s[0],a2=s[1],v1=s[2],v2=s[3 …

Excerpt — the full answer is on the round page.

▶ R137 · Cloth mesh hanging and rippling in the windauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Cloth</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#101417;color:#e9f2f0;font:16px system-ui}canvas{display:block}#w{position:fixed;left:16px;top:14px;padding:8px 11px;background:#0008;border:1px solid #fff2;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=w></div><script>
let cv=c,ctx=cv.getContext('2d'),out=w,W,H,pts,sticks,t=0,seed=Math.random()*9,cols=15,rows=10,space=32,g=.23;
function rnd(){seed=(seed*9301+49297)%233280;return seed/233280}
function size(){W=cv.width=innerWidth;H=cv.height=innerHeight;init()}onresize=size;
function init(){pts=[];sticks=[];let ox=W/2-(cols-1)*space/2,oy=55;for(let y=0;y<rows;y++)for(let x=0;x<cols;x++){let px=ox+x*space+(rnd()-.5)*3,py=oy+y*space+(rnd()-.5)*3;pts.push({x:px,y:py,px,py,p:y==0})}let add=(a,b)=>{let A=pts[a],B=pts[b],dx=A.x-B.x,dy=A.y-B. …

Excerpt — the full answer is on the round page.

▶ R138 · Two-source wave interference patternauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Wave Interference</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#05070b;color:#e9f3ff;font:15px system-ui,sans-serif}canvas{display:block;width:100vw;height:100vh;image-rendering:auto}#d{position:fixed;left:16px;top:14px;padding:7px 10px;background:#0008;border:1px solid #fff2;border-radius:6px;backdrop-filter:blur(4px)}</style></head><body><canvas id=c></canvas><div id=d></div><script>
let C=c.getContext("2d"),W,H,w=220,h=140,img,buf,seed=Math.random()*9,life=0;
function size(){W=c.width=innerWidth;H=c.height=innerHeight;h=Math.max(90,Math.min(180,innerHeight/5|0));w=Math.max(140,Math.min(280,innerWidth/5|0));img=C.createImageData(w,h);buf=img.data}
onresize=size;size();
function reset(){seed=Math.random()*99;life=0}
function frame(t){life+=.01 …

Excerpt — the full answer is on the round page.

▶ R139 · Small n-body system orbiting a central starauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>nbody</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#05070b;color:#dfe7ff;font:14px system-ui}canvas{display:block}#n{position:fixed;left:14px;top:12px;text-shadow:0 1px 6px #000}</style></head><body><canvas id=c></canvas><div id=n></div><script>
let C=c.getContext("2d"),W,H,B=[],G=.42,done=0,last=0,cols=["#ffcf6b","#7dd3fc","#a7f3d0","#fda4af","#c4b5fd","#fde68a","#93c5fd"];
onresize=()=>{W=c.width=innerWidth;H=c.height=innerHeight};onresize();
function R(a,b){return a+Math.random()*(b-a)}
function init(){B=[];done=0;let S={x:W/2+R(-20,20),y:H/2+R(-20,20),vx:0,vy:0,m:26000,r:16,c:"#fff1a8",live:1,star:1};B.push(S);for(let i=0;i<6;i++){let a=i*Math.PI*2/6+R(-.18,.18),d=Math.min(W,H)*R(.14,.38),m:R(35,170),v=Math.sqrt(G*S.m/d)*R(.9,1.08),x=S.x+Math.cos(a)*d,y=S.y+Math.sin(a)*d,tx=-Math.sin(a),ty=Math.cos(a);B. …

Excerpt — the full answer is on the round page.

▶ R140 · Water sloshing in a tilting containerauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Slosh</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:16px;top:14px;color:#dff;font:18px system-ui;text-shadow:0 1px 4px #000}</style></head><body><canvas id=c></canvas><div class=hud id=h></div><script>
let c=document.getElementById('c'),x=c.getContext('2d'),h=document.getElementById('h'),W,H,S,P=[],N=200,t=0,box;
function R(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;S=Math.min(W,H);box={x:W/2-S*.33,y:H/2-S*.38,w:S*.66,h:S*.76};x.setTransform(1,0,0,1,0,0)}
onresize=R;R();
function init(){P=[];let cols=20,sp=S*.018;for(let i=0;i<N;i++){let a=i%cols,b=i/cols|0;P.push({x:box.x+box.w*.25+a*sp+Math.random()*sp,y:box.y+box.h*.18+b*sp+Math.random()*sp,vx:(Math.random()-.5)*60,vy:0})}}init();
let last=perfo …

Excerpt — the full answer is on the round page.

▶ R151 · Binary search tree growing node by nodeauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>BST</title><style>html,body{margin:0;height:100%;background:#101418;color:#dfe7ee;font:16px system-ui}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:14px;top:12px;background:#17202aaa;border:1px solid #314150;padding:8px 11px;border-radius:6px}</style></head><body><canvas id=c></canvas><div class=hud>Nodes: <span id=n>0</span></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),ns=document.getElementById("n");let W,H,D=1,root,nodes,vals,target,path,phase,idx,last,prog,wait;
function rnd(a,b){return a+Math.floor(Math.random()*(b-a+1))}
function resize(){D=devicePixelRatio||1;W=innerWidth;H=innerHeight;c.width=W*D;c.height=H*D;x.setTransform(D,0,0,D,0,0)}
onresize=resize;resize();
function make(){root=null;nodes=[];vals=[];let s=new Set,n=rnd(15,20);while(s.size<n)s.add(rnd(10,99));vals=[...s] …

Excerpt — the full answer is on the round page.

▶ R152 · Hash table with visible collision chainsauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Hash Table</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:16px system-ui}canvas{display:block;width:100%;height:100%}</style></head><body><canvas id="c"></canvas><script>
let c=document.getElementById('c'),x=c.getContext('2d'),d=devicePixelRatio||1,b=Array.from({length:12},()=>[]),n=0,t=0,next=0,drop=null,limit=48;
function R(){c.width=innerWidth*d;c.height=innerHeight*d;x.setTransform(d,0,0,d,0,0)}onresize=R;R();
function key(){return Math.floor(Math.random()*900)+100}
function reset(){b=Array.from({length:12},()=>[]);n=0;limit=40+Math.floor(Math.random()*21);next=performance.now()+400;drop=null}
function col(l){return l<2?'#35c46b':l<5?'#e6c84f':'#e45858'}
function add(now){let k=key(),h=k%12,top=b[h].length;drop={k,h,y:-34,to:126+top*34,st:now};n++;next=now+360}
function drawBox(cx,y,w,h,k,fill){x.fi …

Excerpt — the full answer is on the round page.

▶ R153 · Binary min-heap with bubble-up and sink-downauthor reference Open round →
<html><head><meta charset="utf-8"><title>Heap</title><style>html,body{margin:0;height:100%;background:#10141b;color:#e8eef8;font:16px system-ui;overflow:hidden}#hud{position:fixed;top:12px;left:12px;background:#0008;padding:10px 12px;border:1px solid #ffffff22;border-radius:8px;line-height:1.5}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id="c"></canvas><div id="hud"></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),h=document.getElementById("hud");
let a=[],ins=0,ext=0,phase="insert",steps=[],mov=null,hi=[],out="",pause=0,last=0,done=0;
function fit(){c.width=innerWidth*devicePixelRatio;c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0)}onresize=fit;fit();
function val(){return 5+Math.floor(Math.random()*94)}
function pos(n,w=c.width/devicePixelRatio,H=c.height/devicePixelRatio){
 let m=[], …

Excerpt — the full answer is on the round page.

▶ R154 · Ring buffer with producer and consumer at different ratesauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Ring Buffer</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#101318;color:#e8edf2;font:16px system-ui,Segoe UI,Arial}canvas{display:block;width:100vw;height:100vh}.hud{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;pointer-events:none;text-shadow:0 2px 12px #000}.n{font-size:clamp(38px,9vw,92px);font-weight:750;line-height:1}.t{font-size:clamp(13px,2.2vw,18px);letter-spacing:.08em;text-transform:uppercase;color:#aab4bf}</style></head><body><canvas id=c></canvas><div class=hud><div class=n id=n></div><div class=t>filled slots</div></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n");
let W,H,D,slots,prod,cons,fill,pr,cr,pt,ct,flash,end;
function rand(a,b){return a+Math.random()*(b-a)}
function fresh(){
slots=18;prod=0;cons=0;fil …

Excerpt — the full answer is on the round page.

▶ R155 · Linked list with animated pointer relinkingauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>List</title><style>html,body{margin:0;height:100%;background:#f6f2e8;color:#17202a;font:15px system-ui}canvas{display:block;width:100%;height:100%}</style></head><body><canvas id="c"></canvas><script>
const C=document.getElementById('c'),x=C.getContext('2d');let W,H,S=0,L=[],op=null,last=0,id=1,wait=900;onresize=()=>{W=C.width=innerWidth*devicePixelRatio;H=C.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight};onresize();
function fresh(){let n=3+Math.random()*3|0;L=[];for(let i=0;i<n;i++)L.push({v:id++,a:1});layout();op=null;wait=700}
function layout(){let m=34,w=72,h=34,g=58,cols=Math.max(1,((W-2*m)/(w+g))|0);L.forEach((n,i)=>{let r=i/cols|0,c=i%cols;n.tx=m+c*(w+g);n.ty=82+r*74;n.x=n.x??n.tx;n.y=n.y??n.ty;n.a=n.a??1})}
function pt(i){let n=L[i];return n&&{x:n.x+7 …

Excerpt — the full answer is on the round page.

▶ R156 · Invent 3 product names + taglines for a fictional object (no superlatives)author reference Open round →
1. SnackStand Clips — Seal snacks, stand bags upright
2. FoldLock Trio — Airtight clamping for opened snack bags
3. PantryPals Clips — Dishwasher-safe clips for tidy snacking
▶ R157 · Rewrite the same product text for two different audiences, facts unchangedauthor reference Open round →
(a) Teenagers: The AquaGlow bottle holds 750 ml and keeps your drinks cold for 12 hours. It's made from BPA-free plastic and comes with a built-in straw. The bottle is dishwasher-safe and available in 4 colors.

(b) Seniors: The AquaGlow bottle holds 750 ml and keeps drinks cold for 12 hours. It is made from BPA-free plastic and includes a built-in straw for easy sipping. The bottle is dishwasher-safe and available in 4 colors.
▶ R158 · 5 email subject lines under 50 chars, no clickbait, no ALL-CAPSauthor reference Open round →
1. Winter jackets: 20% off Nov 1-15
2. Free 60-day returns are here
3. November deals, app survey, easy returns
4. Save on jackets and enjoy free returns
5. Winter savings plus better shopping
▶ R159 · Micro-story: exactly 50 words (±5) with 3 mandatory elementsauthor reference Open round →
Mara reached platform as doors sighed shut; missed train. Rain polished rails, while a red umbrella bobbed ahead like a tiny lighthouse. She followed it through the crowd and found Jonah beneath it, holding two coffees, saying the delay was fate, not failure, and morning widened around them both laughing.
▶ R160 · Critique a generic slogan in 2 sentences + give 2 better alternativesauthor reference Open round →
“Quality You Can Trust.” is too generic for solar-powered phone chargers because it could fit almost any company and makes no concrete claim about trail durability, charging performance, or off-grid reliability. Stronger slogans should tie the promise directly to hikers and campers who need phone power away from outlets.
1. Trail-Ready Solar Power for Every Mile.
2. Keep Your Phone Charged Beyond the Campsite.
▶ R161 · Selection sort vs shell sort racing side by sideauthor reference Open round →
<!doctype html><html><head><meta charset="utf-8"><title>Sort Race</title><style>html,body{margin:0;height:100%;background:#111;color:#eee;font:14px system-ui;overflow:hidden}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id="c"></canvas><script>
const c=document.getElementById('c'),x=c.getContext('2d');let W,H,n=30,a,L,R,doneAt=0;function rs(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}onresize=rs;rs();
function sh(){let p=[...Array(n)].map((_,i)=>12+i*3);for(let i=n-1;i>0;i--){let j=Math.random()*(i+1)|0,t=p[i];p[i]=p[j];p[j]=t}return p}
function init(){a=sh();L={v:a.slice(),i:0,j:1,m:0,cmp:0,done:0,hi:[],mv:0};R={v:a.slice(),g:16,i:16,j:16,cmp:0,done:0,hi:[],mv:0};doneAt=0}init();
function sw(o,i,j){o.mv={i,j,t:0,ai:o.v[i],aj:o.v[j]}}
funct …

Excerpt — the full answer is on the round page.

▶ R162 · Breadth-first search flooding a random grid mazeauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>BFS</title><style>html,body{margin:0;height:100%;background:#101216;display:grid;place-items:center;color:#e8edf2;font:16px system-ui}canvas{background:#171b22;box-shadow:0 20px 60px #0008;border-radius:8px;max-width:96vw;max-height:86vh}.hud{position:fixed;left:18px;top:14px;font-weight:700;letter-spacing:.2px}</style></head><body><div class=hud id=h>Visited: 0</div><canvas id=c width=800 height=600></canvas><script>
const W=20,H=15,N=W*H,cv=c,ctx=cv.getContext("2d"),cw=cv.width/W,ch=cv.height/H,hud=h,dirs=[[1,0],[-1,0],[0,1],[0,-1]];
let grid,dist,par,front,goal,path,mode,last,age,seen,pi,pause;
function idx(x,y){return y*W+x}
function gen(){grid=Array(N).fill(0).map(()=>Math.random()<.25?1:0);grid[0]=grid[N-1]=0;dist=Array(N).fill(-1);par=Array(N).fill(-1);front=[0];dist[0]=0;goal=0;path=[];mode=0;last=0;age=0;seen=1;pi=0;pause=0;d …

Excerpt — the full answer is on the round page.

▶ R163 · Prim's algorithm growing a minimum spanning treeauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Prim MST</title><style>html,body{margin:0;height:100%;background:#111;color:#ddd;font:14px system-ui}canvas{display:block;width:100vw;height:100vh}</style></head><body><canvas id=c></canvas><script>
let C=c.getContext("2d"),W,H,g,t=0,last=0,step=0,phase=0,p=0,wait=0;
function R(a,b){return a+Math.random()*(b-a)}
function dist(a,b){let x=a.x-b.x,y=a.y-b.y;return Math.hypot(x,y)}
function init(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;C.setTransform(1,0,0,1,0,0);let n=20+Math.floor(Math.random()*6),m=Math.min(W,H),r=m*.28,tries=0;do{let N=[],E=[];for(let i=0;i<n;i++)N.push({x:R(W*.08,W*.92),y:R(H*.08,H*.72),in:0});
for(let i=0;i<n;i++)for(let j=i+1;j<n;j++){let d=dist(N[i],N[j]);if(d<r)E.push({a:i,b:j,w:Math.round(d),tree:0,new:0,cand:0})}
for(let e of E)N[e.a].d=N[e.b].d=1;if(N.every(o=>o.d))g={N,E …

Excerpt — the full answer is on the round page.

▶ R164 · Boids flocking with separation, alignment, cohesion and a predatorauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Boids</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#101316;color:#e8eef2;font:16px system-ui}canvas{display:block}#n{position:fixed;left:12px;top:10px;background:#0008;padding:6px 10px;border-radius:6px}</style></head><body><canvas id=c></canvas><div id=n></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n"),N=60,B=[],P={x:0,y:0,vx:1,vy:1};let W,H;
function R(a=1){return Math.random()*a}
function S(){W=c.width=innerWidth;H=c.height=innerHeight}onresize=S;S();
function boot(){B.length=0;for(let i=0;i<N;i++){let a=R(6.283);B.push({x:R(W),y:R(H),vx:Math.cos(a)*2,vy:Math.sin(a)*2})}P.x=R(W);P.y=R(H);P.vx=R(2)-1;P.vy=R(2)-1}boot();
function wrap(o){o.x=(o.x+W)%W;o.y=(o.y+H)%H}
function lim(o,m){let s=Math.hypot(o.vx,o.vy);if(s>m)o.vx=o.vx/s*m,o.vy=o.vy/s*m}
functi …

Excerpt — the full answer is on the round page.

▶ R165 · Recursive backtracker carving a maze, then solving itauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Maze</title><style>html,body{margin:0;height:100%;background:#10151b;color:#e8eef2;font:16px system-ui;overflow:hidden}body{display:grid;place-items:center}#p{position:fixed;top:14px;left:14px;background:#121a22cc;border:1px solid #334150;padding:10px 12px;border-radius:8px;line-height:1.5}canvas{width:min(96vw,1100px);height:min(82vh,760px);image-rendering:auto}</style></head><body><div id=p><b id=m>Carving</b><br>cells <span id=c>0</span>/<span id=t></span><br>steps <span id=s>0</span></div><canvas id=a></canvas><script>
const W=25,H=18,N=W*H,cv=a,x=cv.getContext("2d"),C=c,S=s,M=m,T=t,dirs=[[0,-1,1,2],[1,0,2,1],[0,1,4,8],[-1,0,8,4]];let g,st,vis,seen,par,path,dead,cur,phase,done,steps,last=0,delay=28,hold=0;
function R(n){return Math.random()*n|0}
function cell(i){return g[i]}
function reset(){g=Array.from({length:N},(_,i)=>({i,w:15 …

Excerpt — the full answer is on the round page.

▶ R166 · Faithful 3-sentence summary of a chaotic meeting transcriptauthor reference Open round →
The weekly status update will move from Friday afternoons to Monday mornings starting next week, and Tom will send the updated calendar invite reflecting that change by end of day Friday. The team decided to adopt Priya's new five-label ticket labeling system, and Priya will update the shared labeling guide document by Wednesday so everyone can start using it. The office plant budget discussion was deferred to the next meeting, with no decision made today.
▶ R167 · One-sentence TL;DR under 25 wordsauthor reference Open round →
The legacy /v1/reports API will stop responding after September 30, 2026, so integrations must migrate to /v3/reports by then.
▶ R168 · Extract action items as a checklistauthor reference Open round →
1. Maria -- finalize the new homepage copy and send it to Ben for review -- by this Thursday
2. Ben -- review the new homepage copy and send feedback to Maria -- by Friday
3. Chen -- push a fix for the contact form bug -- by Monday
4. Maria -- chase the client about the new logo colors -- today
5. Ben -- send the privacy policy draft to legal -- by next Wednesday
▶ R169 · Neutral summary of a biased product rantauthor reference Open round →
The blender jug leaks liquid around the base seal when filled past the halfway line, leaving liquid on the counter. Speeds 4 through 7 on the 10-speed dial sound and behave the same. The motor overheats and shuts off automatically after about 90 seconds of continuous blending.
▶ R170 · Compress a how-to into exactly 5 numbered stepsauthor reference Open round →
1. Mix 100g whole wheat flour with 100g room-temperature water, around 21 degrees C.
2. Stir into thick paste, loosely cover jar, and keep warm for 24 hours.
3. On day two, discard half; feed remaining starter 100g flour and 100g water.
4. Let sit 24 hours; repeat daily discard-and-feed for about 5 more days.
5. Around day 7, use when bubbly, tangy, and doubles within 4-6 hours.
▶ R171 · Fireworks bursting into fading sparksauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Fireworks</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#02030a;color:#fff;font:14px system-ui}canvas{display:block;width:100%;height:100%}#c{position:fixed;top:10px;left:12px;background:#0008;padding:6px 9px;border:1px solid #fff2;border-radius:6px;text-shadow:0 0 6px #fff}</style></head><body><canvas id=a></canvas><div id=c>0</div><script>
let A=a.getContext("2d"),W,H,P=[],R=[],T=0,last=0;
function sz(){W=a.width=innerWidth*devicePixelRatio;H=a.height=innerHeight*devicePixelRatio;A.setTransform(1,0,0,1,0,0)}
onresize=sz;sz();
let rnd=(m,n)=>m+Math.random()*(n-m),pi=Math.PI*2,cols=["#ff315d","#ffd166","#06d6a0","#4cc9f0","#b517ff","#fff275","#ff8fab"];
function trail(o){o.t.push([o.x,o.y]);if(o.t.length>o.l)o.t.shift()}
function rocket(){let x=rnd(W*.08,W*.92),h=rnd(H*.18,H*.5);R.push({x,y:H+20,vx:rnd(-.8,.8 …

Excerpt — the full answer is on the round page.

▶ R172 · Raindrops sliding down a window paneauthor reference Open round →
<html><head><meta charset=utf-8><title>Rain</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#111}canvas{display:block;width:100%;height:100%}#n{position:fixed;left:14px;top:12px;color:#dce8ef;font:14px system-ui;text-shadow:0 1px 4px #000}</style></head><body><canvas id=c></canvas><div id=n></div><script>
let c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n"),W,H,D=[],T=[],last=0,done=0;
function R(a=1){return Math.random()*a}
function S(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);W=innerWidth;H=innerHeight}
onresize=S;S();
function drop(){return{x:R(W),y:R(H*.85),r:1+R(2.5),m:0,v:0,w:R(9)-4.5,t:0,a:.55+R(.4),z:R(1)}}
function reset(){D=[];T=[];done=0;for(let i=0;i<55;i++)D.push(drop())}
reset();
function bg(){
let g=x.createLinearGradient( …

Excerpt — the full answer is on the round page.

▶ R173 · Metaball lava lamp with heating and cooling blobsauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Metaball Lava Lamp</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#12080b;color:#ffd7a1;font:14px system-ui}body{display:grid;place-items:center}canvas{width:min(72vw,430px);height:min(94vh,860px);filter:drop-shadow(0 0 28px #f60)}#n{position:fixed;top:14px;left:14px;background:#1b0b10cc;border:1px solid #6b281b;padding:7px 10px;border-radius:7px}</style></head><body><div id=n></div><canvas id=c></canvas><script>
const c=document.getElementById("c"),x=c.getContext("2d"),n=document.getElementById("n");let W,H,bs=[],t=0,last=0,dur=9e4;
function R(a,b){return a+Math.random()*(b-a)}
function size(){let r=devicePixelRatio||1,W0=c.clientWidth,H0=c.clientHeight;c.width=W=W0*r;c.height=H=H0*r}
function lamp(p){let y=p*H,cx=W/2,w=(.27+.2*Math.sin(Math.PI* …

Excerpt — the full answer is on the round page.

▶ R174 · Recursive fractal tree growing branch by branchauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><title>Fractal Tree</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#071018;color:#dfe;font:15px system-ui}canvas{display:block;width:100vw;height:100vh}.c{position:fixed;top:14px;left:16px;background:#0008;padding:7px 10px;border:1px solid #ffffff22;border-radius:6px}</style></head><body><canvas id=x></canvas><div class=c>Branches: <span id=n>0</span></div><script>
let c=x,g=c.getContext("2d"),N=n,W,H,D,all=[],tips=[],start=0,done=0,hold=0;
function R(a,b){return a+Math.random()*(b-a)}
function sz(){W=c.width=innerWidth*devicePixelRatio;H=c.height=innerHeight*devicePixelRatio;g.setTransform(1,0,0,1,0,0);g.scale(devicePixelRatio,devicePixelRatio);W=innerWidth;H=innerHeight}
onresize=sz;sz();
function make(){
 all=[];tips=[];done=0;hold=0;N.textContent=0;D=8+(Math.random()*3|0);
 let root={x:W/2,y:H-18,a:-Math.PI/2,l:H …

Excerpt — the full answer is on the round page.

▶ R175 · Noise flowfield painting additive particle trailsauthor reference Open round →
<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Flowfield</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#020306;color:white;font:14px system-ui}canvas{display:block;width:100%;height:100%;background:#020306}#c{position:fixed;left:14px;top:12px;padding:6px 10px;border:1px solid #ffffff25;background:#0008;border-radius:8px;backdrop-filter:blur(6px)}</style></head><body><canvas id=a></canvas><div id=c></div><script>
let A=document.getElementById("a"),X=A.getContext("2d"),C=document.getElementById("c"),W,H,D,P=[],G=[],N=512,Z=135,T=0,R=0,S=0,WI=0;
function rs(){W=A.width=innerWidth*devicePixelRatio;H=A.height=innerHeight*devicePixelRatio;D=devicePixelRatio;X.lineCap="round";X.lineJoin="round";X.scale(D,D);W=innerWidth;H=innerHeight}
onresize=rs;rs();
function rnd(){return Math.random()*2-1}
funct …

Excerpt — the full answer is on the round page.

▶ R176 · Fix exactly the errors, change nothing elseauthor reference Open round →
On Monday morning, the small archive opened its new reading room to local students. The room has six desks, two lamps, and a shelf for returned notebooks. Before the first group arrived, Mara checked the sign-in sheet and placed pencils beside each chair. She noticed that one window was stuck, but the hallway was quiet and the heater worked well. At nine o'clock, twelve students entered the archive, greeted the staff, and began comparing old town maps. Their teacher asked them to write short notes about every map they handled. One student found a drawing of the river bridge, and another matched it to a photograph from 1912. By noon, the class had labeled the boxes, cleaned the tables, and thanked Mara for her help. The visit ended on time, and the archive stayed open for regular visitors after lunch.
▶ R177 · Make the numbers consistentauthor reference Open round →
Workshop attendance report:

The registration desk recorded 18 participants: 7 from North Hall, 6 from East Studio, and 5 from River Annex. The header currently says 18 participants attended.

The event ran on Wednesday, March 4, 2026, and the same paragraph later calls it Wednesday. The room booking confirmation and the posted schedule both list Wednesday, March 4, 2026.

For the feedback survey, 15 of the 18 participants submitted forms. The draft summary says this equals 83%, but 15 out of 18 is 83% when rounded to the nearest whole percent.
▶ R178 · Remove redundancy without losing factsauthor reference Open round →
The neighborhood mobile clinic will open on April 8 at the Maple Community Center. Regular weekly hours will be Wednesdays from 10 a.m. to 4 p.m. The clinic will provide free blood pressure checks, vaccinations, and short medical consultations. Appointments can be booked by phone or in person at the center. Spanish and Vietnamese interpreters will be available during clinic hours.
▶ R179 · Unify tense and perspectiveauthor reference Open round →
At dawn, I stepped onto the station platform and checked the timetable. I noticed the last train number blinking on the board before the screen went dark. I waited beside the vending machine, but I kept looking toward the empty tracks. The loudspeaker crackled, and I heard a short apology for the delay. Then I walked to the ticket office, where the clerk handed over a paper voucher. I folded the voucher into my notebook and thought about the missed connection. I finally boarded the replacement bus, and I sat near the back window. As the bus left town, I watched the station lights disappear behind the rain.
▶ R180 · Fix the broken referencesauthor reference Open round →
Maintenance note for the demo room:

The tablet is stored in the blue cabinet, and it must be charged before each session.
The projector was tested after lunch; it should remain unplugged overnight.
See the cleaning checklist.

Setup steps:
1. Unlock the cabinet.
2. Place the tablet on the stand.
3. Start the room timer.

140 of these entries are author references from blind rounds — this model answered the same prompt outside the blind field, so they are not counted in the statistics above.