# Training AI to Paint with Code

> Hacker News story 49411800 · language: en · submitted 2026-08-23
> Web version: https://zeli.app/story/49411800
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 38 · by [Tiberium](<https://news.ycombinator.com/user?id=Tiberium>) · 💬 3
[original](<https://surya.website/rling-qwen-to-paint-with-code>) · [HN discussion](<https://news.ycombinator.com/item?id=49411800>)

## Summary

Surya Narreddi trained a language model to create watercolor-style images by writing JavaScript code, using reinforcement learning. The key insight: instead of prompting for images, the model generates editable code, allowing granular changes. The project tackles the challenge of applying RL to subjective tasks by designing a reward system based on pairwise comparisons against a hand-curated reference pool. This approach outperformed a complex multi-signal rubric, leading to faster convergence and more concise code. The article details the training loop, reward function evolution, and system prompt optimization, offering a practical framework for RL on creative tasks.

## Key quote

> The code is the artefact, and the code is editable.

---

## Cite

- Page: https://zeli.app/story/49411800
- Date: 2026-08-23
- Source: surya.website (https://surya.website/rling-qwen-to-paint-with-code)
- Hacker News: https://news.ycombinator.com/item?id=49411800

## Other languages

- zh: https://zeli.app/zh/story/49411800 · markdown: https://zeli.app/zh/story/49411800.md
- ja: https://zeli.app/ja/story/49411800 · markdown: https://zeli.app/ja/story/49411800.md
- ko: https://zeli.app/ko/story/49411800 · markdown: https://zeli.app/ko/story/49411800.md
- de: https://zeli.app/de/story/49411800 · markdown: https://zeli.app/de/story/49411800.md
- es: https://zeli.app/es/story/49411800 · markdown: https://zeli.app/es/story/49411800.md
- ru: https://zeli.app/ru/story/49411800 · markdown: https://zeli.app/ru/story/49411800.md
