build-small-hackathon/case0
๐ต๏ธ Case Zero โ the AI is the detective game
A brand-new mystery, written and acted by a 1.5B model, every single time.
No scripted cases. No content library. A single small local model invents the whole thing โ a homicide, a heist, a fraud, a blackmail ring, an arson, a disappearance โ the victim, the suspects, their secrets and motives, the timeline, the evidence, and the one who did it โ then role-plays every suspect live. They remember what you asked. They lie to your face. And when you slap down the right piece of evidence, you watch the lie crack in real time.
Interrogate. Investigate. Accuse. One of them is guilty. Prove it.
โจ The moment that sells it
Search the rooms, find a clue that contradicts a suspect's alibi, present it, and their story falls apart on screen โ stress spikes, the alibi breaks, the truth leaks. Then name the killer, cite your proof, and get a scored verdict with a "Director's Cut" walkthrough of how the crime really went down.
๐ง How it works
The model does all the creative work. Deterministic code is only guardrails and a reliability layer โ it never writes story, character, or dialogue.
๐ Built for the Build Small Hackathon
Track: Thousand Token Wood โ a game that is genuinely impossible without AI: the model doesn't power a feature, it authors and performs the entire mystery.
- Off the Grid: zero cloud APIs. The LLM and the TTS run in-process on the Space's CPU; a network-guarded test plays a full case with all non-loopback sockets blocked.
- Llama Champion: the model runs through the llama.cpp runtime, in-process โ no server, no remote endpoint.
- Off-Brand: a fully custom 12-screen pixel-art noir SPA served through `gr.Server` โ procedural scenes, exhibit art, and sprites, all canvas-drawn.
- Tiny Titan (โค4B): the entire game runs on Qwen2.5-1.5B โ ~1.6B total runtime params (LLM + Supertonic), far under the 32B cap.
- Field Notes: docs/FIELD_NOTES.md โ what we built, what broke, and what a 1.5B model can really do.
- Sharing is Caring: real agent traces (case generation + live interrogations) are published on the Hub โ see the traces dataset linked below.
See COMPLIANCE.md for the full parameter budget and badge details.
๐ฆ Submission links
- Demo video: https://drive.google.com/file/d/1hW3uDfGeW-L9u2OYgFVAD10qanH3ZRIM/view?usp=drivesdk
- Social post: https://huggingface.co/blog/build-small-hackathon/case0 https://discord.com/channels/879548962464493619/1513918288000712846 https://www.linkedin.com/posts/the-abdullah-eid100_were-launching-case-zero-a-procedural-share-7470127712385318912-WKlr/?utm_source=social_share_send&utm_medium=ios_app&rcm=ACoAAEUSZrkBKmJwx9WrfpZ3k_MKawOBJtAmJug&utm_campaign=copy_link
- Agent traces dataset: build-small-hackathon/case0-traces โ the exact prompts + completions of a full case generation, and a live 4-turn interrogation.
โถ๏ธ Run it locally
# 1. backend deps + open weights
python -m venv .venv && .venv/Scripts/pip install -r requirements.txt # (Windows)
python scripts/fetch_models.py # one-time: fetch the open GGUF + Supertonic
# 2. build the pixel-art frontend bundle (served by gradio.Server from web/dist)
cd web && npm install && npm run build && cd ..
# 3. run โ open http://127.0.0.1:7860
python app.pyThe game runs entirely on the CPU โ laptop or Space, same code, no GPU required. (In the Docker/Space build both steps happen automatically: a Node stage builds the bundle and the Python stage compiles llama.cpp and bakes the weights.)
๐ Credits
- LLM: Qwen2.5-1.5B-Instruct (Apache-2.0), via llama.cpp.
- Voices: Supertonic-3 on-device ONNX TTS.
- Music: "Backbay Lounge" by Kevin MacLeod (incompetech.com), licensed under Creative Commons Attribution 4.0.
- Fonts: Silkscreen & Pixelify Sans (SIL Open Font License), self-hosted.
- Pixel art and UI sound effects: procedurally generated.
