Narreddi trained a language model (Qwen 3.5 35B) to generate p5.brush JavaScript code that renders watercolor paintings from text prompts, using reinforcement learning with a pairwise comparison reward function. The key technical moves: replacing absolute scoring with relative judgments (does this output beat two random references?), building a hand-rated reference pool of 117 "love-tier" examples, and stripping system prompts down to an 8-method allowlist instead of 400 lines of API docs that caused hallucination. The old 9-signal reward rubric plateaued at 0.65 because five judges were perfectly correlated (measuring the same thing); the new 4-signal version (60% pairwise judgment, 30% HPSv3, 5% each for compile gate and length) broke through and produced more varied, compressed outputs. The result is demonstrably slower than standard image generation but trades inference speed for editability—users can tweak the code artifact directly rather than re-prompting. A technical report is promised for June 2026.
reply