๐ฆ Chameleon
Guess the secret word from a sequence of icons โ embeddings and semantic similarity.
๐The task, in plain English
A word-guessing game: you see an ordered sequence of icons (each icon comes with a text description), chosen by a "clue-giver" to hint at a secret word. Your model must predict the secret word. Example: icons for water + fall + mist โ "waterfall". The order and combination of clues carry meaning.
| Input | Sequence of icons with text descriptions |
|---|---|
| Output | The secret word (from a vocabulary) |
| Really tests | Text embeddings + semantic similarity: mapping words and descriptions into vector space and measuring closeness |
๐งThe baseline you're given
The baseline embeds icon descriptions and candidate words with a pretrained sentence encoder
(sentence-transformers) and picks the candidate whose embedding is most similar (cosine) to a simple
average of the clue embeddings. Limitations: naive averaging treats clues as an unordered bag, ignores that some
clues matter more, and never adapts the embedding space to the game.
๐Baseline vs. solution
- Mean of clue embeddings โ nearest word
- Ignores clue order and importance
- Off-the-shelf encoder, no task adaptation
- Better pooling: weighted combination of clues (position weighting, max-sim per clue)
- Score candidates by sum of similarities to each clue rather than similarity to the average โ combinations like water+fall need both parts to match
- Try stronger sentence encoders from the provided model list; ensemble two encoders' rankings
- Validate on the provided games; inspect misses โ most fixes come from reading errors, not more math
๐งExplain it like I'm brand new
What's an embedding? A function that turns text into a list of ~400 numbers such that similar meanings get nearby numbers. "dog" and "puppy" land close together; "dog" and "carburetor" don't. Once everything is a point in space, "which word do these clues point at?" becomes geometry: measure distances (cosine similarity) and pick the closest. That one idea โ embed, then compare โ solves Chameleon, Restroom, Concepts, and appears at IOAI every year.
๐ฌThe Gemma 4 playthrough (2000-token limit)
I have clue descriptions (list of strings) and candidate words (list of strings). Using sentence-transformers (model already cached locally), write ONLY code to embed both, and rank candidates by the SUM of cosine similarities to each clue. Code only, max 25 lines.
from sentence_transformers import SentenceTransformer
import torch
model = SentenceTransformer('/path/to/local/model')
E_clues = model.encode(clues, convert_to_tensor=True, normalize_embeddings=True)
E_cand = model.encode(candidates, convert_to_tensor=True, normalize_embeddings=True)
sims = E_cand @ E_clues.T # (n_cand, n_clues)
scores = sims.sum(dim=1)
best = [candidates[i] for i in scores.argsort(descending=True)[:5]]
print(best)๐ฏTakeaways & what Day 1 might do with this
- Pattern family: embeddings + cosine similarity โ the most reliably recurring IOAI pattern.
- On the real Day 1 of 2025, this at-home task evolved into Concepts โ same semantic-similarity core with an LLM judge added. Master the simple version and the extension is incremental.