Candy Crush Solitaire Deconstruction & Experimenting with Auto-Level Generation
How can we auto-generate engaging levels by learning from data-driven deconstruction?
Welcome to my very first post on Substack!
After years of hands-on experience in game systems design, I've decided to share valuable insights with you in this blog!
Let’s start!
King finally launched its brand new tripeaks solitaire game, Candy Crush Solitaire globally. You'll be captivated from the first level, thanks to its smooth animations and cute graphics. Although I had the opportunity to test the game before the global launch, I waited for the official release to write this article and access the most recent version of it.
In this article, you will find 3 main topics:
Deconstruction - I tried to keep it as brief as possible and supported my findings with the data I recorded. You will discover the game mechanics and how they work.
Data Analysis - In this section, I explain how and why I collected the data, as well as how I processed it to extract information. You'll also find key concepts to help you better understand the charts.
Auto-Level Generation - How can we auto-generate levels using just a few configurations? This section is dedicated to level generation experiments based on constrained randomization.
FTUE & Tutorials
Candy Crush Solitaire has a smooth FTUE, supported by a classic approach with bubble tutorials that teach players how to match cards, assuming they've never played tripeaks solitaire before. Obstacles are not introduced until level 22, unlike match3 games like Royal Match, which introduce them from the first level.
The game directly starts at level 1 after the Terms of Service and notification permission popups, and it never interrupts gameplay in the early levels if the player follows the desired path. If the player waits or makes a wrong move, a bubble or feedback animation plays instantly to guide the player back onto the correct path.
Before diving into the details of the systems, it's best to introduce the interactive elements in the game. I’ve included a short introduction section defining the related UI elements to make the rest of the article easier for the reader to follow.
Keep in mind that any game mechanic mentioned in this article is always defined in detail in later sections. Thus, keep reading!
Definitions of Game Elements
As a well-known mechanic in the puzzle genre, players can select boosters at the beginning of the level. There are currently 2 pre-level boosters. The last one is marked as “coming soon”.
The game includes all the classic elements of a tripeaks solitaire, in addition to obstacles, power-ups, streak meter, in-level boosters, level rewards and hold slot.
Core Loop
I always like to define the core loops as a nonremovable / unchangeable loop of the game, so that we can identify the fundamental structure that engages players. In this scenario, level progression is defined as the core loop that also feeds meta layers of the game, as in the core loop diagram.
Players must spend coins or one ticket per level to enter. Using pre-level boosters is optional unless the win streak mechanic is active. The main goal is to clear the board completely by collecting all cards on the tableau. Successfully completing a level rewards the player with coins and other currencies used in meta layers. In case of failure, the player must retry the level to progress. Finally, there is no way to replay the same level after a successful completion.
Meta Loops
1. Postcard Progression
Postcard progression is the first meta loop introduced to players. Although the fast progression on the first postcards creates short-term engagement, it mainly aims for long-term engagement. Completing levels awards players with energy, which is used to decorate the postcard with new scene objects. When a postcard is completed, next one becomes available.
In the first 100 levels, there are 6 postcards:
Waikiki Beach (Hawaii, USA)
Eiffel Tower (Paris, France)
Central Park (New York, USA)
Higashiyama District (Kyoto, Japan)
Swiss Alps (Altdorf, Switzerland)
Pyramids of Giza (Giza, Egypt)
Although the postcards look pretty good and the animations are decent, the progression doesn't initially feel satisfying because the changes on the postcard are subtle, and it is already filled with colorful objects. However, after the postcard is completed, the final animation showcasing the entire progression is very satisfying as shown in the video above.
2. Weekly Challenge
Weekly Challenge becomes available after level 5. It is a competition based social feature where players compete on a leaderboard to reach the top 3 before the week ends. It creates a mid-term engagement from the very early stage of the game. Players collect stars by completing levels, and those who successfully fill the streak meter are rewarded with additional stars, that provides a competitive advantage. Top 3 players are rewarded with various prizes, including coins, boosters, deck parts, and card packs.
3. Card Deck (Skin) Progression
Deck parts can be obtained through progression in other meta layers to unlock new deck skins. It targets players who have already enjoyed the game and want to customize their gameplay experience. This feature becomes available after level 9.
4. Cotton Candy Clouds Event
Cotton Candy Clouds is a time-limited, milestone-based event that resets progression and refreshes rewards after a certain period. I also encountered a name change from “Cotton Candy Clouds” to “Bubble Gum Parade”. Players are supposed to collect a card of a specific color (event currency) to reach each threshold. Each milestone completion rewards players with different prizes. It becomes available after level 12.
5. Album Progression
A collectible album mechanic drives long-term engagement thanks to the satisfaction of finding new items and achieving milestones. Collection card packs can be found in levels marked as including a pack. Additionally, other meta layers also provide some card packs as rewards. Each new album is unlocked at a certain level. Completing an album gives a grand reward, while reaching a milestone by collecting a specific number of cards provides a small coin reward. It becomes available from level 28.


