SlopfishAlpha
Yu-Gi-Oh! combo solver & full-Duel AI

Brick optimally.

Give Slopfish a deck, a hand, and a target board—or sit across from it in a full Duel. Built from scratch in C++ over 2,200+ rule-checked cards, with zero hand-written combos and strict process-level hidden information.

Slopfish replay viewer showing a recorded Turn 2 Duel state between Kashtira and Onomat
A recorded game in the replay viewer. Kashtira went first; this is Onomat's turn two, 27 steps in.
What it does

One engine, four ways to use it

Finds lines nobody taught it

Name the end board you want—bosses, materials, locks, or an FTK. Slopfish searches legal plays straight from printed card effects with no hand-coded combo trees or archetype hacks.

Plays full Duels on a clock

Past turn one, it plays both seats to the end through hand traps, chains, and negates. Every AI seat runs in its own isolated OS process and sees only what a player at the table can see.

Live testing & Challenges

Duel the engine live with custom lists, inspect every legal move in step-by-step replays, or try Challenges: step directly into a recorded turn from the models' own games to see if you can outplay the AI.

Deck editor + screenshot import

Search the card pool, check legality across Modern, retro, and point-based formats, share YDK/YDKE/URLs, or drop in a deck screenshot—recognized 100% locally in your browser without uploading images.

Strength

Tested against every open-source bot we could run

No hand-written deck scripts, no peeking at hidden cards, and no pre-game prep per decklist. In head-to-head mirror matches from both seats with identical deals and clocks, Slopfish posts a winning record against every open-source Yu-Gi-Oh! AI we could run.

89%1,030–133 overall across 7 open-source Yu-Gi-Oh! bots (95% CI: 87–90%)
93–94%Against search + belief-model bots (MCTS & alpha-beta) and scripted deck executors
82%131–28 vs. a 22.7B-step RL policy on 4 held-out decks never seen in training
2,263*Declarative cards in C++, backed by 1,095* tracked Konami rulings
Opponent Architecture Scored Slopfish W–L Score (95% CI)
tsoj alpha-beta Search + belief model + learned evaluation 117 110–7 94% (88–97%)
tsoj MCTS Monte Carlo tree search on reconstructed duels 130 121–9 93% (87–96%)
tsoj heuristic / greedy / random Hand-written priorities, 1-ply lookahead, and random floor 368 359–9 98% (96–99%)
WindBot Ignite Hand-written per-deck C# executors (7 lists) 52 49–3 94% (84–98%)
sbl1996 / ygo-agent Deep RL policy (22.75B steps, 12 decks incl. 4 held-out) 496 391–105 79% (75–82%)
All seven rivals Paired mirrors, both seats, identical deals & clock 1,163 1,030–133 89% (87–90%)

Measured on paired mirror matches played to completion from both seats (current snapshot: model t31; a winning record on all 12 decks against ygo-agent, with 9 of 12 decks serving as pre-referee-fix floors). Games where the two simulators diverge on an edge-case ruling are excluded as void, so per-rival rows are readings on completed games rather than formal ratings. *Card and ruling counts as of writing (November 2026).

How it works

The printed card is the specification

A solver is only worth trusting if its rules are right. Most of the work in this project is getting chains, timings, and rulings exact—not hard-coding lines.

  • 01
    Cards are written as data, not scriptsEvery effect is a declaration of costs, targets, timings, and shared verbs. A card that uses a field no engine reader handles in that context is refused at load time—never silently half-played.
  • 02
    Rulings are fetched, then citedWhenever printed text leaves a corner case open, the answer comes from Konami's official rulings database and is stored beside the card and cited directly in the C++ code.
  • 03
    Complex hands solved in secondsFor the 24-step Rank-4 board beside this, a typical opening hand reaches the target in ~234,000 positions—a few seconds on a single core.
One real line, every step · Onomatopaira + Gagaga Ganbara Knight24 steps
 1. Onomatopaira: pitch Gagaga Ganbara Knight,
    add Gogogo Goblindbergh, Zubababancho Gagagacoat
 2. Normal Summon Gogogo Goblindbergh -> SS Onomatokage from deck
 3. Xyz Summon Gagagaga Girl using Gogogo Goblindbergh, Onomatokage
 4. SS Zubababancho Gagagacoat from hand
 5. Gagagaga Girl: detach 1 (Gogogo Goblindbergh), add Unbreakable Xyz Barrier
      -> search Dododo monster: Dodododo Warrior
 6. Gagagacoat: revive Gogogo Goblindbergh from GY
 7. Xyz Summon Gagagaga Magician using Zubababancho Gagagacoat, Gogogo Goblindbergh
 8. Gagagaga Girl (granted): Utopic Future can make a second attack each Battle Phase
 9. Xyz Summon Number F0: Utopic Future using Gagagaga Girl, Gagagaga Magician
10. Gagagaga Girl (granted): Utopic Draco Future can make a second attack each Battle Phase
11. Utopic Future -> Utopic Draco Future (3 materials)
12. SS Dodododo Warrior as Level 4 (sent Dodododwarf Gogogoglove to GY)
13. SS Onomatokage from GY
14. SS Dodododwarf Gogogoglove from GY
15. Xyz Summon Infernal Flame Banshee using Dodododo Warrior, Onomatokage
16. Banshee: detach 1 (Dodododo Warrior), add Agnimal Candle
      -> search Zubaba monster: Zubababancho Gagagacoat
