WikiWayne
Local AIWikiBenchGamesPrompt LabGrok BotAI ToolsTech NewsAboutBlogContact

As an Amazon Associate I earn from qualifying purchases. This site contains affiliate links.

WikiWayne

Independent notes on local AI, real hardware, Grok, and the games that come out of that stack.

Categories

  • Local AI Hub
  • Local AI Glossary
  • Local AI
  • AI Tools
  • Tech News

Quick Links

  • About Wayne
  • Games
  • Grok Bot
  • Contact
  • Links
  • ADHD MaxxxingSponsored
  • WikiBench
  • Methodology
  • Editorial Standards
  • Disclosures
  • Privacy Policy
  • Sitemap

Follow on X

Hardware, local models, Grok, and what I actually ship.

Follow @wikiwayne
WikiWayne© 2026
PrivacyWikiBenchMethodologyEditorialDisclosuresTermsSitemap
Home/Prompt Lab/Parcel Works

Parcel Works

PL-190Very HardMachinesCanvas 2D

Inverse kinematics, timed pick-and-place on a moving belt, parcel conservation and counters tied to real events.

Parcel Works
Download fileMade for ChatGPT, Claude, Gemini, Grok and other AI tools

How to run

  1. Download the file or copy the prompt.
  2. Upload or paste it into any AI chat or coding tool, and send.
  3. Save the HTML it gives you as a file and open it in Chrome.
  4. Open it with ?test=1 and look in the browser console for the TEST lines.

What it tests

Inverse kinematics, timed pick-and-place on a moving belt, parcel conservation and counters tied to real events.

The checks

Show the 5 checks
  1. After attract(false) at t = 0: stats() has spawned 3 and picks, sorted, rejected, jams, perMin and soundTriggers all 0; parcels() lists 3 parcels in state "belt": G at x 4.38, B at x 2.58, G at x 0.78, each with y 0 (each within 0.01); arms() lists R, G and B in state "idle" with bases at (3.0, 2.6), (6.6, 2.6) and (10.2, 2.6) and tools at (3.0, 1.6), (6.6, 1.6) and (10.2, 1.6) (each within 0.02), |elbow - base| equal to 2.0 and |tool - elbow| equal to 1.6 (each within 0.01); at 1280x720 layout().subject.h is at least 612 (0.85 of 720, expected 643) and at 390x844 layout().subject.w is at least 0.9 of 390 and layout().subject.h is between 0.25 and 0.33 of 844; each arm rectangle in layout() is at least 56 x 56.
  2. After attract(false), advance(12.0) frame by frame: on every frame, for every arm, |elbow - base| is 2.0 and |tool - elbow| is 1.6 (each within 0.01), the elbow moved at most 0.3 since the last frame, and for any held parcel its center is within 0.03 of its arm's tool; every belt parcel's x grows by 0.02 per frame (within 0.001); stats().picks first becomes 1 at a time between 2.00 and 2.10 and binCounts().G is 1 once sorted first becomes 1, which happens at a time between 7.20 and 7.30; arm R is in state "reach" at t = 3.1, "grip" at 3.45, "carry" at 3.9, "release" at 4.45, "return" at 4.85 and "idle" at 5.3; and the first frame on which R's parcel is in state "lane" is between t = 4.33 and 4.40 with its center within 0.03 of (1.2, 2.6).
  3. After attract(false), advance(60.0) frame by frame: on every frame parcels().length + sorted + rejected equals spawned, every "lane" parcel has x within 0.02 of its lane (R 1.2, G 4.8, B 8.4) and the matching color, and no parcel moves more than 0.15 between two frames. At t = 60.0: spawned 43, picks 36, sorted 32, rejected 3, perMin 36, binCounts() {R 9, G 12, B 11}, parcels().length 8, soundTriggers 71 and jams 0.
  4. After attract(false), advance(6.9) (arm G is idle), then a real click (pointerdown and pointerup) at the center of layout().arms.G: jams is 1 and at t = 8.0 arm G is in state "jammed"; jam("G") then returns false and jams stays 1; at t = 10.2 arm G is "idle"; at t = 14.0 spawned is 12, picks 8, sorted 5, rejected 1, jams 1, perMin 15 and soundTriggers 15 (= 8 + 5 + 1 + 1), and the one rejected parcel was green.
  5. On a fresh load with the demo running: at t = 1.4 spawned is 4, picks 0 and parcels().length 4; at t = 3.1 picks is 1; at t = 5.3 picks is 3; at t = 26.3 spawned is 20, picks 17, sorted 11, rejected 1, perMin 33 and soundTriggers 29; at t = 28.3 (after the cut-back) spawned is 24, picks 17, sorted 13, rejected 1, parcels().length is 3 and all three arms are "idle" with their tools within 0.02 of their rest points; at t = 29.8 spawned is 25 and parcels().length is 4; and the run has zero console errors.

