How First Shuffle builds a deck

Algorithm version 2.0 · rules snapshot October 11, 2026.

The builder turns confirmed cards into a practical starting list for a family learning the game. It runs on your device. It uses fixed formulas and thresholds, with no LLM, paid inference, match simulation, or win-rate prediction. “Aggressive” changes priorities; it does not certify a stronger deck.

Build with owned spares

The editor immediately shows up to four useful owned spares, with card images, selected/spare quantities, a reason, and an explicit Add 1 action. It prioritizes the earliest playable missing evolution step, Basic Pokémon, matching Energy toward the selected goal, draw/search support, compatible attacks based on owned matching Energy, and switching options. Owned fillers can help finish a short list. Recommendations are heuristics, not a claim of the strongest possible deck.

Adding changes only the deck draft; ownership and the saved deck stay intact until Save changes. Suggestions refresh as the draft changes. Printing-level ownership, the 60-card cap, shared-name limits, and ACE SPEC limits apply. Just have fun permits agreed older printings and extra copies while still excluding TCG Pocket and unowned copies. At 60 cards, reduce a selected copy before adding a spare. Search can inspect other owned choices, and a settings shortcut appears when older owned cards fall outside the Standard check. Beginner goal details remain available in a collapsed accordion; target ratios do not block additions.

These ratios, weights, and readiness thresholds are our heuristics, not official Pokémon rules. Different real decks need different mixes. The official deck-design article explains why the strategy and card effects matter. Use the official rules resources and your exact card printing when playing.

Rules, readiness, and goals are different

Layer What it means
Rule check Exactly 60 cards; at least one Basic Pokémon; up to four copies of a name across printings, except Basic Energy; up to one ACE SPEC total; supported Standard printings; no more copies than in the current collection.
Readiness Our minimum consistency checks, including Basics, Energy, compatible attacker copies, early attack options, draw/search support and included evolution parents. A rule-valid list can fail these checks.
Build targets Soft composition goals. The available pile and fill order can produce different counts. A target is never permission to invent cards or exceed a rule limit.

The supported Standard snapshot accepts regulation marks H/I/J and excludes releases after September 27, 2026. Basic Energy can use any printing. Older potentially legal reprints, Pocket cards, unverified special deck rules, missing card data and Special Energy receive conservative handling. This is a dated application check, not tournament registration or a live legality service.

Style presets

Setting First game Balanced Aggressive
Basic Energy target 16 14 12
Pokémon target 16 16 14
Basic Pokémon target 12 10 8
Minimum Basics for readiness 8 8 6
Minimum attacker copies with a supported attack costing at most 2 Energy 4 2 0
Draw Trainer target 8 10 10
Search Trainer target 8 10 10
Control Trainer target 2 2 4
Printed-damage weight 0 0.12 0.40
Basic Pokémon score bonus 12 10 8
Penalty per evolution step 5 3 2
Penalty per Energy above 2 4 2 0.75
Penalty per recognized attack flag 8 4 2
HP weight, capped at 200 HP 0.025 0.040 0.015
Penalty per extra Prize card 12 8 4

First game, Balanced and Aggressive ask for at least eight Pokémon, four compatible attacker copies, 12–24 matching Basic Energy, four draw Trainers and four search Trainers before recommending the list. These are counts of copies, not different names. First game asks for more Basics and cheap attacks. Just have fun does not require these targets. An early attack option can still require evolution or have conditions; the check is not a turn-one guarantee.

Shared targets are four Switch and four Recovery Trainers, plus two Utility Trainers. They are soft allocation targets, not readiness requirements. The builder uses a name-based role list and a few compatibility checks: for example, Bug Catching Set is considered for Grass, and Buddy-Buddy Poffin needs an eligible small Basic target. It does not fully evaluate the cost or benefit of every Trainer effect.

Supported attacks and score

An attack is considered only when every Energy symbol is the selected type or Colorless, its cost is at most four Energy and no greater than the matching Basic Energy available in the pile, and its damage field is a positive plain number or number followed by +. The fixed-damage preference permits only plain numbers. Multipliers, effect-only attacks and mixed-type costs are excluded from attacker selection. Colorless costs accept the chosen Basic Energy; Colorless is not an additional Energy card type to collect.