17. SS Agnimal Candle (added by effect)
18. Gogogoglove: SS Zubababancho Gagagacoat from hand
19. Xyz Summon ZS - Utopic Sage using Dodododwarf Gogogoglove, Agnimal Candle
20. Utopic Sage: detach 2, SS ZS - Ascended Sage from Deck
21. Xyz Summon Number F0: Utopic Future Zexal using Infernal Flame Banshee, ZS - Utopic Sage
22. Xyz Summon Number 39: Utopia using Zubababancho Gagagacoat, ZS - Ascended Sage
      -> search Rank-Up-Magic Normal Spell: Hyper Rank-Up-Magic Utopiforce
23. Utopia -> Utopia Prime (3 materials)
24. Utopiforce: Utopia Prime -> Number 99: Utopia Dragonar (4 materials)

END BOARD
  Number 99: Utopia Dragonar        4 materials
  Number F0: Utopic Draco Future    3 materials
  Number F0: Utopic Future Zexal    2 materials
Under the hood

Built for speed, determinism, and zero peeking

The entire rules engine, canonical state hasher, and process-isolated seat architecture are written from scratch in C++20 with zero external runtime dependencies. Three real slices of the core:

  • A
    Peeking fails to compileEvery AI seat runs in a separate OS process and only accepts a private-constructor SeatView decoded off a socket. Passing the referee's true state to an AI policy is a compile error, enforced by negative compile-fail tests.
  • B
    Symmetries collapse on the flyTwo move orders or identical card copies that reach the same board produce the exact same canonical fingerprint—streamed straight into 4-lane XXH64 with a compile-time-proven modular inverse for tail unwinding.
  • C
    Zero bytes for unused mechanicsEvery state field packs into one Structure-of-Arrays block, and specialized card mechanics compile down to zero bytes per board whenever neither deck contains a card that uses them.
cpp/engine/test/wall/fail_agent_decides_on_the_true_duel.cppcompile-fail test
// expect: fails -- a seat's policy decides on its seat view only:
// the referee's row is no decision it can be asked.
#include "../../core/core.hpp"
#include "../../seat/agent.hpp"

int decide_on_truth(sfseat::Agent& agent, sfcore::Batch& truth) {
    return agent.decide(truth).is_null() ? 0 : 1; // <-- rejected at compile time
}

// seat/view.hpp (abridged) -- only Inbox (the socket reader) can construct a SeatView
class SeatView {
    friend class Inbox;
    SeatView() = default;
    SeatView(const SeatView&) = delete;
};
Enforced by the compiler & OS, not honor system: the test suite builds negative tests that try to hand the true Duel to an AI policy—and the test run fails if any of them compile.
cpp/engine/core/state.cppcanonical fingerprinting
// Undo an XXH64 round using Newton's iteration mod 2^64 at compile time.
// Lets 4-lane streaming hash canonical board states with zero buffering.
constexpr uint64_t inverse_odd(uint64_t a) {
    uint64_t x = a;                              // a * a == 1 (mod 8)
    for (int k = 0; k < 5; ++k) x *= 2 - a * x;  // doubles correct bits each step
    return x;
}

constexpr uint64_t kP1Inv = inverse_odd(kP1);
static_assert(kP1 * kP1Inv == 1, "kP1Inv is kP1's inverse mod 2^64");

SF_HD inline uint64_t xxh_unround(uint64_t acc, uint64_t input) {
    return rotr64(acc * kP1Inv, 31) - input * kP2;
}
Zero-buffer symmetry collapsing: duplicate card copies, hand ordering, and equivalent Monster Zones canonicalize directly into a streamed 64-bit hash so transpositions are never searched twice.
cpp/engine/core/core.hppvocabulary-gated memory
// Decks pay 0 bytes per state for mechanics their cards never use. (abridged)
SF_HD inline int room_of(const Engine& e) {
    return (e.has_mat_name       ? kRoomName        : 0)
         | (e.has_wide           ? kRoomWide        : 0)
         | (e.has_mat_race       ? kRoomMatRace     : 0)
         | (e.has_one_kind       ? kRoomOneKind     : 0)
         | (e.reads_heads        ? kRoomHeads       : 0)
         | (e.has_mat_original   ? kRoomMatOriginal : 0)
         | (e.has_becomes        ? kRoomCopyEvent   : 0)
         | (e.has_damage_pending ? kRoomDamage      : 0);
}
// One flat aligned allocation for every state field -> single memcpy copy.
Lean state footprint: every Duel builds a compact per-vocabulary layout. Combined with -ffp-contract=off across AVX2/AVX-512, searches stay fast, RAM-light, and bit-deterministic across CPUs.
About

Why this exists

The engine's origins come from a recognizable place: looking at a complex rank 4 slop hand and wondering whether or not you misplayed. From those simple beginnings, the project of creating a perfectly generic yugioh hand solver naturally followed, and it also follows that there should be some way of knowing whether or not your end board is also misplaying.

Slopfish seeks to bridge that gap. With this tool, we aim to fulfil these two goals fairly accurately in an engaging way. Downstream from just the solver, intended to be present are a deckbuilder, an optimizer, and a way to test hands against the algorithm yourself; all of these are trivial to develop once we've built the underlying system, so we thought "why not?".

Turns out building the underlying system though is a nightmare. But, at the same time, a fun nightmare, and a nightmare that I hope you all get to try for yourselves very soon.

The team, and getting in

Who makes it

Made by a couple people who just wanted to see a cool tool exist, Slopfish is made by a small but dedicated team. Fueled by curiosity, a need to optimize, and of course the desire to see what the community can do with this kind of promethean fire, we hope you're as excited about the idea behind Slopfish as we are.

Availability during this stage of development is extremely limited, but if you have a convincing enough use case we'd love to hear about it. Less of a wait list and more of a "I'll get back to you", for a brief while longer, unless you're a competitive circuit player, you'll be holding on for just a bit more. If you are a competitive circuit player and willing to review lines and give feedback, you're welcome to try out the tool.