Guide
This is a simulator for the Cyberpunk Trading Card Game. It plays the game by the official comprehensive rules, lets you play against an AI with the real cards, and — its main purpose — lets AIs build decks and play each other thousands of times so you can find out which decks are actually good.
The tabs
| Tab | What it is for | You can… |
|---|---|---|
| PLAY | A game between you and the AI. | Pick decks, play a full game with click-to-act and a button for every legal move, undo, concede, export the replay. |
| WATCH | Replay any recorded game. | Step through a game decision by decision with both hands visible; auto-play; see every legal option and the one taken. |
| LAB | AI-vs-AI measurement. | Run tournaments between decks, run leagues where AI builders evolve decks, generate and screen batches of decks, open the reports. |
| BUILD | Deck construction. | Build a deck by hand with live legality and RAM, or let the AI build one toward a learned archetype; save, load, export. |
| CARDS | The card pool. | Search and read every card at full size; find the starter-set cards. |
How a game works (the short version)
Each player brings 3 Legends and a deck of 40–50 cards, and starts with 6 dice (d4, d6, d8, d10, d12, d20) in their fixer area. Every die that has been rolled into your Gig area is a Gig; its face value is worth that much Street Cred. You win the moment you begin a turn with 7 or more Gigs — and since you only own 6, you must steal at least one from the Rival. You also win if the Rival must draw from an empty deck.
- Start of turn: win check; ready everything (Units, Legends, Eddies); draw 1; take a die from your fixer, roll it, and put it in your Gig area (the d20 only when it is the last die left).
- Main phase, in any order: play cards from hand by paying their cost in €$ (each ready Eddie or Legend is 1 €$); sell one card per turn — it goes face-down into your Eddies area and pays for things from now on; Call a Legend once per turn for 1 €$ to flip one face-up and use its text; GO SOLO a Legend that allows it, paying its cost to put it on the field as a Unit; use abilities; attack with ready Units that did not enter this turn.
- Attacking: choose the attacker and a target — a spent rival Unit (a fight: higher power wins, the loser is defeated, ties defeat both) or the rival's Gig area. The attacker is spent. The defender may react: BLOCKER Units redirect the attack to themselves, QUICK cards can be played, a Legend can be Called. If the Gig attack goes through, you steal one die, plus one more for every 10 power (power 10 steals 2). Stolen dice keep their values.
- End of turn: "this turn" effects end and all Units lose Lag. Once both players have run out of fixer dice, Overtime begins: from then on 7 Gigs at any moment wins instantly.
The sim follows the comprehensive rules precisely, including the fine points (a spent Legend may GO SOLO and arrives spent; a Legend that leaves play is removed from the game; a 0-power Unit cannot defeat anything). Every judgement call is written down in docs/rulings.md with the rule it comes from.
Reading the board
- Hand — your cards; the Rival's are face-down (in WATCH both are shown). A card glows when it can be played or sold right now.
- Fixer — the dice you have not rolled yet. Gig area — your Gigs, with a count out of 7 and your Street Cred (the sum). "Null" means no Gigs yet, which counts as less than 0.
- Legends — three slots. Face-down Legends are unknown even to you until Called. SPENT means the Legend was used as an Eddie this turn. A card turned on its side is spent; a card that is simply dimmed is not ready yet.
- Field — Units in play. A Unit that entered this turn has Lag and cannot attack or use its ⊡ abilities. The numbers on a card are cost (top left) and power (bottom right); the chip on a Unit's bottom corner shows its current power with everything added in, and any Gear it is wearing sits under it.
- Eddies / Deck / Trash — ready-of-total Eddies, cards left in the deck, cards in the trash. GO SOLO Legends that leave the field are removed from the game and appear nowhere.
- Phase banner — whose decision it is and the turn number; it also announces Overtime and the winner.
- Prompt — the current question with every legal answer as a button. Cards and dice you can click are the same options drawn on the board.
Reading a report
A report is what a tournament or a league generation leaves behind. It opens with the run's facts, then says in plain sentences who won and how much to trust it, and every number after that is explained where it appears; the glossary at the end of each report has the full definitions.
- Who played these games — Both sides of every game here were played by the heuristic agent, a one-ply greedy bot, so the ranking is conditional on that opponent: a deck can place highly because it exploits this bot rather than because it is good. The agent scores the board one ply ahead and cannot plan across turns; its preview answers every rival reaction with a pass, so an attack always looks unopposed and it almost never keeps a Blocker home to defend — in self-play it holds one back at a few per cent of the turns where it could have attacked with it, which tests/unit/test_report.py re-measures so that almost cannot quietly become never; and it always takes the largest Gig die and mulligans by a fixed rule, neither of which anything here has measured against the alternatives. Its one strength figure comes from the frozen benchmark panel, which anyone can re-run with tools/arena.py panel heuristic: six deck pairings whose twelve lists are written out card for card in data/arena/panel.json, 60 games each, every seed played from both seats and with the deck assignments swapped as well. Over those 360 games it wins 93.9% against uniform random play (95% Wilson 90.9–95.9%, and 91.7–95.0% across the six pairings) and exactly 50.0% against itself, which is the protocol showing that no seat or deck advantage is left inside the number. That 93.9% is a score on those twelve decklists and travels no further: run the same protocol on other samples of decks, with tools/arena.py a-vs-b heuristic random --no-sprt --deck-seed N, and it lands anywhere from 88% to 95% while nothing about either agent changes, so read it as about nine games in ten rather than as a constant. What it cannot do has an instrument too: on the delayed-reward suite, tools/arena.py delayed heuristic, it wins 0 of 128 trials over eight positions that each hold a verified winning line, where uniform random play wins 12 of the same 128 — those positions were chosen because this agent misses them, so the zero is a definition rather than a discovery, and the suite is there for whatever plays next. It is a floor rather than a fraud: it plays a recognisable game, and every deck here met the same opponent, so the comparison between decks is fair — what is untested is how much of it survives a stronger player. No human games are recorded anywhere in this project, so nothing here is validated against human play. The same paragraph heads every report; it is written once in the report code so the page and the text version cannot drift apart.
- Summary in words — the strongest deck, which of its matchups are statistically solid and which could still be luck, whether the decks counter each other (rock–paper–scissors), and what to bring if you had to pick blind. These sentences are computed from the results, not written by hand.
- Win rate — games won divided by games played, against every opponent. The bar carries a lighter band: the 95% range of plausible values for the true win rate given this many games. A short run gives a wide band; when two decks' bands overlap heavily, the games have not separated them.
- Strength — a rating fitted to all matchups at once, so beating strong decks counts for more than beating weak ones. It is shown as the win rate that rating predicts against this field (the field averages 50%), with the raw rating in brackets; tap it to see the numbers behind it. When it disagrees with the plain win rate, the win rate is the fact and the rating is the model's view.
- Bring it? — if you had to pick a deck blind against an opponent doing the same, how often you should bring this one. 100% means nothing here beats it; a split means the decks counter each other.
- Head-to-head — the row deck's win rate against the column deck, coloured green or red by how far it is from even, with the games in brackets. A tick marks a result that is statistically solid: after correcting for the number of matchups looked at, fewer than one tick in twenty is expected to be a fluke. Cells without a tick could be noise. Tap any cell to see the exact count and how much to trust it.
- The decks — each list in full: archetype, the shape in words (curve, the mix of Units, Programs and Gear, how many blockers, removal, Gig cards and so on), Legends, cards by type, the cost curve, and in a league whether the deck was built fresh this generation and the swaps tried, with how the new card did in the games that came out differently.
- Cards that helped and hurt — per deck, the win rate when a card was drawn against when it stayed in the deck, the difference in points, and the games behind each side. A three-of is drawn in most games, so the not-drawn side is often thin, and a difference marked thin rests on fewer than 20 games on one side. It is a correlation, not proof: a card is drawn in particular games against particular opponents. The league's swap test is the causal check.
- League evolution — a chart of each builder's strength across the generations, relative to its own generation's field (which always averages 50%), coloured by archetype, with fresh and replaced decks marked, and a table of how each archetype did over the whole league.
- Games differ per matchup — games are played in batches of 40 and checked between batches: a matchup stops as soon as one deck is clearly ahead or the two are clearly even, so with a cap above one batch lopsided pairs can use fewer games than close ones. The report's first lines say how many matchups actually stopped early and why. As a rule of thumb 100 games pin a win rate to about ±10 points, 400 to ±5, 1,000 to ±3.
Archetypes: kinds of deck learned from play
Nobody here wrote down what an "aggro" or a "control" deck is. Instead, every deck that finishes a tournament or league is recorded with its shape numbers — average cost, the mix of Units, Programs and Gear, and how many blockers, removal effects, Gig-manipulation cards, haste, economy, extra-steal and draw effects it runs — and the lab groups the recorded decks by those numbers (a standard clustering, re-run after every job). Each group is an archetype: it gets a name generated from the two numbers that set it apart from the other groups (for example Low-curve swarm or Removal wall), a one-line description, and the pooled win rate of its decks, so you can see for yourself whether the group is real and whether it wins. The grouping is deliberately cautious: a group needs at least three decks, one-card variants of a list count as one deck, and groups are only kept when they separate more cleanly than random decks would — otherwise there is one group so far. Every archetype says how well it stands apart (clearly separated, loosely grouped or provisional), and a group whose distinctive numbers change is renamed with its old name kept as an alias. Reports label a deck that was not built toward an archetype with the group its list sits closest to (nearest: …).
- Explorer — a builder that invents a deck shape at random inside what its Legends allow and builds toward it. Until 8 distinct decks have played here every builder explores; afterwards one league builder in four — and never fewer than one — keeps exploring, so new archetypes can still appear. Its decks are labelled exploring in reports.
- Learned builders — one per archetype: the deck is built toward the centre of that group, with the card choices leaning on learned card values (after each tournament the knowledge store remembers how much each card raised or lowered win rates), and its Legends are drawn from the group's own decks, favouring the ones that won.
- In a league the replaced builder is rebuilt toward the surviving archetype with the lowest win rate, so ideas keep being re-tested instead of everyone copying the winner. The archetype table in each report says how each group did in that run.
Decks and files
- The two retail starter decks, The Heist (V, Viktor, Jackie — low Street Cred payoffs, quickhacks, blockers) and Embracing Power (Goro, Yorinobu, Saburo — Arasaka muscle and Gear), are included exactly as WeirdCo published them and are the default matchup in PLAY. The sample decks are generated, legal lists — one per faction — for variety. The starter-only cards can be isolated with the set filter in CARDS or BUILD.
- Decks are JSON files in
data/decks/; generated batches go todata/decks/generated/; lab results toout/lab/; exported replays download from the browser. - Everything here has a command-line twin (
cptcg sim,tourney,league,generate,build,serve); see the README for the exact flags.
Running it yourself
The easiest way is the hosted site: renatom11.github.io/cyberpunk-tcg. It is the same client with the rules engine running inside your browser (Python via WebAssembly), so it plays for real on any device — nothing to install. Decks you save, reports you produce and the archetypes the lab learns stay in that browser. Lab jobs run one engine per processor core of your device, which is still far slower than a computer, so keep tournaments small there (a few hundred games); for big leagues run it locally:
- Install Python 3.11 or newer, then in a terminal:
git clone https://github.com/renatom11/cyberpunk-tcg,cd cyberpunk-tcg,pip install -e . - Start it with
python -m cptcg serveand openhttp://127.0.0.1:8000/in a browser. Every tab is live: games are played against the engine, decks save to disk, and lab jobs run on your cores. - On a phone: start it with
python -m cptcg serve --host 0.0.0.0and openhttp://<your computer's IP>:8000/on the phone while both are on the same Wi-Fi. The board uses the stacked phone layout automatically.
Tips
- Hover a card to read it; on a phone tap a card that has nothing to do, or long-press any card.
- On a phone the board is the same layout stacked — the Rival's half on top — and never scrolls; hands and fields scroll sideways. The LOG button opens the log over the board.
- Identical buttons are merged (three face-down Legends are one "Call a Legend" button) because the choice is genuinely the same.
- UNDO is free and unlimited because every game is a deterministic replay of your choices.