an AI card-game experiment
We taught two AI bots to play Superjack — a fast card battler — from zero knowledge of the rules. One learned patience. One learned to race. Then we made them fight 60 times.
first — what even is this?
Superjack is a two-player card game — think a lean, fast cousin of Magic, played with an ordinary deck. Two ideas run the whole thing:
Drop your opponent to 0 and you win. Every game is a race to burn down twenty points of health.
Face cards (Jacks, Queens, Kings) hit the board as creatures that attack every turn. Number cards are gems — energy you spend, or burn as a 1-damage fireball.
A fireball pokes for 1. A creature swings for its power every single turn. Build a board and you roll over anyone just chucking fireballs.
Four Jacks stack into an 8/8 SUPERJACK that tramples everything. That's the game. Now — how do you make a bot play it?
the trick that makes it easy
You never have to know the rules to move. Every turn, the server hands your bot a legal array — every move you're allowed to make right now — already priced and validated. Your bot's only job: choose the best one.
Open a WebSocket. Say hello. You're in a game.
The board arrives with a legal list of every valid action.
Score the options. Send one back. That's your move.
Until someone hits 0. Win, learn, run it again.
"If your agent can pick an element from an array, it can play Superjack." Picking the right element is the entire game — and that's where the two personalities were born.
two bots, two brains
We wrote two completely different "choose the best move" functions and gave each its own identity. Same game, opposite instincts.
how they got good
No human coaching. We ran thousands of self-play games, reviewed the losses, changed exactly one thing at a time, and kept only what won a 50-to-100-game batch. Here's each bot's climb.
Build a board and attack. Instantly crushed the stock bots that just chuck fireballs.
Leaned harder into never spending. A gem saved for a King you'll never afford is a dead card. Hoarding isn't patience — it's paralysis.
Stop feeding creatures into bad blocks. The biggest attack is rarely the best attack — worth 18 points of win rate.
Also flattened the baseline bots — a race deck that just goes face.
Threw its whole board in every turn; chunky just took the good trades. Even a racer has to pick its spots.
Keep the racing soul, just stop the pure-suicide swings. From donating games to contesting them.
the title fight
Both bots went live on the ranked ladder and fought head-to-head. It was a coin-flip the whole way down.
chunky owned the middle. blaze answered with a closing kick to steal the series by a single game. So close it demanded a rematch — but first, both bots went back to school.
round two — back to the lab
Each bot ran five more rounds of experiments — one change, a hundred games, keep it only if it wins. Ten ideas each; most were duds. Two were real, and one was a bug hiding in plain sight.
Its fireball code still believed a fireball did 1 damage to a creature. The real number is 2 — enough to kill most blockers. That one wrong digit had quietly turned a removal spell into a wasted card for its entire life.
0% vs its old self · shipped
It used to never block — pure race, always forward. Now it counts the clock: if it's losing, it blocks to slow the other guy down, and it spends a fireball on the one blocker in its way. Aggression that finally knows when it's behind.
0% vs its old self · shipped
the rematch · 60 games
Both champions fielded their new brains and ran it back. Here's the twist: blaze's upgrade was a targeted one — block when you're losing, burn the blocker in your way. Both of those hurt exactly one kind of opponent: a bruiser who builds a board. It led from the first bell and never gave it back.
Cycle one was a dead heat, decided by a single game. Cycle two, blaze's counter-punch found chunky's board and stretched it to 55%. The bruiser is still the better all-round engine — but the racer learned the one thing that beats it. Both are still in the lab.
the finding nobody expected
We mirror-matched a bot against a clone of itself — identical on both sides. It split exactly 50/50. But the player who went first won only…
your turn
Seriously — this is the easy part. Everything you need is one page away. If your code can pick an item from a list, you can put a bot on the ladder.
Go to superjackthegame.com/play and look for the agent prompt.
Paste it into any coding agent (or start from the zero-dependency Node template). It connects and plays for you.
Write your own "pick the best move." Test it in self-play. Climb the ranked ladder.