So, I have played about 300 hours of Slay the Spire since I got it on July 26. It’s a turn-based deck building game. Many of these deck building games have interesting mathematics, so I have been devoting a fair amount of time to analyzing the game and writing about the game.
The most interesting theorem about the game is
D = h (( d – c b + w)/a + b/alpha)
where D is the total damage that you take, h is the total amount of damage that you give to the enemy, d is the average attack per turn from the enemy, c is the average number of cards you play per turn, b is the average block per blocking card played, w is the average amount of waisted block per turn, and alpha is the average attack for the attack cards you played.
The nice thing about the formula is that h, d, c, b, and alpha are often precisely known or easy to calculate. Also, a large portion of the reasonable strategies have w=0. If you know h,d,c,b, and w and they are constant, then the correct strategy is simple: if (d-c b + w) is positive, then don’t block. If it’s negative, then block a lot.
There are other analysis techniques that were mentioned in the Sept 27, 2020 reddit post “Simplified Spire Puzzles“. My favorite is looking at the ratio of damage received to damage given.
Also, I wrote a computer program that computes the best possible strategy for just about any Slay Spire combat situation. The drawback is that if you have over 20 cards and 10 different types of cards, the program needs about 10 terabytes of ram and 3 years of cpu time to computer the answer. It is much quicker if you have only 10 cards the are all strike or block cards in which case it takes less than one cpu second and only a few kilobytes of ram.
I have been wondering how to present this information to the world. Today, I showed the formula and my program to my friends Cat and Chuck who are both a) fans of Slay the Spire, and b) programmers. Additionally, I created about 10 power point slides and a 16 page document mostly describing simplified Slay the Spire problems and their solutions.
Additionally, I would like to document all the card combinations that result in either an infinite sequence of actions (resulting from hyperbolic growth) or another kind of growth. Growth in this game seems to be limited to quadratic (1 4 9 16 25…), cubic (1 8 27 64 125…), or exponential (1 2 4 8 16 32…). I have never seen any other kind of growth in any game except dominion which can have polynomial growth where the exponent is a fraction.
I don’t mind writing, but I do mind rewriting and combining my short essays into a larger, more useful work especially if no one is going to read it.