6. Chocolate Hunt Event
Chocolate Hunt is a time-limited event that becomes available after level 46. Each successful level completion rewards the player with spoons, which are used to break the chocolate and reveal candies. When the candy box is ready, a reward is given, and the next box becomes available with a larger chocolate bar. Each stage requires more spoons to complete.
7. Salmon Race Event
Salmon Race is an optional, time-limited, competitive event introduced after level 50. Although it was available before the global launch of Candy Crush Solitaire, I haven’t bumped into it again since then, probably because of an ongoing A/B test. Max 4 players with same skill level are grouped to compete in each race. Players must complete 4 consecutive levels without losing before others to obtain stage rewards and unlock the next race with better prizes.


8. Tug of Cards Event
Tug of Cards is an optional, time-limited, competitive event introduced after level 75. There are 2 teams, each consisting of 20 players, competing against each other to collect the card type (event currency) decided by the team leads in order to defeat the opponent. The team with the higher score at the end of the event wins and receives the grand prize. Additionally, players within the same team also compete against one another to rank up and earn more rewards, even if their team loses.
Other Meta Mechanics
1. Offline (Idle) Earning
At the end of the level 4, an offline rewarding mechanic, typically seen in idle games, is introduced. This mechanic rewards players with coins every 4 hours. Unlike in most idle games, time continues to count even when players are online. If we assume players are inactive for 8 hours of sleep, they would need to return to the game 5 times to claim the reward, resulting in an increased number of sessions. The same mechanic is also used in Solitaire Grand Harvest by Playtika, as shown in the video below.
2. Daily Gifts
Daily Gifts mechanic becomes available after level 6. Player must log in the game everyday in order to collect the daily reward. If the player misses a day, the reward for that day cannot be obtained later. When the player reaches day 7, a top reward is granted.
3. Piggy Bank


