Random Generator

From TetrisWiki
Revision as of 08:33, 17 May 2007 by 200.118.2.165 (talk)
Jump to navigation Jump to search

cheap soma sprint ringtones soma online tracfone ringtones free punk ringtones free ericsson ringtones free mp3 ringtones prozac online hgh online nexium free nextel ringtones free sharp ringtones free free ringtones qwest ringtones funny ringtones free real ringtones hydrocodone online free cool ringtones tenuate online sildenafil online buy vicodin lortab online cheap propecia cheap hoodia free polyphonic ringtones online zoloft vicodin online nokia ringtones hoodia online cheap ultracet verizon ringtones free punk ringtones samsung ringtones free mp3 ringtones cheap cialis free mono ringtones motorola ringtones norco alltel ringtones free mp3 ringtones free nokia ringtones sprint ringtones diethylpropion online free tracfone ringtones nexium online ativan online sonyericsson ringtones diazepam online tramadol online prozac online meridia online cheap cyclobenzaprine online alprazolam paxil online free free ringtones qwest ringtones cheap zoloft levitra online paxil online cheap viagra cheap celexa nextel ringtones real ringtones real ringtones order hydrocodone cheap adipex cheap pharmacy online adipex online lipitor online tracfone ringtones cheap norco free cool ringtones free mono ringtones cheap levitra order carisoprodol online fioricet free music ringtones propecia propecia online cialis online cheap fioricet ultram online free nextel ringtones free funny ringtones zyban online tenuate online xenical online samsung ringtones online soma cheap hydrocodone soma online clonazepam online wwe ringtones ativan buy albuterol paxil online cheap lisinopril cheap diethylpropion tramadol online midi ringtones buy propecia hgh online free nokia ringtones ultracet online cheap carisoprodol didrex online order celexa free sharp ringtones cheap vicodin vicodin online free verizon ringtones lorazepam ambien online free cingular ringtones buy meridia cheap xanax cheap paxil free motorola ringtones rivotril online tramadol online free nokia ringtones cheap wellbutrin online clonazepam buy paxil lortab online online prozac cheap zyban lorazepam online buy propecia levitra buy ultram cheap ativan tracfone ringtones cheap adipex free mp3 ringtones funny ringtones cheap diazepam order carisoprodol fioricet online free sony ericsson ringtones cheap nexium samsung ringtones free cingular ringtones buy xenical verizon ringtones cheap xanax free real ringtones vicodin online meridia online buy alprazolam free ringtones ambien online meridia online free free ringtones wellbutrin tracfone ringtones cheap levitra music ringtones propecia nextel ringtones cheap klonopin lortab online adipex online buy cyclobenzaprine buy viagra order zanaflex buy zanaflex free tracfone ringtones cheap paxil cheap fioricet free sony ringtones soma online didrex online online ultracet sagem ringtones vicodin cheap ultracet didrex online lipitor online cheap phentermine cheap ativan sagem ringtones order norco free motorola ringtones cheap cialis cheap zoloft cheap xanax real ringtones cheap ambien cheap paxil levitra online buy diazepam alprazolam online cheap viagra nextel ringtones cheap clonazepam but hydrocodone buy adipex carisoprodol online phentermine online The Random Generator is BPS's name for the algorithm used to generate the sequence of tetrominoes in Tetris brand games that follow the Tetris Guideline.

Random Generator generates a sequence of all seven one-sided tetrominoes (I, J, L, O, S, T, Z) permuted randomly, as if they were drawn from a bag. Then it deals all seven tetrominoes to the piece sequence before generating another bag. There are 7!, or 5,040, permutations of seven elements, and it is believed that Tetris assigns a nearly equal probability to each of these, making it much less likely that the player will get an obscenely long run without a desired tetromino. It can produce a maximum of 12 tetrominoes between one I and the next I, and a run of S and Z tetrominoes is limited to a maximum of 4. Exception: In Random Generator as implemented in Tetris The Grand Master Ace, the first piece of the first bag is always I, J, L, or T, just as in the traditional TGM randomizer.

Despite the generic sounding name, presumed employees of BPS are known to treat the term "Random Generator" as a unique name, referring only to this particular algorithm.

Snake sequences

There are two "snake" tetrominoes, called S and Z. As only two snakes will be in a given bag, a sequence of more than two snakes must cross the "seam" between bags. The probability of the next two bags having a sequence of four consecutive snakes, the maximum possible, is 1/(7*6*7*6) for SZSZ and likewise for SZZS, ZSSZ, and ZSZS, for a total of 1/441. But the probability of these being your three next pieces are 1/441 times the probability of being at position 6 in a bag, so the probability of the next four pieces being SZSZ are 1 in 3087.

Define a "2|1 combo" as chosen sixth and seventh pieces in one bag and first piece in next bag, and a "1|2 combo" as chosen seventh piece in one bag and first and second pieces in next bag. Define a "snake" as the S tetromino or the Z tetromino.

The probability of any 2|1 combo (e.g. SZ|Z) is 1/(7*6*7) = 1/294. There are four different 2|1 combos containing all snakes (SZ|Z, SZ|S, ZS|Z, and ZS|S), so the probability of getting a 3-snake 2|1 in your next two bags is 4/294. But the probability of being at the sixth piece in a bag, where your next three pieces are a 2|1, is 1/7, making the probability of being at a three-snake 2|1 equal to 4/(294*7) = 2/1029. By symmetry, the 1|2 probabilities are exactly the same: 2/1029. So for Random Generator, this makes a 1 in 257 chance of your next three tetrominoes being snakes.

To do: compare with odds for TGM randomizer

References

See also