While us plebs are busy focusing on doing everything we can to to mash two 768's together, analytically minded folks on our forums are going hog wild deconstructing the algorithms powering the game of Threes! [$2.99]. I'm really not sure I've ever seen anything like it, at least not on our forums, but our Threes! thread has almost entirely shifted from discussing game strategies to straight up trying to figure out the inner workings of the game to accurately predict what the next cards the game gives you are going to be.

MAME creator Nicola Salmoria has even joined the party, building a Threes! AI simulator that allowed him to come to the following conclusion:

I would have to check some poor game in detail to see if the program made some obvious mistake, but my first impression is that these results prove that, even playing with a reasonably good strategy, the randomness of the game can frequently force an early defeat (or conversely that, even playing with a not so good strategy, the randomness allows to to achieve decent scores frequently).

Nicola goes on in a later post mentioning the scores his Threes AI was getting:

I made my AI play two real games yesterday, to verify that the simulation was working correctly. The AI scored 21,624 and 31,524, which is in accordance with what I expected. Actually even better, because the game doesn't yet show when a bonus card is coming next, and that makes a significant difference.

In other words, the Threes! playing AI he built can reliably score higher than most normal people playing the game. The rest of the same post also has some amazing insights, including the fact that the AI does things that a human player would think to be wrong, as it seemingly intentionally defers merging cards until there are a bunch to merge at once. Salmora provides this observation which could be helpful to humans playing Threes!:

If you have many cards ready to merge, it's as good as having empty spaces, because they don't block your moves. But you also have more control, because you delay the choice of which cards to merge.