The number before + is used as the scoring input. The bonus is not calculated. The reader separately shows the largest printed attack number and its modifier; that highlight is not the builder’s preferred attack or a guaranteed maximum damage.

Let D be the printed numeric damage, C the number of Energy symbols, and F the number of recognized flags:

attackScore = D / max(1, C)
            + D × style.damageWeight
            + (empty effect text ? 5 : 0)
            − max(0, C − 2) × style.expensiveAttackPenalty
            − F × style.conditionalPenalty

Recognized flags are a + damage field, a coin-flip phrase, an Energy-discard phrase, and an attack-restriction/self-damage phrase. Each category contributes at most one flag. The implementation uses limited English text patterns: it can miss wording, misunderstand context or flag a beneficial effect. Empty text can also mean incomplete metadata. This is a complexity proxy, not a complete effect parser or expected-damage calculation. Fixed printed damage can still have complicated effects.

For example, a text-free 60-damage attack costing two Energy scores 35 in First game and 59 in Aggressive. A text-free 140-damage attack costing four Energy scores 32 and 94.5 respectively. This illustrates different preferences, without claiming either card wins more games.

Pokémon score

For a viable Pokémon with Q owned copies, L evolution steps and P Prize cards awarded when knocked out:

pokemonScore = selected attack score (or 10 for the supported draw-Ability fallback)
             + (Basic Pokémon ? style.basicBonus : 0)
             − L × style.evolutionPenalty
             + min(4, Q) × 2
             + min(200, HP) × style.hpWeight
             − max(0, P − 1) × style.prizePenalty

The Prize count is extracted from supported numeric rule-box wording and defaults to one. It is another metadata-dependent proxy, not a complete Prize-rule model. The draw-Ability fallback recognizes the word “draw”; it does not simulate Ability usefulness. Evolution parents can be included as required steps even if they are not ranked attackers.

Construction order

  1. Filter eligible positive quantities and sort printings by ID. Each candidate uses one Basic Energy type; an explicit type selection limits the candidates.
  2. Find an owned evolution path back to a Basic using exact normalized “Evolves from” names. Reject missing paths and cycles. When several parents qualify, choose the first viable path in stable ID order.
  3. Rank viable Pokémon by the score above, breaking ties by printing ID.
  4. Allocate matching Basic Energy toward the target, then prioritize viable Basics toward the Basic target. Allocate further Pokémon toward the Pokémon target, adding owned evolution steps when needed. Evolution copies do not exceed the included immediate-parent count.
  5. Allocate useful Trainers by role: Draw, Search, Switch, Recovery, Control and Utility, toward their targets. Then fill remaining slots with those Trainers.
  6. If still short, try remaining viable Pokémon up to 24 total, then matching Basic Energy up to 24. Leave an incomplete list incomplete.
  7. Recheck rules and readiness. Prefer a ready candidate, then a rule-valid candidate, then the highest candidate score; break type ties alphabetically.

Every addition enforces owned-printing quantities, name copy limits, the ACE SPEC total and the 60-card bound. Missing-card suggestions remain outside the deck. This is a greedy algorithm: it does not search all combinations, optimize Trainer text, guarantee target counts, or guarantee finding a ready list whenever one exists in the pile.

Candidate score, where quality is the copy-weighted mean score of selected ranked Pokémon:

planScore = 2 × cardCount
          − 15 × readinessIssueCount
          + 2 × min(actualEnergy, targetEnergy)
          + quality
          − 2 × abs(actualEnergy − targetEnergy)
          − 2 × max(0, targetBasics − actualBasics)

Issues are counted by issue item, not by the number of missing copies. Parent-only Pokémon with no ranked candidate do not contribute to the quality average. Ranking is used to choose a generated plan, not to rate a manually edited or saved deck.

Opening-hand odds

For a full 60-card list, the helper reports exact sampling probabilities for a random seven-card hand before mulligans, search/draw effects and other game actions. Incomplete lists show no percentage. For K matching cards in a population of N and n draws, the probability of seeing at least r is:

P(at least r) = sum from k=r to min(K,n)
                choose(K,k) × choose(N−K,n−k) / choose(N,n)
