I built a live experiment called "Twitch Plays Claude". It’s exactly what it sounds like: inspired by Twitch Plays Pokémon, but instead of moving a sprite, the crowd controls an LLM (Claude 4.5 Opus) to live-code a single index.html file.
I’m really curious to see if this results in a chaotic mess or if a "wisdom of the crowd" effect kicks in to build a coherent application.
How it works:
Any user in the chat can submit a prompt using !idea <prompt>. This can be as simple as "Add a small button here", or it can try to modify the whole page like "Make the website a 3D space simulation using Three.js". The composition is where the chaos emerge. You can for instance write "!idea add a mario movie projected automatically on a screen in the space".
I implemented two modes to manage the chaos:
- Anarchy: Chat inputs are batched. I included a "pressure estimate" logic in the system prompt so the AI tries to satisfy the weighted demand of the crowd.
- Democracy: Inputs are synthesized by Claude, then voted on by chat before execution. Each complete cycle lasts about 1:30-2 mins.
To keep it interesting, the crowd sets a "Collective Goal" every 30 minutes. If the goal changes, the page resets; if kept, iteration continues.
The stack:
- Backend: FastAPI, Gunicorn, Nginx, and a custom Twitch bot. - Frontend: The stream updates the DOM using morphdom via websockets (used only to signal that something has changed). This was important to prevent full page refreshes and keep the visual experience smooth. If needed in the event of any refresh bug, the chat can reload the page using !refresh - Sandbox: It's heavily sandboxed, but I allowlisted libraries like Three.js so people can try to build 3D scenes or mini-games. - The AI used is Claude Opus 4.5 for both democratic synthesis and code (patchs) production. I implemented a custom system to make Claude not have to rewrite the full index.html each time.
I plan to keep this running for a few days. The GitHub repo auto-updates with every commit from the stream.
Depending on how it goes, I might implement hierarchical clustering on semantic embeddings to improve the Democracy mode, or give the chat control over the system prompt itself and/or reset the page.
Links:
- Live Stream: https://www.twitch.tv/artix187
- Result (Live Website, at your own risks): https://artix.tech/tpc
- Crowd-produced code: https://github.com/ArtixJP/twitch-plays-claude
Please let me know what you think or if you have any idea to improve the system!
Labo333•2h ago
I think the hardest for this kind of projects is to keep it active. Environments with a "global state" like this (everyone shares the same website) are ultimately limited to surges (seasonal events like Magnus vs The World or a single game of Twitch plays Pokemon) or to a recurring flow of new people.
Maybe having multiple "realms", so that there are not too many people in a single realm in case of virality, and the ability for people to spawn their own realms would be nice (think skribbl or Among Us) but then it would kind of be a Lovable and cost a lot to host the LLM. But since the html code is open source, local LLMs (like Gemini Nano embedded in Chrome) could theoretically do the editing. In that case, the web page should definitely be marked as even unsafer! I wonder how one could avoid the red flag of Chrome for pages that are deliberately made to host collaborative crap.