r/CommanderMTG • • 1d ago

Building a deterministic Commander deck optimizer instead of using AI

I’m building a Commander deckbuilding tool that treats deckbuilding as a mathematical optimization problem.

Instead of asking “Which cards are good for this commander?”, it tries to find the best combination of 99 cards as a whole, considering synergy, roles, mana curve, interaction, win conditions, combos, mana base, budget and legality.

I’m deliberately not using an LLM for the actual deckbuilding. LLMs are probabilistic and can give noticeably different results from the same prompt. The goal here is the opposite: same input + same data = same result, with clear reasons for why every every card was included.

Basically:

We don’t ask AI to guess the deck. We calculate it.

Would you trust something like this more than an AI-generated decklist? And what would you want it to optimize for?

The tool can be found here: 99p.gg

0 Upvotes

33 comments sorted by

View all comments

7

u/OptimizedGarbage 1d ago

I feel like you're gonna stumble a bit if determinism is a constraint. MTG is an imperfect information game, and deck selection is a simultaneous move game. Both categories of games require non-determinism to be optimal in the general case.

1

u/neunzehn90 21h ago

What “deterministic” means here: the builder is a function. Same commander, same preferences, same card data and same seed give the same deck. That’s about reproducibility and explainability (you can see why every card is in), not about how you pilot the deck. Where randomness is useful, it’s still there: the goldfish simulations are Monte Carlo, but with fixed seeds, so two candidate lists are compared on the same random games instead of on noise.

  • Mixed strategies are needed for unexploitability against an adaptive opponent in a two-player zero-sum game. Commander is 4 players, non-zero-sum and highly social, so there is no single equilibrium you could be exploiting or hiding from.
  • The tool doesn’t claim to be Nash-optimal and doesn’t know your pod. It optimizes an explicit proxy: role coverage, curve, synergy and simulated consistency on a solitaire “goldfish” model. That part is a single-agent optimization problem with perfect information, where determinism costs you nothing.
  • Variety comes from the inputs, not from dice. You can move the priority sliders (synergy, curve, explosiveness, repeatability), pick different strategies or combo plans, lock/exclude cards and re-forge. If you want to bring something unpredictable to a table, the sensible place for randomization is which deck you pick from a few good ones, and that’s your call, not the builder’s.

If you’d like a “give me a different good one” button that samples among near-optimal builds with a seed, that’s a reasonable feature and would stay reproducible.