Basic copies in 60 Chance of at least one in a random seven
6 54.1%
8 65.4%
10 74.1%
12 80.9%

The same calculation can describe seeing matching Basic Energy or a Search Trainer. Those events are not independent. Seeing Energy does not mean the cost is paid; seeing a Search Trainer does not mean its cost or target is available. The helper does not estimate a joint chance of attacking on a particular turn or treat a mulligan hand as playable.

Settings, saved decks and swaps

The current controls expose the style, matching Energy type, Basic Energy target from 12 to 24, and fixed printed damage. Invalid inputs fall back to the selected preset. Advanced weights are not accepted from UI input yet. Changing a style resets its Energy goal; changing a setting leaves the current list intact until Preview rebuild is selected. Save changes updates the current record; Save as new preserves a separate plan.

A new build creates a uniquely identified local deck and opens the deck workspace. Records include a name, timestamps, independent printing snapshots and quantities, selected preferences, source collection revision, algorithm version, favorite flag and a sample marker. They contain no account profile or email. Renaming changes metadata; deleting a deck leaves the collection alone and offers session-only Undo. Deck lists and settings survive reloads on this browser if storage is available. They do not sync across devices or reserve physical copies between plans.

On restore, saved printing metadata stays a snapshot and selected quantities are evaluated against the current collection. Reducing collection ownership opens a preview: cap affected decks at remaining copies, or preserve their lists and flag missing copies. Adding collection cards leaves saved selections intact. Rebuilding changes a draft, not the saved list. Sample plans retain their sample label. A swap replaces one copy with an owned spare of the same card kind, reruns rule and consistency checks, and becomes an unsaved edit. Swaps and manual quantity edits do not recompute the original generation ranking or simulate a game. The deck editor can also add an owned printing to a draft; editing the deck never changes source quantities. See Collection, decks and play for removal policies, Favorites, game Prize notes and storage migration.

If storage is blocked or full, plans remain available in the current tab, and the UI asks the user to download a copy. This app has no application user database, analytics endpoint or LLM endpoint.

Just have fun

This style makes a home-practice list from owned Pokémon TCG cards, including older printings. It starts with the same Energy and attack preferences, then uses spare owned cards until it reaches 60. It reserves a Basic Pokémon when one is available. It never invents a card or uses more copies than you own. TCG Pocket cards are excluded.

Before playing, both players agree to allow older printings, repeat copies, and extra ACE SPEC cards. Those are house rules. The list is labeled Home practice, not a tournament deck. A saved practice deck retains its style on reload and export.

You still need 60 cards and a Basic Pokémon to set up a full-size deck. Each player needs their own deck. Having 60 cards does not guarantee a useful attack, enough matching Energy, or every evolution step. The app explains these gaps without blocking the card reader or practice controls. Borrow matching Basic Energy before buying random packs.

The First game, Balanced and Aggressive styles continue to use the Standard checks described above. Their draw/search and early-attack targets are suggestions for smoother games, not permission to change the official rules.

What to do next

Suggestions name the missing Energy type or evolution parent and offer a card lookup and a singles-marketplace link. Spare owned Draw or Search Trainers are suggested before buying more. Marketplace links open external sites; this app does not claim a current price or complete a purchase.

Two-player Just have fun build

Build two decks is available only in Just have fun mode, with at least 120 owned copies. It creates two separately named 60-card snapshots in one workspace save and opens Player 1; the success toast can open Player 2. The source collection is unchanged.

Algorithm version 2.2-practice-pair first excludes TCG Pocket printings and invalid quantities. It requires 120 supported physical copies and two Basic Pokémon copies. It sorts by stable printing ID, reserves one Basic for each player, splits every remaining printing evenly, and gives each odd copy to the smaller pool. The existing practice builder then selects 60 from each pool. No printing can be allocated across the two decks beyond its owned quantity. If either practice setup check fails, neither deck is saved.

The split is deterministic. It does not simulate matches or promise equal strength. Matching Energy, attack effects and evolution gaps still appear as advice; home-practice house rules still require agreement. Borrow matching Basic Energy if needed. Later deck edits are independent saved plans and can overlap; the initial pair is not an ongoing physical-card reservation system.