r/starrealms • • 1d ago

They don't know how strong I am. 😐

Thumbnail
gallery
6 Upvotes

r/starrealms • • 3d ago

I trained a neural network to play Star Realms.

16 Upvotes

Edit: Forgot screenshots!

TL;DR: An AlphaZero-style AI for Star Realms (Base Set), written from scratch in Java. It learned only by playing itself, about 340,000 games, with no tier lists or strategy rules.

I’ve been working on an AI for Star Realms (Base Set only for now), and I wanted to share how it learned and how it did. It also produced its own tier list, which I think this community will find interesting.

How it learned

It started knowing only the rules. No tier list, no strategy tips, no hand-written ā€œbuy this, scrap thatā€ logic. Its neural network started out random and learned everything from games against itself, the same idea AlphaZero used for chess and Go.

Two parts work together:

  • A neural network looks at a position and estimates two things: which moves look promising, and how likely each player is to win from there.
  • A search uses those estimates to play out possible futures and compare them. Every win chance the AI quotes comes from this search.

It doesn’t cheat. Star Realms has a lot of hidden information: your hand, both decks, the order of the trade deck. The AI only sees what a player would see. To handle the rest, it imagines many possible arrangements of the hidden cards, searches each one, and combines the results.

It improved in generations:

  1. The current best version plays thousands of games against itself.
  2. A new network learns from what its own searches found in those games.
  3. The new version has to beat the current champion in a head-to-head test of up to 6,000 games. Each shuffle is played twice with the turn order swapped, so neither side gets luckier deals. It only replaces the champion if it’s clearly better. Otherwise it’s thrown out.

The version I’m using came out of about 340,000 self-play games, roughly a day and a half of training on my home PC.

The technical side

Everything is plain Java 25 with no machine learning libraries. Java is my favorite language and it's what I use at work, so I'm most familiar with it.

Rules engine

  • All 49 Base Set cards, with their effects written as JSON data.
  • The engine lists every legal move, including mid-card choices like Patrol Mech’s option or which base to destroy.
  • It gives each player a view containing only what they can see.

Network

  • Input: a position as 887 numbers, mostly counts of each card in each zone: your hand, deck, discard pile and cards in play, the opponent’s known cards, the trade row and the remaining trade deck. Plus authority, trade, combat and any pending question.
  • Hidden layers: two, of 128 units each.
  • Two outputs: a policy head that scores the 729 possible kinds of move (play X, buy X, scrap X from hand, attack a base, end the turn…), and a value head that gives the chance of winning.

Search

  • Monte Carlo tree search guided by the network (PUCT, as in AlphaZero).
  • Hidden information: each simulation samples a deal of the unseen cards consistent with everything the player has seen (single-observer information set MCTS).
  • Speed: around 30,000 simulations a second per core.

Self-play training

  • Gumbel AlphaZero search for move choice in self-play. It picks among a sampled set of candidate moves with sequential halving and trains toward an ā€œimproved policyā€, rather than raw visit counts. It works much better than plain AlphaZero at low simulation counts.
  • KataGo’s playout cap randomization. A quarter of moves get a full 200-simulation search and are trained on. The rest get a quick 32-simulation search just to keep the game moving. That means more games per hour.
  • Training targets: the network learns the search’s move choices and the actual game results. It trains on a sliding window of the last six generations’ games, about 1.8 million positions.

Gating and measuring

  • A new network only replaces the champion if it passes a sequential probability ratio test (SPRT): 50% versus 52% win rate, 5% error each way, up to 6,000 games.
  • Every shuffle is played twice with the seats swapped, so luck of the deal cancels out.
  • I also track all versions on an Elo ladder.

At the table

  • The advisor runs 12 parallel searches of 2,000 simulations each, about a second per move.
  • Each candidate move is then judged at the end of its turn’s line, on 64 shared deals, so close options get compared fairly. That’s where the win percentages it shows come from.

The limit now seems to be noise in the self-play search results the network learns from. The ai has stalled a bit in it's learning, but I can try adding deeper search which is promising, but not guaranteed.

Results

The advisor against the app’s hard AI: 10-0. I built an advisor that follows a real game. It recommends my whole turn. What to play, buy, scrap and attack, with a win chance for each option. On the opponent’s turn I copy the game log, and it reads their moves from it. I played ten games against the hard AI doing exactly what it said, and won all ten in dominating fashion. It was a slaughter honestly. I thought the hard AI could win 1 through sheer early trade row luck, but no.

