Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Grabbed the strategy from this article (http://www.kotaku.com.au/2014/02/tips-for-playing-threes-the...)! Basically there is a deck of 12 cards (four 1's, four 2's, four 3's) that is shuffled, drawn from, and reshuffled when the deck is empty. Originally I just had it populate randomly from the same distribution, but it resulted in a startlingly high frequency of terrible boards with like 10 red tiles floating around and no blues.

As mentioned in an earlier comment and in the article, the actual iOS game also inserts higher-number cards (6, 12, 24, ...) into the stack occasionally, though I haven't added that element to this version yet.



That's a good pointer, thanks. I've been thinking about building a simulator to help qualify Threes strategies. In more advanced games, higher-number "next" cards are somewhat critical. When you do add them, I'd love to hear how you did it!


I've been doing the same thing!

I believe the higher numbers work like this: every 21 turns, Threes generates a number from 0-20. After this number of turns elapses, if the highest number seen is 48 or greater, Threes skips drawing from the normal set of ones, twos, and threes, and instead generates a "special spawn". The special spawn is a number between 6 and <highest number seen> / 8 (I believe the distribution is uniform).

Source: Threes writes a preference plist that allows it to resume games if the app is killed in the background. The keys to look at are "PseudoSpawnSpecialIndex" and "PseudoSpawnSpecialList".


Funny, I've been doing the same thing. The hardest (well, most tedious) part has been figuring out the exact distributions used for the various random parameters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: