All games

Haggle

By Stephen Zweibel

GitHub Play Haggle

Uses WebGPU for local inference in a supported desktop browser.

Haggle is a little browser game where you run a fantasy item shop that comes saddled with a 2,500-gold debt, and you pay it off by buying stock wholesale, setting your prices, and bargaining with the customers who wander in.

Every customer is played by an open-weight language model running entirely in your browser. Each one arrives with a personality, a hidden budget, and their own guess at what your goods are worth, so a sharp-eyed trader haggles very differently from a distracted errand boy.

Under the hood it’s a demonstration of how to make small local models reliable: the model provides the banter while the game’s rules enforce the arithmetic, so the characters stay colorful without breaking roles.