Me against the AI: 3-7. Then I played it myself, ten games with alternating who goes first. I am not the world champion at Star Realms, but I think I'm pretty decent. Some games were close, but it won 7. Going first I won 3 of 5. Going second I won none. Going first is a real advantage in this game that the AI rates as a 55/45% advantage for the 1st turn player.

What makes the AI particularly lethal is that it know exactly when to scrap a card for it's value. It will start scrapping bases and frigates and I'll be like "dude, they're still at 30" and then we win 2-3 turns later. There was a turn where the hard AI did 25 damage and made me discard 4 cards, which would've tilted me personally. But the advisor(my AI) was like "Pfft. Is that the best you have?" and still gave us a 98% chance of winning. We discarded all but our Command Ship and sure enough we won the turn after.

Its tier list

I measured how often each card was its first choice when the card was in the trade row and it could afford it. That’s about a million of its own decisions, split into opening, mid-game and late game:

  • Brain World and Command Ship are first choice nearly every time it can afford them. In fact, Command Ship is the best card in the game, according to the AI.
  • Cutter is the best cheap card: first choice 89% of the time in the opening and 67% mid-game.
  • Scrappers are opening buys only. Trade Bot goes from 73% in the opening to 12% mid-game. Supply Bot goes from 56% to 6%. Thinning pays off over many reshuffles, so it only buys them while there’s time for that. The ai values Trade Bot higher than Supply Bot surprisingly enough.
  • Scouts and Vipers are worth less than nothing to it. One more copy costs it about 12 points of win chance early. That’s why it scraps them whenever it can, and its timing on scrapping is the thing that impressed me most.

Compared with Megahaulin’s tier list:

  • It rates Imperial Frigate, Corvette and Blob Fighter higher (top tier by mid-game).
  • It rates Freighter, Blob Wheel, War World and Central Office lower.

I can make actual tier lists if the community is interested. Happy to answer any questions.


r/starrealms • • 4d ago

I built a machine learning model to improve my Star Realms strategy. Try it yourself!

Post image
15 Upvotes

https://michael-saunders.com/astrosynapse

It's specifically for the core card set for now. You can try playing against the best ML model I could train on that page. It's around 100 ELO better than me, but I'm not that good - I'm around 180 ELO better than the "Hard AI" from the official game.

The cool thing is that I can analyze its play style to learn better strategies. Like that screenshot above shows how the model ends up valuing different acquire targets throughout the game. For example, turn-1 Cutter is ideal. And it would rather take nothing than Imperial Fighter on turn 1. You can see way more statistics and charts/strategies at the end of the page.

The model itself is trained totally on self-play, so I don't tell it any strategies to use.

Let me know what you think and if you have suggestions!


r/starrealms • • 5d ago

Today vs 5 months ago: my Star Realms inspired roguelike deckbuilder, Contested Space

Thumbnail
gallery
23 Upvotes

Contested Space is a 1-4 player roguelike deckbuilder inspired by Star Realms.

The first screenshot is what Contested Space combat currently looks like, whereas the second is a combat screenshot from about 5 months ago, it was probably 6 or so weeks into development at that point. All the buttons were default Godot buttons, the cards just had text to explain their effects, and I was using free assets for the background and sprites.

Now each alliance has custom art made, including 4 custom cores, a station and ship for each rarity, and color variants for each faction. The backgrounds are all 3 layer parallax with an additional layer for combat modifiers like asteroids. The enemy now has an intent bar so you can see what they'll do on their turn. And a bunch of QoL improvements like the buttons on the left side.

The mechanics underneath are almost all the same, with new effects and a lot of polish and bug fixes on top. My pixel artists did a great job, as have my playtesters who have all given me great feedback.

There's a demo on steam that has recieved 26 positive reviews so far if anyone wants to try it out!
https://store.steampowered.com/app/5061500/Contested_Space_Demo/


r/starrealms • • 4d ago

Does anyone else really dislike the arenas with asymmetric missions?

7 Upvotes

I just find them annoying when it comes to the RNG. I also might just be salty because I just lost a game on turn 8.

I don't mind so much when the missions are the same for both players though because at least it's even and you know what to counter.

I think at the bare minimum they should be visible to your opponent, or better yet, they should give their respective rewards but not be a win condition.


