Steerable game-idea generation over a vector space of Steam games
  • Python 97.1%
  • Scheme 1.8%
  • Shell 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Yager 935f7bcf92
Add local web UI (gamevec web) for find, ideas, runs and data jobs
Find runs in-process with the model kept loaded; ideas/build/titles/tags/eval
run as background jobs that spawn the CLI (one at a time, live log, stop).
Localhost only; POSTs need a per-process token and a localhost Host header.
The run viewer is mounted at /runs; find logic is shared with the CLI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133iBxq279ndSH7xChxF6gC
2026-11-21 13:50:11 -05:00
assets Add run viewer and logo 2026-11-20 19:34:03 -05:00
gamevec Add local web UI (gamevec web) for find, ideas, runs and data jobs 2026-11-21 13:50:11 -05:00
scripts Add mechanics-fit axis from SteamSpy tags 2026-11-21 12:18:50 -05:00
tests Title debiasing (option A), eval harness, well-known mask fix 2026-11-21 13:44:28 -05:00
.gitignore Ignore CLAUDE.local.md (local session notes) 2026-11-20 19:01:34 -05:00
channels.scm Initial gamevec: steerable game-idea generation over Steam embeddings 2026-11-20 18:52:32 -05:00
manifest.scm Initial gamevec: steerable game-idea generation over Steam embeddings 2026-11-20 18:52:32 -05:00
README.md Add local web UI (gamevec web) for find, ideas, runs and data jobs 2026-11-21 13:50:11 -05:00

gamevec

Steer-able game-idea generation over a vector space of ~100k Steam games.

You give a direction (seed games, concepts to push toward or away from, or "find an empty gap near here"). gamevec turns it into a point in embedding space, shows an LLM the real games around that point, asks for pitches, then embeds the pitches and checks where they actually landed:

  • theme fit: how the pitch ranks against existing games for closeness to the target (#1 = closer than any real game). Store-page embeddings encode theme and setting much more than mechanics (Into the Breach's neighbours are other mech games, not other grid-tactics games), so read this as "same Steam shelf", not "same design".
  • mechanics fit: the same rank idea over SteamSpy user tags (#1 = closer to the target's mechanics than any tagged game). A separate LLM call tags each pitch without seeing the target, so a pitch can't score by echoing target tags. Needs gamevec tags.
  • originality: percentile of how unique it is vs. Steam (80% = its nearest real game is farther away than is true for 80% of Steam games).

Misses get sent back with feedback ("too close to X", "drifted off target") for up to --rounds revisions.

Setup

guix time-machine -C channels.scm -- shell -m manifest.scm   # pinned env
python3 -I scripts/fetch_data.py data/raw   # ~1.2 GB, range-extracted from Zenodo zips
python3 -m gamevec build                     # -> data/store (debiased vectors, metadata)
python3 -m gamevec titles && python3 -m gamevec build   # title debiasing (~30 min CPU, optional)
scripts/tags_remote.sh pull && python3 -m gamevec tags   # optional mechanics axis
# put MODEL_API_KEY=LLM_... in .env (gitignored), see 'Swapping the LLM'

BGE-M3 (~2.2 GB) downloads to ~/.cache/huggingface on first use; it runs on CPU.

Use

# explore (no LLM): what lives near a direction?
python3 -m gamevec find "cozy space trucking"
python3 -m gamevec find --like "Slay the Spire" --more "horror" --less "cards"

# blend + steer
python3 -m gamevec ideas --like "Into the Breach" --like "Stardew Valley:0.5" \
    --more "time loop" --brief "solo dev, 2D, ~6 months scope"

# steer mechanics directly (Steam tags; `gamevec tags --list`)
python3 -m gamevec ideas --like "Stardew Valley" --tag "Deckbuilding" --tag "Turn-Based Tactics"

# find under-served regions near a direction
python3 -m gamevec ideas --gap --like "Outer Wilds" --targets 2 -n 2

Runs are saved to data/runs/*.json. Browse them with python3 -m gamevec view --open (stdlib only, so it works outside the Guix shell; serves http://127.0.0.1:8765/, --port to change).

Everything above is also available in a local web UI: python3 -m gamevec web --open (http://127.0.0.1:8766/). Find runs in-process with the model kept loaded. Ideas, build, titles, tags and eval run as background jobs that call the CLI, one at a time, with a live log and a stop button. Finished idea runs link to the run viewer at /runs. It listens on localhost only and has no auth.

How the vector math works

  • Corpus vectors: BGE-M3, 1024-d, from each game's store text (precomputed by the dataset).
  • Debiasing (space.py): subtract the corpus mean and project out the top principal components ("all-but-the-top"). Store blurbs share a strong generic marketing direction that otherwise dominates arithmetic.
  • Title debiasing (--title-beta, default 0.3): the dataset embedded each game's title with its text, so 36% of a game's neighbours shared a title word. 0.3 × each game's own title embedding is projected out (pitches get the same with their titles). Chosen with gamevec eval (neighbour tag agreement, title leakage, and whether an LLM description of a known game, minus its name, finds it): title-word neighbours 39% → 28%, description hit@100 53% → 56%. Removing more cuts leakage further but hurts description lookup.
  • Target = normalized(weighted mean of seed games + strength × Σ more − strength × Σ less).
  • Mechanics (tags.py): TF-IDF over a whitelist of ~200 gameplay tags (theme, art, mood and meta tags dropped), soft cosine via tag co-occurrence so near-synonyms ("Farming" / "Farming Sim") count as close. Target = weighted tag centroid of seeds, of each --more concept's 40 neighbour games, and of --tags.
  • Gaps (find_gaps): midpoints of related-but-distinct well-known game pairs whose nearest other game is farthest away.

Swapping the LLM

gamevec/llm.py: implement structured(system, user, schema) -> schema and add a branch to get_llm. Select with GAMEVEC_LLM=provider:model:

spec key
meta:muse-spark-1.3 (default) MODEL_API_KEY
claude:claude-opus-5-5 ANTHROPIC_API_KEY or ant auth login

GAMEVEC_EFFORT sets reasoning effort (provider default if unset). Any of these can live in .env at the repo root (gitignored); real env vars win. The Claude backend enables server-side refusal fallbacks (fallbacks="default").

Data

The Steam Dataset 2025 by vintagedon — doi:10.5281/zenodo.17266923, CC BY 4.0. Snapshot Aug–Sep 2025.

SteamSpy tags (mechanics axis)

scripts/fetch_tags.py runs on a separate always-on host (asahihome) as a systemd user unit (scripts/gamevec-tags.service), resumable and rate-limited to SteamSpy's 1 req/s. Phase 1 = the ~20k games with Steam recommendation counts (~5.5 h, PHASE1_DONE marker); phase 2 = the remaining ~130k (~36 h; DONE.json when done).

scripts/tags_remote.sh status
scripts/tags_remote.sh pull      # -> data/raw/steamspy_tags.jsonl (then: gamevec tags)