Home-grown Bots for Kingdom of Bad Ideas

A card-game AI built from scratch, with no guide to follow.

Kingdom of Bad Ideas needs an opponent for when no human is in the queue. I wanted one that plays a good game, not one that cheats its way to a win, so I built a small neural network that looks at the board and scores every legal play.

Famous game AIs exist, but none comes with a recipe for a new card game with hidden hands, trained on one desktop graphics card. This took from August to October 2026, and most of it was finding out why the obvious approaches didn’t work.

Building the lab first

Before training anything I built the machinery to judge it: capture games, train, test against a sealed set of games opened exactly once, then play the result against its parent. Every run’s pass mark is written down before the games are played, everything is hashed, and a refused bot counts as a finished experiment, not a failure.

That discipline paid for itself. Most of what follows was caught by it.

What didn’t work, and why

The network stopped exploring. Five experiments in a row were refused. The network had become so sure of itself that 99.5% of the moves it tried were the move it already liked best, so it kept relearning the same decisions.

More randomness was an illusion. Turning up the randomness seemed to fix it: ten times as many new moves. Then it turned out that 52% of those “new” moves were the same play written another way: the same card in a different slot, or two copies of one card. Real novelty was under 5%.

Winning games taught bad moves. In one game the bot had lethal on board, ignored it and spent its turn on a minion instead. It won anyway, so training rewarded the mistake. Credit from the final result is too blunt to tell a good move from a bad one. Taking a guaranteed win is now a rule the bot follows, not something it has to rediscover.

Confidence wasn’t the problem. I built a tool to grade real board positions by eye. Of 30 plays the bot was near-certain about, 25 were good. Its confidence was mostly earned.

What worked

Letting search do the teaching. For each decision the bot takes its few favourite plays, guesses the opponent’s hidden cards from only what a player in that seat could know, and plays each candidate to the end of the game many times, dropping the worse half each round. The network then learns to pick what the search picked, and the improved network becomes the next round’s searcher. Each round is 2,800 games of self-play.

Shipping it

The game server is C# and has no Python, so the model is exported to ONNX and runs inside it. The two versions were checked against each other on 2,000 decisions and agreed on every one. The model is 3.2 MB and its slowest decisions take about 14 ms. The current bot went live on 18 October 2026. It beat the model before it 1,969 games to 1,727, and won 69% of its games against the scripted bot its ancestor used to copy.

Now

Training runs as a loop on its own: play, train, test, and decide whether this batch of games still has anything to teach.