Runs by model

No runs posted yet. Be the first: post yours and tag @wikiwayne.

Show the full prompt
PARCEL WORKS: Three Robot Arms Sort a Moving Belt of Parcels by Color, with Live Throughput
HOOK OBJECT: window.__parcel

Build "PARCEL WORKS": a Canvas 2D top-down factory floor (no libraries). A main conveyor carries red, green and blue parcels past three two-link robot arms. Each arm picks only its own color off the moving belt (it must meet the parcel on the move), swings it onto its own lane belt, and the lane carries it to its bin. A parcel that an arm cannot take in time rides on into the reject bin. Counters and a live parcels-per-minute readout run the whole time. It is fun to keep watching because the arms are busy, the belts never stop and now and then a parcel slips past.

LOOK
- Style: clean toy-industrial top view. Palette: floor #1F2733 with grid lines #28323F every 1 unit, main belt #3B4452 with chevrons #566275 that move with the belt, lane belts #354050, belt rails #8E9AAB, arm base disc #AEB8C6, link 1 #F2B84B, link 2 #FF8A3D, joints #2B2F38, tool disc #E8ECF2, parcels R #E5484D, G #3FB950, B #3B82F6 with a white tape stripe #FFFFFF (0.1 wide) and outline #10141B, bins R #7A2327, G #1F5E2A, B #1D3F7F with the letter in white, reject bin #5A5F69 with red hatching #FF5555, HUD text #E6EDF7, jam outline #FF3B30.
- World units (u): y grows downward on the screen. Main belt: x 0 to 12.6, y -0.5 to 0.5, moving +x at 1.2 u/s, with a chute ramp drawn at x -0.6 to 0. Reject bin: x 12.6 to 13.2, y -0.6 to 0.6. Arms (R, G, B): bases at (3.0, 2.6), (6.6, 2.6) and (10.2, 2.6), link lengths L1 = 2.0 and L2 = 1.6, base disc radius 0.45; arm k picks at x = pickX = 3.0, 6.6, 10.2. Lane belts: width 0.8, centered at x 1.2 (R), 4.8 (G), 8.4 (B), from y 2.1 to 7.0, moving +y at 1.0 u/s; bins below them from y 7.0 to 8.4, 1.4 wide, centered on the lane. Parcels are 0.6 x 0.6 squares.
- Screen layout: in landscape (width >= height) a HUD strip 260 px wide on the right and the factory area (width - 260) x height; in portrait a HUD strip 150 px high at the bottom and the factory area width x (height - 150). Scale s = min(areaWidth / 14.6, areaHeight / 10.2); world point (6.3, 3.6) sits at the center of the factory area; screen = (cx + (X - 6.3) s, cy + (Y - 3.6) s). The subject box is world x -0.6 to 13.2 and y -0.8 to 8.4.
- HUD text: 14 px monospace (about 8.4 px per character), at most 16 characters per line so it fits the 260 px strip and half of the 390 px phone width: "SPAWNED 43", "SORTED 32", "REJECTED 3", "PER MIN 36", "JAMS 0", "BINS R9 G12 B11"; in portrait the six lines sit in two columns of three.
- FIRST FRAME (t = 0, no input): the whole factory, three parcels already on the main belt (G at x 4.38, B at x 2.58, G at x 0.78, all at y 0), all three arms at rest with the tool disc at (pickX, 1.6), belts moving, bins empty, HUD showing SPAWNED 3 and zeros. At 1280x720 s = 69.86 and the subject box is 964 x 643 px, 89% of the window height; it ends 25 px above the bottom edge and the HUD strip is beside it, never over it. On a phone in portrait (390x844, s = 26.71) the box is 369 x 246 px, 29% of the height but 95% of the width: that is an accepted exception.

