Language model paints watercolors by writing JavaScript, and the whole pipeline is open to run

Surya Narreddi posted a video of watercolor paintings generated by a language model on August 23. The clip racked up more than 1.5 million views in days. The model does not output pixels directly. It writes a JavaScript program of roughly 150 lines that runs the p5.brush library, which adds natural-media brush tools to p5.js. The output is readable, editable, re-runnable code; every brush decision is visible in the script. Another developer has now reproduced the entire recipe in the open, comparing three different reward mixes, with all artifacts hosted on Hugging Face.
From artistic idea to RL environment
Narreddi says the project began with prompts to text-to-image models, where the prompt is the only lever and additional control tops out quickly. Training the model itself goes further. The other half of the idea is the medium: the model is restricted to just ten methods from the library, and that constraint produces the characteristic loose, imperfect, hand-drawn look. Narreddi published a technical post on an earlier, narrower phase of the project (close-up flowers) and promised a full technical report. The reproducer followed that post step by step, changing only what was strictly necessary; every independent idea went into a "what I'd try next" list instead of the experiment.
Open implementation: full pipeline on Hugging Face
The reproduction runs end-to-end on Hugging Face: training on Jobs, the RL environment and reward model as Spaces, a pairwise judge via Inference Providers, and all artifacts collected in a single Hub repository. Once the two Spaces are up, execution is a single command — replicate the environment and reward model, set two environment variables for the reward mix, and launch the training script `watercolour_grpo.py` with fixed parameters (Qwen3.5-35B-A3B with LoRA, bf16, gradient checkpointing, 110 steps, 240 episodes, 8 generations per step, completion length up to 8192 tokens). The trained model is pushed to the Hub automatically.
Three reward mixes and a first comparison
The core addition in the open version is a systematic comparison of three different reward mixes, alongside a hand-rated pool built for the experiment. All three runs are published in full, including every painting produced in each run, so you can inspect not just quantitative metrics but the actual visual quality. The author stresses that the numbers alone do not tell the whole story; the gap between the statistically "perfect" images of standard image models and the rough, unpolished look here is part of what made the original video go viral.
Historical context: back to the early GAN days
The project recalls the early days of generative AI art — DeepDream in 2015, born as a debugging tool and turned creative instrument; "Edmond de Belamy" in 2018, emerging from GAN research; the dreamlike neural portraits of Mario Klingemann. Then, as now, the interest was not technical perfection but exploration of the medium. The difference: here the model writes drawing code, not pixels, and the code itself is the artwork — transparent, auditable, extensible.
What's next: an open list instead of guesses
All artifacts, the reference dataset, RL environment, training scripts, trained models, the three runs, and every painting are available in the repo and the Hub collection. The "what I'd try next" list is published alongside the artifacts, inviting the community to pick up where the reproduction left off. No breakthrough promises — just an open pipeline you can run, inspect, and extend, exactly like the days when code mattered more than hype.