Piggy Bank becomes available after level 25. When it is completely filled, it gives players a chance to buy it before it disappears in 15 levels. If the player doesn’t purchase it on time, it disappears but leaves a free ticket.
4. Season Pass
Season Pass becomes available after level 54. Level completions reward the player with candies, which are used to progress through it. There are both premium and free tiers, as shown in the image.
5. Bonus Gift
A wheel of fortune mechanic allows players to win bonus rewards daily.
Boosters
As we’ve come to expect from Candy Crush Saga, Candy Crush Solitaire is no exception when it comes to the super smooth, juicy booster animations that are a signature of King.
Despite being a different genre, Candy Crush Solitaire also features boosters from its elder sibling, such as the Fish (Wild), Lollipop Hammer, Colour Bomb and Flying Saucer, while maintaining similar mechanics.
1. 5-Extra Cards
When you run out of stockpile cards, there is a running A/B test you can encounter:
Test group: 5-Extra Cards booster is automatically triggered. While this makes the gameplay smoother by reducing distractions, it also creates an unnecessary sink for coins. In most cases, other boosters like Wild and Hammer are more useful than 5-Extra Cards, but players may not have enough coins after the auto-triggering. This has the potential to encourage players to visit the shop more often, leading to more IAPs. However, it is also clear that it can be annoying until players realize that the extra cards are not free.
Control group: 5-Extra Cards booster is optional to activate.
Even if the control group wins (we’ll see), there can be a player-controlled setting that allows players to enable or disable the auto-triggering of this booster, letting them decide how they want to play the game.
2. Undo
Undo booster relies on inattention when matching cards, which can be caused by color similarities, card rotation, and more, depending on the level design. When the hold slot is introduced, a new strategy emerges that requires players' attention, leading to more optimal moves to consider. Missing the best move often encourages players to use Undo booster more.
3. Fish (Wild)
You can use the Fish (Wild) booster to collect any card from the board, ideally to create a consecutive match chain.
4. Colour Bomb
Specifically, the Colour Bomb booster’s effectiveness and how satisfying it feels depend heavily on the level's visual structure and luck (since it is placed randomly in the deck), which can quickly lead to disappointment. On the other hand, for a level with a high number of open cards, it’s very effective, as shown in the video.
5. Lollipop Hammer
The Lollipop Hammer booster removes any card you choose from the board or hold slot, making it especially useful when you don’t have enough stockpile cards to reveal certain blocker removers, such as keys.
6. Flying Saucer (UFO)
Flying Saucer booster is always activated at the beginning of the level and removes 3 random cards from the initial board. Based on the data collected, all levels, except bonus levels (where boosters cannot be used), have at least 3 consecutive matches from the board, with an average of 9.5 cards collected consecutively. This means that unless the initial open cards on the board are specifically chosen not to match with the waste pile card, the Flying Saucer may not be as effective as desired (but let’s accept that it has a cool animation, so why not use it?).
Power-ups & Obstacles
Here is the list of power-ups and obstacles used in the first 95 levels:
1. Extra Card
An Extra Card adds additional cards to the deck (stockpile) based on the number written on it.
2. Key & Locked Cards
A locked card locks a group of cards and requires a key card to unlock.
3. Conveyor Card
There are 2 types of conveyor cards: up and down. They increase or decrease their count after each move. Using the hold slot doesn’t count as a move.
4. Candy Necklace Card Couple
Linked cards with a Candy Necklace can only be collected together.
5. Chocolate Card
Chocolate Card requires a card of the same suit to be cleared in order to be revealed.
Hold Slot
In level 11, the hold slot game mechanic is introduced, allowing players to set aside the top card of the waste pile when needed. In the best-case scenario, this mechanic doubles the chance of matching a waste pile card with a board card compared to the classic approach.
The hold slot requires more attention and also encourages the use of the undo booster. It adds more strategic depth and increases enjoyment by allowing for more consecutive card clearance from the board.
After getting used to the hold slot, other tripeaks solitaire games feel a bit sluggish in gameplay compared to Candy Crush Solitaire. I expect more upcoming games to incorporate a hold slot, and it’s highly likely we’ll see it introduced in existing games, at least as part of a special event with custom levels.
Special Level Types
1. Bonus Levels
Bonus levels feature a red, casino-like table with coins scattered around, creating a luxurious, premium atmosphere. These levels are essentially the same as other levels, except there's no way to fail. They are also part of the main progression, so they cannot be skipped. As expected, no currency is required to play them. Other mechanics, such as the streak meter, pre-level, and in-level boosters, are also unavailable. Additionally, there are no blockers or power-ups. There are 4 bonus levels until level 101.
Although they don’t seem very lucrative compared to regular levels at first glance while playing, after including the level cost, only about 7.4% of regular levels are more profitable than an average bonus level based on the data collected.
2. Hard Levels
Hard levels are treated as part of the regular levels in this article, because there are no additional or missing mechanics, as seen in bonus levels. In the first 95 levels, there are 12 hard levels in total, and 6 of them are marked as super hard level.
Purple color choice and skeleton pattern of the board create a cute villain atmosphere, which reminds me of the Witch character from Clash Mini by Supercell.