MOTION / PLAY
- Parcel schedule (fixed): the color of parcel k is the character (k mod 12) of "RGBRGBRRBGBG" (k may be negative: k = -3, -2, -1 give G, B, G). Parcel k appears at the belt start x = 0.3 at time ts = 1.1 + 1.5 k seconds for k = 0, 1, 2 ...; the three parcels k = -3, -2, -1 (ts = -3.4, -1.9, -0.4) are already on the belt at t = 0 at x = 0.3 + 1.2 (0 - ts). A belt parcel's x = 0.3 + 1.2 (t - ts).
- Arm cycle (exact). Arm c reacts to parcels of its own color only. A parcel crosses the arm's pickX at Tc = ts + (pickX - 0.3) / 1.2. If the arm is idle (not in a cycle, not jammed) at time Tc - 0.6 it starts a cycle for that parcel, otherwise it ignores it. Phases: reach [Tc - 0.6, Tc]: the tool moves in a straight line from the rest point (pickX, 1.6) to (pickX, 0) with smoothstep timing; grip [Tc, Tc + 0.2]: the tool follows the parcel, x = pickX + 1.2 (t - Tc), y = 0; at the end of grip the parcel is held (picks += 1) and its center equals the tool from then on; carry [Tc + 0.2, Tc + 1.0]: the tool moves in a straight line with smoothstep timing from (pickX + 0.24, 0) to the drop point (pickX - 1.8, 2.6); at t = Tc + 1.0 the parcel is released onto the lane belt, centered on the drop point; release [Tc + 1.0, Tc + 1.2]: the tool waits; return [Tc + 1.2, Tc + 1.8]: the tool goes straight back to the rest point with smoothstep timing; idle again from Tc + 1.8 (a cycle lasts 2.4 s from its start).
- Inverse kinematics: each arm is a true two-link arm. For the tool point T and base B: d = |T - B|, a = (d^2 + L1^2 - L2^2) / (2 d), h = sqrt(L1^2 - a^2), u = (T - B) / d, p = (-u.y, u.x); the elbow is B + u a + p h (fixed handedness, so the elbow never flips). The link lengths therefore stay exactly 2.0 and 1.6.
- Lanes and bins: a released parcel rides its lane at +y 1.0 u/s along the lane's x. When its center reaches y = 7.0 it enters its bin: sorted += 1 and that color's bin count += 1; the parcel is removed. A parcel still on the main belt when its center reaches x = 12.6 falls into the reject bin: rejected += 1; the parcel is removed.
- Jam: clicking or tapping an arm's base (hit area: the larger of the base disc and a 56 x 56 CSS px square centered on it) while that arm is idle jams it for 3.0 s (jams += 1): a jammed arm starts no cycle (drawn with a #FF3B30 outline and the word JAM beside its base, never over the belt). Clicks at any other time do nothing.
- ATTRACT MODE: with no input, the factory runs itself from load for 28.0 s (28.0 = 28; there is no separate hold phase) and then cuts back to the t = 0 state (the three parcels placed again, arms at rest, belts reset, the list of sorted-event times cleared) with the counters keeping their values; the three re-placed parcels count as spawned again. Any input takes over (the cut is suspended); the factory cuts back to the t = 0 state and the 28 s loop restarts after 8 s with no input. Hook calls are not user input.
- The hook also exposes: reset() (full reset including counters), attract(on) (false turns the demo off), parcels() returning [{id, color, state: "belt" | "held" | "lane", x, y}] for every parcel not yet in a bin, arms() returning [{id: "R" | "G" | "B", state: "idle" | "reach" | "grip" | "carry" | "release" | "return" | "jammed", base: {x, y}, elbow: {x, y}, tool: {x, y}, holding}] (holding = parcel id or null), binCounts() returning {R, G, B}, jam(id) (true if accepted, the same rule as a click), and layout() returning { subject: {x, y, w, h}, arms: {R: {x, y, w, h}, G, B} } in CSS px (arms = the hit rectangles). setCameraOrbit(azimuthDeg, elevationDeg, scale) applies the CSS 3D transform perspective(1400px) rotateY(azimuth) rotateX(-elevation) scale(scale) to the canvas, default (0, 0, 1).

