Slay the Spire statistical analysis
Slay the Spire is a single-player strategy card game I enjoy. In it, you build a card deck to defeat successively harder enemies as you move up levels in the Spire.
I recently learned that they released a huge data dump of runs from real-world play.
The data set
It's huge. 380 gigabytes huge. 75 million+ runs from October 2018 to November 2020.
I am only analyzing the 2020 segment of the data. Reason 1: the devs have made some changes to the game over time - balance tweaks, removed relics, that kind of thing. Reason 2: the 4th character, Watcher, was introduced early in 2020.
The 2020 data is fully after Watcher was introduced. It is still 18 million runs, totaling 90 gigabytes of raw JSON. I dumped it into an sqlite database, and it's still 77GB. On my SSD, running a count()
query takes 6 minutes.
Reason 3: I don't need to deal with 4 times that.
Findings
Spire is hard. Out of the 18 million runs, there are 1.6 million victories, for an overall winrate of 9%.
Play speed
Which character plays the fastest? The slowest? Counting wins only,
Character | Avg. Time |
---|---|
Ironclad | 58:32 |
Silent | 1:09:11 |
Defect | 1:06:44 |
Watcher | 1:07:36 |
Interesting that Ironclad is so much faster, given the other 3 are so close.
The average win takes 64 minutes. The average loss takes 23. Well, of course if you stay alive longer, it takes... longer.
Spire has something called Ascension mode - extra levels of difficulty after you beat the game with each character. The game out of the box is Ascension 0. It goes up to Ascension 20.
We see that across the board from A1 to A20, runs between 60 and 80 minutes have the highest winrate. Notice the light line below the main cluster - that's Ascension 0.
This is putting the cart in front of the horse somewhat - it's not as if playing faster makes you better in a turn-based game. Rather, the easy wins tend to take around an hour, and the ones with maybe a narrower path to victory, requiring more planning and calculation, take longer.
Suppose you reach a particular floor, what are your chances of winning?
The discontinuities at floors 17 and 34 are due to the boss fights at the end of act 1 and 2 - if you beat the boss, you get some powerful rewards, and you're likely substantially better off than you were 1 floor ago.
Floors 50+ have some weird stuff going on - there's actually 4 different floors you can win on. One way is just beating the boss on floor 50. That accounts for the big spike on floor 51 - it's the "victory floor".
On Ascension 20, instead of fighting just one boss on floor 50, you fight another on floor 51, so floor 52 is the victory floor.
Once you unlock Ascension mode, you have the option throughout a run to collect 3 keys. If you do by the 50th floor, instead of winning the run then, you proceed to Act 4. On Ascensions 0-19, you end up fighting the Heart on floor 55. If you win, your victory floor is 56. If you fought two bosses (A20), your victory floor is 57.
Unfortunately, there isn't really a way to filter these out. A run isn't committed to Act 4 until you collect that last key, so it's possible to bail up until floor 49. A player may have been intending to collect all 3, but some bad luck or forgetfulness looks the same as someone who was just playing for floor 50 the whole way.
Deadliest Enemies
Which enemies are the toughest? Rather than just counting the number of kills by each one, let's take a look at how often they kill the hero.
Ironclad | Fatal% | Silent | Fatal% | Defect | Fatal% | Watcher | Fatal% | |||
---|---|---|---|---|---|---|---|---|---|---|
The Heart | 51.12% | The Heart | 47.64% | The Heart | 52.75% | The Heart | 51.96% | |||
Automaton | 35.87% | Time Eater | 35.98% | Awakened One | 33.22% | Time Eater | 33.14% | |||
Collector | 31.75% | Awakened One | 33.08% | Automaton | 28.13% | Awakened One | 27.71% | |||
Awakened One | 29.92% | Champ | 32.85% | Collector | 27.25% | Automaton | 24.19% | |||
Champ | 29.28% | Collector | 31.05% | Slaver and Parasite | 24.24% | Collector | 23.8% | |||
Hexaghost | 24.56% | Automaton | 30.79% | Champ | 23.95% | Champ | 20.67% | |||
Time Eater | 23.53% | Slime Boss | 30.65% | Time Eater | 23.67% | Donu and Deca | 19.9% | |||
The Guardian | 22.22% | Lagavulin Event | 19.31% | Slavers | 22.41% | Hexaghost | 19.69% | |||
Donu and Deca | 21.23% | Donu and Deca | 19.21% | Gremlin Leader | 22.09% | Slavers | 18.11% | |||
Slime Boss | 17.86% | Gremlin Leader | 17.62% | Book of Stabbing | 17.42% | Lagavulin Event | 18.04% | |||
Gremlin Leader | 16.84% | Slavers | 17.09% | Donu and Deca | 17.04% | The Guardian | 16.78% | |||
Lagavulin Event | 16.73% | Hexaghost | 17.07% | Hexaghost | 16.52% | Book of Stabbing | 14.62% | |||
Slavers | 16.16% | The Guardian | 14.77% | Masked Bandits | 15.44% | Gremlin Leader | 13.95% | |||
Book of Stabbing | 15.46% | Book of Stabbing | 12.89% | Slime Boss | 14.4% | Masked Bandits | 11.3% | |||
Slaver and Parasite | 15.06% | Gremlin Nob | 12.26% | Colosseum Nobs | 13.85% | 2 Orb Walkers | 11.07% |
The usual suspects are at the top - the Heart and act bosses are as deadly as you would guess, followed by a few elite fights. Seems crazy that Masked Bandits ends 10+% of Defect and Watcher runs!
That's enough for one round of analysis. If you find something cool in the dataset or have questions, let me know!