AI Agent Plays Pokemon Red in Browser with WebLLM
An AI agent autonomously plays Pokemon Red using WebLLM running entirely in the browser, demonstrating local language model capabilities for game interaction
Someone built an AI agent that plays Pokemon Red entirely in the browser using a pretty wild stack.
The setup runs Qwen 2.5 1.5B through WebLLM for action planning, then scores moves with a TensorFlow.js neural network. The Game Boy emulator (binjgb) compiles to WASM, and everything reads game state directly from RAM to track badges, party, and items.
Check it out:
- Live demo: https://sidmohan0.github.io/tesserack/
- Source: https://github.com/sidmohan0/tesserack
The whole thing runs client-side as a Svelte app - no backend needed. LLM generates strategies, the policy network learns which ones actually work, and it auto-trains by playing repeatedly.
Turns out WebGPU acceleration makes running a 1.5B model in-browser surprisingly fast. The architecture got messy from scope changes mid-build, but it’s a cool example of combining old-school emulation with modern ML tools.
Related Tips
Verity: Local AI Search Engine Like Perplexity
Verity is a local AI search engine that runs entirely on a user's device, providing privacy-focused searches similar to Perplexity without sending data to
ACE-Step 1.5: Free Local Music AI Rivals Suno v4/v5
ACE-Step 1.5 is an open-source music generation AI model that runs locally on consumer hardware, offering quality comparable to commercial services like Suno
MOVA: Open-Source Synchronized Video & Audio Gen
MOVA is an open-source framework that generates synchronized video and audio content simultaneously, enabling coherent multimodal media creation through