DEV Community

Cover image for Snapdle: Wordle, but you guess by taking a photo
Erick Christian
Erick Christian

Posted on AI-assisted

Snapdle: Wordle, but you guess by taking a photo

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

Also AI helped me write this article because I currently have difficulty typing (due to physical condition). Really sorry if anything sounds like slop. I used speech to text and tried to preserve my writing style as much as possible

What I Built

Snapdle #4 1/6 Ā· best 82
šŸŸ„ā¬›ā¬›ā¬›ā¬›ā¬›

I built Snapdle. It's based on Wordle, but instead of guessing a word, you're guessing an object, and the way you submit a guess is by snapping a photo of it.

There's one hidden object a day, the same for everyone. You start with a vague hint. Snap a photo, and if it's not it, you get another, sharper hint. You keep going, a new hint after every miss, until you nail it or run out of your six tries.

I mostly built this for me, because I'm a Wordle addict. I already have a pile of daily games to play: the original Wordle, plus a couple of others. Now I have my own. The difference is that mine can only be played when I'm outside.

Demo

The walk (buggy build):

https://youtube.com/shorts/6-gJI07lN8g

I took this one the day before the app was properly polished, because that was my walking schedule. It was buggy as hell, but I did take the walk.

And also the screen recording literally corrupted because the app uses camera, so enjoy footage of me just walking.

The finished app:

https://youtu.be/ZEeqUNhaoPI

This one I recorded this morning on desktop, to show what the finished app looks like.

Code

How I Built It

The scorer is the recently released EmbeddingGemma 2, and it runs entirely on your device in the browser through transformers.js. It uses WebGPU when your phone or laptop has it (q4f16 weights), and falls back to WASM (fp16) when it doesn't.

I initially wanted to go with SigLIP 2. It's a smaller model, and in my testing it scored almost the same as Gemma. But EmbeddingGemma 2 is newer, it's smarter, and this felt like a good use case to put it to the test.

Each day has one hidden prompt, like a Wordle word. The app embeds your photo and compares it against the prompt, and that similarity becomes a 0 to 100% closeness score. Hit 80% and you've got it. Miss and the next hint unlocks. The site itself is a static app on Cloudflare.

Why Does Open Innovation Matter?

Because it runs on a small open model, it works offline. Download the model once at home, then go outside, go to the coffee shop, and keep playing with no signal.

It's also about privacy. Picture the worst case: the game runs on a closed model API from some lab, with no zero data retention, and the privacy policy says your photos may be used for training. With Snapdle, you never hand your photo to a model API. You don't even hand it back to me. It all happens on your device, so nobody ever knows what you snapped, even if it's a photo of your deepest, darkest secret.

My Agent Session

Most of Snapdle was built with an AI agent. Here's the full session:

Prize Categories

  • Overall
  • Best Use of Gemma

Top comments (1)

Collapse
 
albertbenedict profile image
Albert Benedict Rustandi •

that 1700 line gist changed my life, 10/10 experience