Interestingly, there were other non-hard levels that were actually harder than these levels. However, when we look at the overall picture, hard levels (including super hard levels) are more difficult than the other regular levels on average. Here are some statistics that make it easier for you to understand:
Comparison of the average consecutiveness (max: 1, min 0) - A higher ratio means that more board cards can be collected consecutively before a new card is needed from the stockpile. 1 means that all board cards can be collected in a chain, while 0 means that each board card requires a new stockpile card.
Hard Levels: 0.54
Non-hard regular levels: 0.63
Comparison of the average match probability of the stockpile cards (max: 1, min 0) - 1 means that any stockpile card opened will always match with a card on the board, while 0 means it will never match with a board card:
Hard Levels: 0.47
Non-hard regular levels: 0.56
Comparison of the average number of booster uses (including all types of boosters):
Hard Levels: 2.6
Non-hard regular levels: 1.6
Candy Crush Solitaire also offers a Hard Level Kit offer just before super hard levels, as shown in the image above. It is a level specific pack, and it seems quite stingy in terms of content, as players are expected to use all in this level.
Other Mechanics
1. Streak Meter
As is common in the tripeaks solitaire genre, streaks are also part of the levels, encouraging players to collect more cards consecutively by rewarding them. Although there are additional rules, such as collecting same color cards or collecting one red and one black card in a specific order, which double the rewards (coins, extra cards, and wild cards), simply collecting any numeric card without using the stockpile is also enough. After each successful streak, the next one begins with a higher requirement, which is expected to encourage players to use more boosters.
2. Win Streak
When the Win Streak is active, additional boosters are automatically added to level. It means that booster use is not optional, and so it makes levels easier to complete. Win Streak aims to increase playtime while also boosting number of sessions because of the time-limited nature of the mechanic.
3. Loss Aversion Popup
When a player wants to quit the game without completing a level, a loss aversion popup appears, showing the rewards the player will lose, something commonly seen in many other games, regardless of the genre.
Data Collection Methodology
All statistics provided in this article were generated from data collected between Feb 6 and 8. The app version was 1.0.21, the platform was Android. The game was downloaded from Play Store TR. It should also be noted that there were ongoing A/B tests, as mentioned in the sections above, and it is highly possible that level configurations were also segmented. Thus, the collected data may not represent all groups.
The goal was to investigate how level difficulty is affected by level configurations that have a direct impact on the consecutive matching of cards, as well as how the hold slot affects the overall gameplay experience. This data was also used in the section about auto-level generation, which I believe is essential for level designers.
The data was collected from the first 95 levels. Although the target was 100 levels initially, level 95 was the first time I didn’t have enough coins and in-level boosters to complete the level, so I finalized the data collection there in order to stay within the time limits I decided at the beginning.
The following table displays the first 10 rows of the collected data. The first 8 columns are level configurations, while the other columns are derived from playing levels and so completely subjective.
I followed the rules below while playing the levels:
Do not use any pre-level boosters unless it is part of the tutorial, or due to the Win Streaks mechanic.
If there is no way to pass the level without using boosters:
If there is enough coins, choose 5-Extra Cards over Wild and Hammer boosters.
If there aren't enough coins but Wild or Hammer boosters are available, use Wild first, then Hammer if needed.
If there are neither enough coins nor enough in-level boosters to pass the level, quit level and try again later (which is happened at level 95).
Try to collect cards consecutively as much as possible by creating the longest chains:
Use the hold slot as much as needed.
If more than one card matches the waste pile card, choose the one that forms the longest consecutive matches on the board.
Use Undo if a better move is missed by mistake.
Important Concepts
I believe that some clear definitions are necessary to understand the information I extracted from the data before we discuss the charts. While it is not possible to cover everything in just one article, here is the concepts which I believe you should have an idea.
1. Consecutiveness of the Board Cards
How can we measure the fun of a tripeaks solitaire level? What’s the most engaging action a player can repeat that stimulates their positive emotions? It is obviously collecting cards consecutively, which is also the reason why the Wild card exists: to continue collecting cards without breaking the chain!
Consecutiveness of the board cards basically gives insight about how many cards can be collected from the board consecutively in the best-case scenario in any state.
As seen in the image above, collecting “K, Q, J, 10, 9, 8” respectively is the best solution we can achieve. We can say that number of consecutive matches is 5 for this example, because we are able to collect 5 more cards after collecting the “K”.
If we generalize the calculation and clamp it between 0 and 1, so that we can compare different levels:
where c is the consecutiveness variable, N_collected is the number of collected consecutive cards and i represents the state of the level. We can easily calculate the average consecutiveness by using this formula. However, it is not practical enough, because it requires recording all states. Here is another approach I used in this article to calculate the average consecutiveness:
where c_avg is the average consecutiveness variable of given level, N_board is the number of board cards, N_groups is the number of consecutively collected groups and N_hold is the number of times the hold slot is used.
Although this will be the topic of another post, this formula essentially measures the the ratio of matched connections based on the total number of connections (when we assume all cards can be collected consecutively) between board cards. Keep in mind that N_board doesn’t include blockers, such as Locked Cards, which cannot be collected.
2. Match Probability of the Stockpile (Deck) Cards
As we discussed, consecutiveness is the number one factor driving engagement for a player. However, without matching with a waste pile card, there is no way to play the game.
Match probability of the stockpile cards is a good way to measure how likely a match is to occur with a board card. If you watch the video above, 10 stockpile cards are drawn, and only 2 of them match a board card. Thus, we can say that the match probability is 0.2 for this stockpile. If we generalize the calculation:
where p_stockpile is the match probability of the stockpile, N_match is the number of matches and N_drawn is the number of stockpile cards drawn.
It is independent from hold slot use.
3. Effect of the Hold Slot Use
As discussed in the “Hold Slot” section, hold slot use doubles the matching probability of waste pile card in the best scenario. In the video, the match probability of stockpile is given as 0.2. However, using the hold slot doubles the chance for the waste pile card, allowing the player to collect 4 cards instead of 2 from the board.
Charts
I tried to avoid using boosters as much as possible except for the 5-Extra Cards booster, as shown in the chart. I used 50 5-Extra Cards, 12 Undo, 4 pre-level and 18 Wild and Hammer boosters in total.
As seen in the above chart, the total coins earned across levels are always higher than the total coins spent. It is obvious that coins obtained from level completions are not sufficient to progress without coin rewards coming from meta layers. However, I can say that there are no paywalls in the first 95 levels, and IAPs are not mandatory to progress. Keep in mind that although I failed the first time at level 95 it was not because I didn’t have any boosters. The reason was that I was avoiding using pre-level boosters (which I had 25 of them) to measure the level difficulties, and I didn't have enough coins to use any in-level boosters.

