This is a submission for the Gemma 4 Challenge: Build with Gemma 4
What I Built
I started this challenge with a very different idea.
For a while, I thought about building something more serious. I already have several ongoing projects where I experiment with Gemma 4, especially in local-first setups. One of them is an offline agent that can collect ideas, notes, and memories locally, then synchronize them with a main system once the device is online again. The prototype for that direction already exists.
But for this challenge, I wanted to build something lighter.
Something playful.
Something colorful.
Something that could make people smile.
Something that adults, artists, and even kids could try.
That was the beginning of Sketch Judge — a mobile-first AI drawing game where Gemma chooses what you have to draw, and then judges how well you matched the motif.

The game loop is simple:
- Add players.
- Choose rounds and draw time.
- Let Gemma choose a motif.
- Reveal the motif to the current player.
- Draw it before the timer ends.
- Let the AI judge the result.
- Continue until the final leaderboard reveals the winner.
The goal is not only to draw something beautiful. The goal is to draw something that clearly matches the target motif.
So if the target is book, drawing a beautiful apple should not win.
That made the project more interesting than a normal drawing app. Gemma is not only generating text in the background. It becomes the game master, the prompt creator, and the judge.
Sketch Judge has two modes:
Casual Mode is forgiving and family-friendly. A simple drawing can score well if the motif is clearly recognizable.
Artist Mode is stricter and aimed at adults, artists, and competitive players. In this mode, Gemma chooses more difficult and expressive motifs, and the scoring gives more weight to proportion, details, creativity, color, polish, and effort.
A simple outline can still be recognized, but it should not beat a detailed, colorful, polished drawing.
This app will not change the world or save it.
But maybe it can help you forget the problems for a moment and just have some fun.
Demo
Live frontend preview:
https://sketch-judge.vercel.app/
The hosted Vercel version currently renders the frontend only.
The local Ollama / Gemma 4 AI connector is not enabled in this deployment yet.
Code
Repository:
https://github.com/southy404/sketch-judge
The repository contains:
- the mobile-first game UI,
- the drawing canvas,
- local Ollama integration,
- Gemma-powered motif generation,
- Gemma-powered judging prompts,
- server-side score guards,
- Casual Mode and Artist Mode,
- fallback motif pools,
- final leaderboard logic,
- and a colorful sketchbook-style visual design.
How I Used Gemma 4
Gemma 4 powers the main creative loop of Sketch Judge.
I used the E4B model through Ollama for this prototype.
This model choice was intentional. I wanted to build something that fits a mobile-first and local-first direction. A huge cloud-only model could be powerful, but it would not match the future version I have in mind for this project.
Sketch Judge is a small web prototype now, but the idea points toward a game that could eventually run much closer to the user’s own device. Using a smaller Gemma model through Ollama felt like the right step because:
- it keeps the prototype local-first,
- it avoids making the game depend on a cloud API from the beginning,
- it fits the idea of private, casual gameplay,
- it makes experimentation fast,
- and it keeps the door open for a future mobile/on-device version.
The model does not only sit behind the app as a chatbot. It directly controls important parts of the gameplay.
Gemma chooses the motif
At the start of each round, Gemma chooses the drawing motif.
The app asks Gemma for a structured JSON response:
{
"name": "Floating Island",
"hint": "small island with a tree in the sky",
"difficulty": "artist",
"category": "scene"
}
The motif system has two goals:
- The prompt should be drawable in a short time.
- The prompt should not become repetitive.
Early versions of the game picked too many basic words like:
- apple
- book
- key
- banana
That made the game feel too limited.
So I added recent motif memory, category tracking, fallback motif pools, and stricter prompt instructions. In Casual Mode, Gemma chooses simple and fun prompts. In Artist Mode, it prefers harder and more expressive ideas.
Examples of Artist Mode motifs:
- Clockwork Bird
- Floating Library
- Dragon Teapot
- Rainy Neon Alley
- Underwater Castle
- Crystal Fox
- Tiny Robot Café
- Moon Garden
- Mechanical Garden
This made Gemma feel more like a creative game master instead of a random word picker.
Gemma judges the drawing
After a player submits a drawing, the app sends the image and target motif to the judging system.
Gemma returns a structured result like:
{
"detectedObject": "book",
"targetMatch": true,
"score": 74,
"recognition": 82,
"shape": 4,
"proportion": 3,
"creativity": 2,
"effort": 4,
"feedback": "The book is recognizable, but Artist Mode expects stronger proportions and more detail."
}
The most important rule is:
The score should depend on whether the drawing matches the motif.
A beautiful drawing of the wrong object should not win.
That was one of the biggest lessons while building the project. AI can be very friendly, sometimes too friendly. In early tests, the model could say something like:
Nice apple, but the target was a book.
And still give a high score.
That is not fair for a game, so the backend now adds scoring guardrails around the model output.
Score guards and fairness
The backend validates and normalizes the AI response before showing it to the player.
It checks things like:
- Is the target motif actually matched?
- Is the score on the expected 0–100 scale?
- Are category ratings consistent with the final score?
- Is the feedback overpraising a weak drawing?
- Is Artist Mode active?
- Is the drawing sparse, tiny, or only a simple outline?
- Is this a fallback score?
For example:
- Wrong motif: capped low.
- Empty or tiny drawing: capped low.
- Artist Mode simple outline: cannot score like polished art.
- Casual Mode: more forgiving.
- Fallback mode: never pretends to fully understand the motif.
This keeps Gemma creative, but the game rules stay fair.
Artist Mode
Artist Mode changes the role of Gemma.
In Casual Mode, the main question is:
Is the motif recognizable?
In Artist Mode, the question becomes:
Is the motif recognizable, and is the drawing actually strong?
Artist Mode judges more seriously:
- shape
- proportion
- detail
- color
- composition
- creativity
- effort
- polish
This means a simple black outline of a book can still score okay, but it should not receive 90+ points unless the drawing really has detail and finish.
Local-first AI through Ollama
The prototype uses Ollama locally.
This local-first approach is part of the concept. If this project grows further, I would like to explore:
- browser-to-local-Ollama mode,
- a packaged local app,
- a mobile version,
- or eventually an on-device Gemma setup.
The game is simple, but the architecture is intentionally pointing toward local AI gameplay.
Thanks for reading.
Sketch Judge is not a serious productivity tool. It is not trying to automate work. It is not trying to save the world.
It is just a colorful little AI game.
But maybe that is exactly why I liked building it.
Sometimes technology should also be allowed to be playful. Sometimes an AI model does not need to write reports or solve tasks. Sometimes it can just choose a silly motif, watch your chaotic drawing, and decide who wins.
Draw fast. Match right. AI decides.

Top comments (1)
neat! I try your demo and like