SOUND
- Belt hum (sawtooth 55 Hz through a 200 Hz low-pass, gain 0.03), always on.
- An arm in reach, carry or return -> a servo whir (triangle 180 Hz to 260 Hz, gain 0.03, following that arm's tool speed).
- Grip -> a clank (square 200 Hz, 60 ms). A parcel enters a bin -> a chime (sine 784 Hz, 0.15 s). A parcel falls into the reject bin -> a buzz (sawtooth 120 Hz, 0.25 s). A jam -> two beeps (square 440 Hz, 0.1 s each, 0.15 s apart).
- With no AudioContext (before the first tap, and in ?test=1) nothing is played, but the triggers are still counted.

COUNTERS
stats() returns { fps, spawned, picks, sorted, rejected, jams, perMin, soundTriggers }.
- spawned: +1 each time a parcel appears on the main belt; the three parcels placed at load and at every cut-back count too.
- picks: +1 when a grip ends and the parcel becomes held. sorted: +1 when a parcel enters its bin. rejected: +1 when a parcel falls into the reject bin. jams: +1 per accepted jam.
- perMin: 3 x the number of sorted events whose time is within the last 20.0 s of simulation time (time in (now - 20, now]).
- soundTriggers: +1 for every grip clank, bin chime, reject buzz and jam alarm, whether or not sound is on; so it always equals picks + sorted + rejected + jams.
- On screen: spawned, sorted, rejected, perMin, jams and the three bin counts in the HUD strip, readable in a paused frame and never over the factory.

CHECKS for ?test=1
With ?test=1, run an accelerated self-test that measures real positions and real events (not self-set flags) and logs "TEST n PASS" or "TEST n FAIL: reason" to the console and to window.__testResults:
Each check starts from a fresh load; advance() steps in 1/60 s increments.
1. After attract(false) at t = 0: stats() has spawned 3 and picks, sorted, rejected, jams, perMin and soundTriggers all 0; parcels() lists 3 parcels in state "belt": G at x 4.38, B at x 2.58, G at x 0.78, each with y 0 (each within 0.01); arms() lists R, G and B in state "idle" with bases at (3.0, 2.6), (6.6, 2.6) and (10.2, 2.6) and tools at (3.0, 1.6), (6.6, 1.6) and (10.2, 1.6) (each within 0.02), |elbow - base| equal to 2.0 and |tool - elbow| equal to 1.6 (each within 0.01); at 1280x720 layout().subject.h is at least 612 (0.85 of 720, expected 643) and at 390x844 layout().subject.w is at least 0.9 of 390 and layout().subject.h is between 0.25 and 0.33 of 844; each arm rectangle in layout() is at least 56 x 56.
2. After attract(false), advance(12.0) frame by frame: on every frame, for every arm, |elbow - base| is 2.0 and |tool - elbow| is 1.6 (each within 0.01), the elbow moved at most 0.3 since the last frame, and for any held parcel its center is within 0.03 of its arm's tool; every belt parcel's x grows by 0.02 per frame (within 0.001); stats().picks first becomes 1 at a time between 2.00 and 2.10 and binCounts().G is 1 once sorted first becomes 1, which happens at a time between 7.20 and 7.30; arm R is in state "reach" at t = 3.1, "grip" at 3.45, "carry" at 3.9, "release" at 4.45, "return" at 4.85 and "idle" at 5.3; and the first frame on which R's parcel is in state "lane" is between t = 4.33 and 4.40 with its center within 0.03 of (1.2, 2.6).
3. After attract(false), advance(60.0) frame by frame: on every frame parcels().length + sorted + rejected equals spawned, every "lane" parcel has x within 0.02 of its lane (R 1.2, G 4.8, B 8.4) and the matching color, and no parcel moves more than 0.15 between two frames. At t = 60.0: spawned 43, picks 36, sorted 32, rejected 3, perMin 36, binCounts() {R 9, G 12, B 11}, parcels().length 8, soundTriggers 71 and jams 0.
4. After attract(false), advance(6.9) (arm G is idle), then a real click (pointerdown and pointerup) at the center of layout().arms.G: jams is 1 and at t = 8.0 arm G is in state "jammed"; jam("G") then returns false and jams stays 1; at t = 10.2 arm G is "idle"; at t = 14.0 spawned is 12, picks 8, sorted 5, rejected 1, jams 1, perMin 15 and soundTriggers 15 (= 8 + 5 + 1 + 1), and the one rejected parcel was green.
5. On a fresh load with the demo running: at t = 1.4 spawned is 4, picks 0 and parcels().length 4; at t = 3.1 picks is 1; at t = 5.3 picks is 3; at t = 26.3 spawned is 20, picks 17, sorted 11, rejected 1, perMin 33 and soundTriggers 29; at t = 28.3 (after the cut-back) spawned is 24, picks 17, sorted 13, rejected 1, parcels().length is 3 and all three arms are "idle" with their tools within 0.02 of their rest points; at t = 29.8 spawned is 25 and parcels().length is 4; and the run has zero console errors.

KEEP IT SHORT
- Keep the whole file under about 1,500 lines (soft target) so you can write it in one pass and finish well inside 15 minutes.
- Save lines with helpers, loops and instancing, not by dropping features. Everything above must really work: no placeholders, no TODOs.

BUILD RULES (all required):
- Deliver ONE self-contained HTML file: inline CSS and JS, no build step, no local assets. Libraries only from a CDN. If you use Three.js, use exactly this import map: {"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"}}
- It must open straight from disk in desktop Chrome and on an iPhone (Safari), fill the full screen, handle resize and touch, and stay smooth (target 60 fps).
- It must look stunning in the very FIRST frame: no black screen, no loading wait, no tiny subject. The main subject fills at least 50% of the screen height.
- SOUND (required): all sound is made in code with Web Audio (no audio files). Show a small "🔊 TAP FOR SOUND" chip; on the first tap create ONE AudioContext, route everything through a master gain of 0.6 into a DynamicsCompressor, and hide the chip. Also expose enableAudio() on the hook object named at the top.
- Expose the hook object named at the top with: setCameraOrbit(azimuthDeg, elevationDeg, distance) (or an equivalent camera setter), advance(seconds) that steps the simulation exactly that much for still captures, enableAudio(), and stats() returning {fps, ...the counters named above}. Use a fixed random seed of 360 so every run is the same.
- Every on-screen counter must count a real event you can see happen. No fake numbers.
- No text overlapping the subject; any label must be readable in a paused frame.
- No brand logos, no real people, no copyrighted characters, brand names or logos.

