OPTCG Card Explorer
Semantic search and similarity browser for One Piece Card Game cards, powered by Qwen3-Embedding vectors.
Dataset: t22000t/optcg-en-card-embeddings · Code: github.com/timothy22000/optcg-cards
Three ways to explore:
Search by description - type plain English describing the card you're imagining ("low cost red blocker with draw", "leader that punishes wide boards"). The query is encoded with the same Qwen3-Embedding model used on the corpus, then ranked by cosine similarity. Top-k results appear in the table and are highlighted on the map.
Browse / find similar - pick any card from the dropdown to see its full details and the 10 most mechanically similar cards in embedding space. Useful for finding swap candidates with comparable mechanics.
Synergy inspector - pick a Leader card to see recommendations that are color-legal under it, sorted by mechanical similarity with a bonus for cards in the leader's family/archetype. The cost curve shows the distribution of recommendations across costs - useful when sketching a deck shape.
Tips
- Search and browse rank by raw cosine similarity. Synergy adds OPTCG deckbuilding constraints on top: color legality (must share at least one color with the leader) and a +0.10 family bonus for archetype matches.
- Score is cosine similarity in [-1, 1]. Anything above ~0.55 is usually a strong match; below ~0.35 the model is reaching.
- Mix mechanical keywords (Blocker, Rush, Counter, On Play) with constraints (color, cost, power) for tighter search results.
- The UMAP is a 2-D projection of the same 1024-dim space - clusters tend to share color and card type.
Top matches
The map shows all 4372 cards projected to 2-D. After a search, the top-k hits are drawn on top with larger black-bordered markers.
Pick any card to see its full details and the cards that are closest to it in embedding space - useful when you want swap candidates with similar mechanics.
Pick a card above to see its details.
Similar cards
Pick a Leader card and see what fits in a deck around it. Recommendations are filtered to color-legal cards (must share at least one color with the leader) and ranked by cosine_similarity(leader, card) + family_bonus, where family bonus is +0.10 if the card and leader share at least one family/archetype. Other Leaders are excluded.
Pick a Leader above to see synergy recommendations.
Recommended cards
Score breakdown is base_cosine + family_bonus. A Family match: yes row got the +0.10 boost. Cost is shown for Characters/Events/Stages; Stages with no cost render as -.
How it works
Each of the 4372 cards is encoded as a single vector by Qwen/Qwen3-Embedding-0.6B (1024-dim, L2-normalized). The encoding strategy follows the proven minimaxir/mtg-embeddings recipe: serialize the mechanically-relevant fields as a prettified JSON document, replace the card's own name with ~ to neutralize self-references, then prepend a task instruction string so the model knows what kind of similarity matters (gameplay mechanics, not flavor text).
When you submit a query, the same instruction wrapper is applied and the resulting vector is compared by dot product against the precomputed corpus matrix. UMAP coordinates are precomputed in the dataset and just rendered here.
The task instruction comes from the dataset's provenance.json rather than being hardcoded, so the Space stays in sync if the upstream embedding ever changes.
Dataset
t22000t/optcg-en-card-embeddings - 4372 cards across 51 sets, latest pack ST29. Sister dataset t22000t/optcg-en-cards carries the structured fields without the embedding column.
What this Space deliberately does not show
No card images. The Space is text and structured-data only. See the parent project README for the IP rationale.
Source
Card data comes from the official One Piece Card Game site via the vegapull scraper. Pipeline code is at github.com/timothy22000/optcg-cards. This Space is at github.com/timothy22000/optcg-cards (sibling repo optcg-explorer-space).