I love the deckbuilding game Star Realms. To learn more about strategy, I used machine learning techniques to train computer models that play better than I can. If you're not familiar with Star Realms, learn to play it first before reading this page, or else this info won't make much sense.
On this page you can try playing against some of the computer models I trained and see statistics about their strategy.
The models above do not cheat, but they do constantly make use of all available information according to the digital game rules, including the cards in both discard piles, the cards in their deck (but not their order), and the (combined unordered) cards in your deck+hand. Hopefully you'll find it interesting or learn better strategies and ideas for your own games too! Note that the variance of Star Realms is very high, so a handful of games won't reveal your true playing strength. For example, hypothetically, if you're good enough to win exactly 60% of games against a specific ML model opponent, then you'll need to play at least 92 games to be confident (95% confident) that you're actually better. Fortunately, it's possible to finish a game quickly in just a few minutes (though you'll want to think longer to play your best).
I trained the models using a 2-million-parameter neural net architecture inspired by the original AlphaGo paper and later AlphaZero research. I built the training infrastructure with Codex, except for the game simulation logic, which I mostly wrote by hand. They are entirely trained on self-play, with zero human training or influence except for the ability to check for obvious game-winning moves within a single turn. The best model I trained, Level 5 (1283 ELO) is trained on 26 million self-play games and it beats me (1180 ELO) in around 64% of games (70% of the time when it goes first and 58% of the time when it goes second). For comparison, the "Hard AI" included in the official Star Realms digital game is 1000 ELO on this relative scale.
Completed games saved in this browser. Draws and unfinished games do not count as wins or losses. Charts run from earliest to latest decided game; error bars show 95% Wilson confidence intervals.
| Opponent | Wins | Losses | Draws | Win rate | Cumulative win % |
|---|
I analyzed game data from my best-performing model (Lv.5 in the opponent list above), to attempt to understand the strategies it had learned. Below are a series of interactive charts that answer questions like:
The charts show data from 10,000 self-play games, along with 95% confidence intervals for each datapoint. Negative action values mean that the model prefers taking no action (eg. not acquiring any card). Just because the charts imply a specific strategy, doesn't mean it's necessarily "correct", because my Level 5 model isn't perfect (for example, I don't think always scrapping explorers on turn 5 is correct). But if Level 5 is better than you, you might learn something helpful from the data below:
Some examples of the insights:
These are generalizations based on watching the model play thousands of games, and don't reflect the intricacies of its decisions in any particular situation.
Loading strategy charts…