FAILURE MODES TO AVOID
- Arms that are not real two-link arms: links that stretch or shrink, an elbow that flips side, or a drawn arm that does not reach the point where the parcel really is.
- A pick that is faked: a parcel that teleports to the tool, a tool that waits still while the belt moves on, or an arm that takes a color that is not its own.
- A parcel that is lost: it vanishes without a bin or reject count, sits in two places, or enters a bin of the wrong color.
- A schedule that drifts: parcels that appear at the wrong times, belts that do not move at 1.2 u/s and 1.0 u/s, or a cycle that is not 2.4 s long.
- A reject that never happens when an arm is busy or jammed, or a jam that is accepted while the arm is mid-cycle.
- Counters stuck at 0, ticking on a timer, or not matching what happened (spawned, picks, sorted, rejected, jams, soundTriggers); perMin that is just a made-up rate.
- A tiny factory in a big empty window (it must be 89% of the height on a wide window), a black first frame, or the HUD or the JAM label drawn over the belts or parcels.
- A cut-back at 28 s that leaves old parcels or arms in odd poses, or counters that reset when they should keep their values.
- Taps that do nothing on touch, or an arm hit area smaller than 56 px.
- The same variable declared twice, or methods called on objects that don't exist yet.

SELF-TEST LOOP
- If you can run code: build the file, open it, read the console, run ?test=1, and take screenshots at 3 s, 10 s and 30 s at 1280x720 and 390x844. Look at the screenshots and fix what looks wrong. Fix and retest until all 5 checks pass with zero console errors. Mark anything you could not run as UNMEASURED; never invent results.
- If you are chat-only: go through this prompt line by line, check your code against each line, and fix anything that would fail. Then write one corrected, complete file.
- Final answer: ONE complete HTML file in ONE code block, then the 5 checks marked PASS, FAIL or UNMEASURED. No snippets, no "rest unchanged".

Built one? Post it on X and tag @wikiwaynePost on X

More Very Hard prompts

Wizard's Chess

Very HardGames
PL-0834 runs

Endless Neighborhood Day

Very HardCities & buildings
PL-0764 runs
Ant Empire

Ant Empire

Very HardCreatures & characters
PL-194No runs yet

More Machines prompts

Electric Roadster

MediumMachines
PL-0744 runs

Fresnel Beacon

HardMachines
PL-1681 run

Coin Dozer Royale

HardMachines
PL-1591 run