Additionally, Threes! wizard kamikaze28 is still hot on the trail of figuring out how card drawing works and he believes he has cracked it. Here's the conclusions he's come to (but you really should read the whole post:

Apart from the obvious application of this knowledge, that is to keep track of the cards you draw to infer the current stack and predict future draws, one can draw some rules of thumb:

  • If there are four 1s (or 2s) on the board without their counterpart, you will draw them within the next 8 basic cards.
  • More generally: if the difference between the number of 1s and 2s on the board is 4, the next 4 to 8 draws of basic cards will reduce this difference back to 0.
  • Using the rules from above, you can anticipate the values of bonus cards. This will come in especially handy with the next update when the next card indicator will show a '+' when the next card is a bonus card.

From my point of view, this is a very well designed algorithm. It is simple yet it guarantees the necessary balance of 1s and 2s for the game to work and even if you go the extra mile and count your cards (without error), your ability to reliably predict cards beyond the next one is limited to the latter third of each stack.

In other related news, Threes! co-creator Asher Vollmer also stopped by the thread to mention what they're working on in their upcoming update: Tweaking upcoming card display, as well as the ability to skip signing your name at the end of every game along with a bunch of bug fixes and anti-score hacking stuff. Sounds awesome.

Let's just hope the Threes! AI doesn't become sentient. We're going to be in real trouble then.

  • LousyHero

    Im torn. This game actually looks amazing, and has received nothing but glowing reviews. Plus it just seems like a slick concept. However im not huge into puzzles or math for that matter, maybe i should just buy it anyway to see what all the fuss is about 😛

    • Kamikaze28

      Regarding the math part of your aversion: someone (I can't remember who or where) said something along the lines of "a 3-year old could play the game. The numbers aren't important. It is important to identify two identical cards that can merge. Even a martian who doesn't understand arabic numerals could play this!"

      I definitely agree. You don't need math skills to play Threes. It is a relaxing, Zen-like experience if you allow it to be.

      • LousyHero

        Yeah, I can see that the math involved is rather rudimentary at best. I meaning more along the lines that a puzzle game + math wasn't something

      • LousyHero

        Hit the post button on accident. I was more referring to the fact that normally a puzzle game with a math theme wouldn't appeal to me. It took puzzle quest to get me into any sort of match three, and that was mostly because of the rpg elements. However the presentation on this game is just so smooth that I actually find myself thinking about trying it. Really a testament to the devs laser focus in designing this game that, it even appeals to me at all. I can definitely see how it would have everyone practically obsessed in the forums if the insides of the game are as polished as the outside.

      • lavenders2

        Well yeah, of course a THREE year old can play this game!

    • Goggles789

      It's overall concept and presentation is amazing, but it's one of those games that made a great first impression but then lost it's charm after about the 10th play through. For me, I'm finding that a lot of mobile games just don't have the staying power they need.

      • Kamikaze28

        For me, the replayability of Threes is akin to Sudokus or other similar physical puzzles. Every game develops differently but the required skills of planning and organizing remain the same.
        On some days, you may just not be in the mood for Sudoku or Threes but other times you want to tickle your brain.

      • jclardy

        I bought it and played a ton (way more than ten rounds) and haven't played for about a week. But it is one of those games that you will randomly come back to, at least for me.

        But I would say that happens even with AAA games - I bought BF4 played for a few weeks and haven't touched it since. I think if you look at it from a price/entertainment time ratio they are quite close given the $60 price point of major games.

  • vicsark

    The Threes! forum thread is indeed incredible.
    Congrats to kamikaze28, Nicola Salmoria, y2kmp3 for those insightful posts, and the devs for interacting with the community 🙂 (and making an astonishing game! ;))

  • jclardy

    Maybe it is just me, but the deferred merging strategy became obvious after the first few rounds of playing. If you are only merging one for one you won't last long as there will come a time when you have empty space to fill, so lining up for double/triple merges is a key strategy.

    That said I still haven't scored as high as the AI 😀

    The next card insights are good as well, it seemed that there was some kind of order to it but it is hard to nail down.

    I am a bit burned out on the game though, I'm pretty sure I have already logged quite a few hours. Definitely worth the $2.99 price point if you are on the fence about it.

  • webman2k

    I'm very surprised there isn't a game called "fours" out now for free with ads.

    • mr_bez

      There's a 'Fives' on Android!

  • mr_bez

    "The rest of the same post also has some amazing insights, including the fact that the AI does things that a human player would think to be wrong, as it seemingly intentionally defers merging cards until there are a bunch to merge at once."

    My tip in the forum post which you quoted in your first tips article two weeks ago:

    "If you're in a tight spot, don't always go for large matches straight away. Try to line up moves where you can clear multiple tiles at once and give yourself some free space."

    Just sayin'! 🙂

    • godelescherbach

      It's one thing to have an intuition that happens to be correct, and another to build AI based on it that yields good results thus proving it to be correct. Just saying :p

      • mr_bez

        Yep. It's hardly an "amazing insight" that human players would think was wrong, though.

  • thiagovscoelho

    I actually like signing my name. It's just a simple press of "o.k.", and it allows easy changing of the name in case someone just played on my device. It really bugs me when other people play games on my devices and the high score is registered as mine.

    • godelescherbach

      I think the complaint concerns the games that don't have a score high enough to end up on your private leaderboard

      • thiagovscoelho

        I guess that's a good pont

  • Johan Bauer Gjestland

    Great game, but it really messes with my mind. After playing it my brain tends to try sliding everything like in the game. It started with webpages, but now I keep wanting to merge everything where there is open spaces. Am I alone in this? Reminds me of that tetris-movie where they would see tetraminos in the shower.

    • lifeat78

      I caught myself on the drive home from work looking at cars in front of me at the stop light wondering why they didn't merge together into one car...

      • Johan Bauer Gjestland

        Yes! That's what I'm talking about! It's very psychedelic, and a little disturbing... 🙂

    • thiagovscoelho

      You're probably one of the least eligible to complain about psychedelic/disturbing games that mess with your mind, after making Melodive; hehe

      • Johan Bauer Gjestland

        Hehe, true that, or you could say I have unique expertice! I get warm and fuzzy from Melodive, but just last night I was dreaming about matching stuff that didn't match. It just kept piling up, very disturbing. Great game though, I just wish it wasn't making such a big impact on my psyche. I think it's related to the brain tendency for pattern recognition.

      • thiagovscoelho

        Tetris effect.

  • godelescherbach

    There is a specific behavior of card-drawing algorithm which I am fairly sure of and was not featured in the analysis, i.e. when only one pair is matched, a new card is way more likely to show up in the row where the matching occurred. I've depended on this rule in my games and it found it very reliable & useful

    • Kamikaze28

      Okay, let me clarify. The question I answered in my guide is "*Which* cards will be next?" and not "*Where* will new cards arrive?".

      The current logic is that new cards can appear in any row/column where cards moved. If there is only one possible row/column for a new card to appear it will appear there. It is currently an open question how the row/column-selection works when there are more than one possibility. I suppose it is a random choice, others think there is some bias or logic at work.

  • nini

    I'm clearly playing wrong if AI can be programmed to get those scores, I haven't beaten my first play record of a pitiful 1,263.

    • Kamikaze28

      Keep on playing and learn to plan ahead. You'll get better in time 🙂

    • lifeat78

      As you start figuring out a few more strategies, you'll likely find yourself getting stuck on a different score tier (~3000) until something else clicks for you, and you get stuck on another tier for a while (~7500). At least, that's what happened for me.

  • thiagovscoelho

    I love it when games have such a searching fanbase like this. I hope this eventually gets as well-documented as Pokémon.

  • generic eric

    Fun game. We have been playing for weeks. The only thing that broke my wife's candy crush addiction.

    Do you like iOS games?
    Play Threes.
    Do you like to slide tiles up, down, left *and* right?
    Play Threes.
    Do you like to add numbers?
    Play Threes.
    Especially the numbers 1 and 2?
    Play Threes.
    Do you like to add other numbers?
    Play Threes.
    How about multiples of the number 3.

    Here is how you play. Slide the number 1 tile to the number 2 tile.
    Now you are playing Threes. You've made a number 3 tile.
    Slide it to another number 3 tile. You are playing Threes.
    You have a number 6 tile now. You know what to do.

    Play Threes.