In this chart, calculated values represents the required amount of stockpile cards to complete the level without using any boosters. Calculated (Max) shows how many of them is needed if players doesn’t use the hold slot, and Calculated (Min) represents the minimum number required in best-case scenario when the hold slot is used. Drawn indicates how many cards are drawn from the stockpile to complete the levels. Initially Given is the number of stockpile cards given at the beginning of the level.
It seems that in the first 20 levels, the initially given stockpile cards are more than enough. For the remaining groups, it fluctuates between “nearly enough” and “not enough”, which makes booster use mandatory.
If you didn’t notice, although the Drawn cards are supported by the hold slot, they are much closer to the Calculated (Max) rather than the Calculated (Min). The main reason is that the number of hold slot uses is directly affected by the consecutiveness of the board.
The best-case scenario for the hold slot would require an additional matching card on the board each time a waste pile card is matched and held, but this is not always possible.

Auto-Level Generation
Until now, we have discussed different concepts that affect the difficulty of the levels, which is directly related to how much players will enjoy a level. In addition to what we've discussed, there are other elements that typically affect engagement, such as
the average number of initial cards opened during gameplay
the placement of power-ups and blockers
the custom arrangement of cards to create a deterministic path when necessary
visual aesthetics of card placement
etc.
These elements are already in my pocket to discuss in upcoming articles. However, in this section, we will focus solely on consecutiveness and match probability based on constrained randomization to experiment with auto-level generation.
1. Constrained Randomization
When we talk about randomness, we’re assuming a non-deterministic result, even though it will eventually converge to the expected result. As commonly given as an example, think about tossing a coin in a completely isolated environment. We can assume that heads will eventually come up 50% of the time in total, although we cannot predict how many times we should toss the coin to get this result.
Constrained randomization provides a solution to ensure that the probability of an outcome occurs within a given number of experiments. For example, if we decide to toss the coin twice, it guarantees 1 heads and 1 tails, while still keeping the randomness of the order.
If we come back to auto-level generation, I use constrained randomness for consecutiveness algorithm. The easiest way to apply constrained randomness is to define a group (block) size and occurrence value. For example, if there are 20 board cards, and the group size is set to 5 with 1 match per group:
4 groups are observed.
There are 4 ways to place matching cards within a group (M: matching U: unmatching and 2 matching cards create 1 match):
[M M U U U]
[U M M U U]
[U U M M U]
[U U U M M]
Note that I'm not interested with card types here, only the placement. Although it is possible to calculate the number of ways using combinations for this simple example, increasing the number of matching cards introduces extra steps to consider.
While additional rules can be defined to limit the max number of consecutive matching cards in a group, the underlying logic remains the same. In addition to this, we could also consider the number of matching cards instead of the number of matches, which are fundamentally different. However, I decided to use the number of matches in this article.
2. Auto-Generated Level Examples
In this section, the algorithm automatically decides the next revealing cards. This ensures that consecutiveness and match probability remain unaffected regardless of the player's strategy. Thus, the level designer can directly manipulate the cards and even create better solution paths without needing to worry about whether the level will be too easy or too hard.
Example: 1
Total number of cards: 24
Hold slot use: Not Allowed
Consecutiveness (board cards):
Group size: 2
Number of matches per group: 0
Match probability (stockpile cards):
Group size: 1
Number of matching cards per group: 1
As shown in the video, a total of 24 stockpile cards are drawn as expected. Since the consecutiveness is zero, each board card requires 1 new stockpile card.
Example: 2
Total number of cards: 24
Hold slot use: Allowed
Consecutiveness (board cards):
Group size: 2
Number of matches per group: 0
Match probability (stockpile cards):
Group size: 1
Number of matching cards per group: 1
Hold use is allowed this time, and the rest of the configurations are the same as in Example 1. If we calculate the max and min number of stockpile cards required, we can see it should be between 24 and 12. If you watch the video, you'll notice that it's actually 15 and hold slot use is 9.
Example: 3
Total number of cards: 24
Hold slot use: Not Allowed
Consecutiveness (board cards):
Group size: 6
Number of matches per group: 2
Match probability (stockpile cards):
Group size: 1
Number of matching cards per group: 1
The total number of stockpile cards drawn is 18, while the calculated value is 16, but they are close enough.
Example: 4
Total number of cards: 24
Hold slot use: Allowed
Consecutiveness (board cards):
Group size: 6
Number of matches per group: 2
Match probability (stockpile cards):
Group size: 1
Number of matching cards per group: 1
In this example, I kept the same configurations as in Example 3, but allowed the use of the hold slot. In total, the hold slot was used 6 times, and the total number of stockpile cards drawn is 9, which is very close to the minimum calculated value of 8.
So, that’s all folks! I think that’s enough for this post. We covered a lot of game mechanics, statistics, and finally explored how we could auto-generate levels. I hope you enjoyed!
See you next time!