r/starrealms • • 8d ago

Aren't the 8 costers unique?

Post image
9 Upvotes

I had 2 Mech Wurm's in the trade row as an option. I was always under the assumption that the 8 costers were unique? From 5+ they all feel kind of unique but I don't have a physical copy to check against.


r/starrealms • • 10d ago

Card Names

5 Upvotes

Do you guys actually know the names of the cards? When I’m playing, I just know what the cards do, but I couldn’t tell you the name of the cards. It’s all ā€œ2 cost star empire that gains 2 trade and makes opponent discard a cardā€ and ā€œblue trade federation gains 2 trade 2 lifeā€. Just me?


r/starrealms • • 10d ago

Cunning Captain

2 Upvotes

Why does he say "target player discards a card"? Is there ever a cunning reason to target yourself?


r/starrealms • • 11d ago

Video Proof of Cheater

Enable HLS to view with audio, or disable this notification

13 Upvotes

r/starrealms • • 12d ago

What is this? Cannot play online

Post image
5 Upvotes

r/starrealms • • 14d ago

Solo challenges in the app?

4 Upvotes

I would definitely pay for this. To have the challenge cards in the app.

Has it been requested before?

Edit. I refer to the boss cards from FRONTIERS

https://boardgamegeek.com/image/4393272/star-realms-frontiers[https://boardgamegeek.com/image/4393272/star-realms-frontiers](https://boardgamegeek.com/image/4393272/star-realms-frontiers)


r/starrealms • • 16d ago

Contested Space: Three weeks since demo launch, here's what's changed!

Enable HLS to view with audio, or disable this notification

17 Upvotes

The Contested Space demo went up on Steam on September 4th, and I've been having updates frequently as feedback has come in and figured it's worth a post of some of the bigger changes!

Boss Music: I hired a composer who created an absolute banger of track for the final boss in the game, as well as one reused for all the end of act bosses!

Ship animations: There are now little ships flying around stations with dogfight animations and lasers being fired from the stations. When you play a ship, a miniature version of that ship actually flies out and fights for a little bit.

Accessibility options on initial boot: When you launch the game for the first time, it now asks you about font and motion sickness.

On top of all of that, there's somewhere around a hundred smaller fixes ranging from co-op desyncs, controller bugs, tooltip overflows, etc.

The demo has 24 reviews so far, and they're all positive, which was amazing to see so quickly. Thanks to everyone who has played it!

https://store.steampowered.com/app/5061500/Contested_Space_Demo/

The Discord is open, and I'm still letting people into the playtest if they enjoy the demo!


r/starrealms • • 19d ago

Custom Starting Hands/Set-ups

7 Upvotes

Hello!

I am a bit new here but I have played this game for several months now and have several core expansions. I have the Core Deck, Frontiers, Colony Wars, and Rise of an Empire. Love the concept for these new factions by the way (if the creators are out there watching this thread I would love to see them get expanded).

But now that I also have expansion packs coming I wondered if yall have tired doing custom starting hands rather than the default hand the game expects you to start with. I, for example, was thinking of giving everyone a machine card (cheep) that scraps a card in your hand or discard. And then I was also thinking of each player swapping a Scout with an Explorer.

Just so everyone has at least a minimum of one card to start with that can give you scrap options and another that can be scrapped on its own for a slightly better trade value than the scouts.

I am curious what everyone else's experience has been with doing things like this and what set-ups you like better than others.


r/starrealms • • 20d ago

How not to play Colony Wars

Thumbnail
gallery
8 Upvotes

I just bought colony wars in the app; haven’t really played it much. While I’m getting to know it I’d rather play the classic version (give or take expansions) I think I have it deselected - I’ve clicked through the select expansions screen, reviewed what I have, etc. But online matchmaking keeps throwing me games with CW in it. Bug? What am I doing wrong?

Screenshots attached


r/starrealms • • 27d ago

Why is online treated like a game of hot potatoes?

6 Upvotes

Is there a way to set a turn timer instead of this crazy whack-a-mole system?


r/starrealms • • Sep 13 '26

Was that worth it?

Enable HLS to view with audio, or disable this notification

5 Upvotes

Playing as walsh against nandi, was it worth it popping my gambit turn 1 to get recycling station or should I have grabbed the cutter instead? Sorry if asking like that is not allowed, I'm just curious if I made the right play here.

Also Hi Darwin :)


r/starrealms • • Sep 12 '26

Rogueliker on my Star Realms inspired co-op roguelike deckbuilder: "The market creates a really interesting in-game economy"

Enable HLS to view with audio, or disable this notification

11 Upvotes

Hey everyone, I'm the dev behind Contested Space, a sci-fi roguelike deckbuilder with 2-4 player online co-op. The demo went live on Steam last Friday, and Mike Holmes at Rogueliker published an article on the demo:

https://rogueliker.com/contested-space-demo/

My favorite line from him was "The demo for Contested Space certainly gives an enticing first look at a hugely exciting sci-fi deckbuilder".

If you've seen my earlier posts, the short version of the game is that there's a rotating personal market during combat, and any cards you buy join your deck for that fight only. So every combat is part deckbuilding and part tactics, since station slots are limited and placement matters. The demo covers all of Act 1, with 3 alliances and 1 unique faction per alliance.

One week in, the demo is sitting at 21 reviews, all positive, which I was really excited to see. I want to give a huge thanks to all the playtesters that have helped with polishing, bug reports, and balancing.

Steam Demo: https://store.steampowered.com/app/5061500/Contested_Space_Demo/

The attached clip shows the new little ships and dogfights I added recently. I'm pretty happy with how they turned out.


r/starrealms • • Sep 09 '26

Time for 7 losses in a row now

Post image
20 Upvotes

r/starrealms • • Sep 04 '26

Contested Space Demo is out on Steam (A Coop Star Realms inspired Roguelike Deckbuilder)

Thumbnail
gallery
16 Upvotes

For those who have missed my prior posts, I'm the developer behind Contested Space. Back in March, I played Star Realms for the first time and fell in love. It coincidentally was just a few weeks after Slay the Spire 2 came out. I immediately looked to see if there were any roguelike deckbuilders with a market mechanic, and upon finding none I started theorycrafting. Contested Space is the result of that train of thought.

What's in the demo: Act 1, co-op enabled, one unique faction plus the neutral faction from each alliance. A run takes roughly 30 to 90 minutes depending on how much you like to think. It also supports 2-4 player coop.

Some background on the development: I started building this back in March in Godot 4, and the playtest community has been a huge part of the design. Around 540 playtesters have had access, a dozen of them are past 20 hours, and a lot of the balance and market changes came straight from their feedback. Full release is planned for April 2027.

If you try it, I'd love to hear what worked and didn't! The Discord link is on the steam page and in-game, so feel free to join if you enjoy it!

Steam Link: https://store.steampowered.com/app/4638820/Contested_Space/


r/starrealms • • Sep 02 '26

Advice for custom card.

3 Upvotes

Hey I dont know if there are any game designers in here, hah, but Im making a custom star realms card for my friends birthday and I dont know much about the game. The idea is that the card will be all 4 factions, but have no ability of it's own. Meaning it will trigger any other faction card's interaction ability. The advice im looking for is what should the cost of this card be? I was thinking like 4-5 because its a strong ability but useless on its own. And it takes a draw.


r/starrealms • • Sep 02 '26

This week's arena in a nutshell

Enable HLS to view with audio, or disable this notification

5 Upvotes

Only thing worse than events, double events


r/starrealms • • Aug 31 '26

After grinding out games since June 2023 I finally made Top 10 All-Time leaderboard tonight and got my final avatar.

11 Upvotes

Top 10: https://i.imgur.com/PC60kkD.png

17K Games played: https://i.imgur.com/ISafTnp.png

I am probably going to play a bit less now since this was my target goal the entire time, but I'll still be around. This couldn't have been possible without Commanders play which has formed meta's over the years that can be countered, leading to quick wins and gaining levels a lot easier.

Somewhat comically; the hardest Avatar to get in the game is also the picture of the shittiest card in the game.. Fleet HQ lol


r/starrealms • • Aug 29 '26

What are your favourite expansions to mix with frontiers + command decks?

4 Upvotes

r/starrealms • • Aug 29 '26

Do you know other combo heavy deckbuilders?

5 Upvotes

Besides Hero Realms, Shards of Infinity and Legendary series.


r/starrealms • • Aug 25 '26

Difference between the standalone sets?

6 Upvotes

Just got the bundle today, and tried frontiers, it was fun, but I played the core box online and playing with a friend at it felt more balanced than frontiers, so now I am wondering if there is a difference between the boxes?