Difference between revisions of "Random Generator"

From TetrisWiki
Jump to navigation Jump to search
*>DIGITAL
Line 1: Line 1:
The '''Random Generator''' is BPS's name for the algorithm used to generate the sequence of [[tetromino]]es in ''Tetris'' brand [[game]]s that follow the [[Tetris Guideline]].
+
The '''Random Generator''' is BPS's name for the algorithm used to generate the [http://www.touch2008.com.cn 工控机]
 +
[http://www.hyhxsm.cn 茅台酒]
 +
[http://www.bjybjy.cn 二锅头]
 +
[http://www.p-pass.com 防伪标签]
 +
[http://www.mmxxy.com 热转印机]
 +
[http://www.mmxxy.com 水晶像]
 +
[http://www.chuxinrui.cn 奖杯]
 +
[http://www.china-union.com.cn 干洗]
 +
[http://www.bjypjy.com 数码快印]
 +
[http://www.bjxzby.cn 硒鼓加粉]
 +
[http://www.jfart.com 塑料颗粒机]
 +
[http://www.p-pass.com 防伪]
 +
[http://www.p-pass.com 防伪技术]
 +
[http://www.zgczj.com.cn 高新技术企业认定]
 +
[http://www.wanli888.com 北京洗衣公司]
 +
[http://www.bjzhjt.com 服务器机柜]
 +
[http://www.sj-air.com 空气净化工程]
 +
[http://www.bjqqt.cn 国际速递]
 +
[http://www.bjqqt.cn 国际快递公司]
 +
[http://www.bjqqt.cn 国际快递]
 +
[http://www.dubaotiju.com 梯具]
 +
[http://www.zkyj.com 节能节电]
 +
[http://www.sijing.com 冬令营]
 +
[http://www.010qj.com.cn 石材翻新]
 +
[http://www.bjzhiyuan.com 电器维修]
 +
[http://www.china6888.com 北京公司注册]
 +
[http://www.shbingluo.com 制冰机]
 +
[http://www.bjyzcx.com 电脑回收]
 +
[http://www.bjyspw.cn 代开发票]
 +
[http://www.bzbql.cn 不干胶]
 +
[http://wanlidabj.com 机打发票]
 +
[http://www.keslon.com 电缆桥架]
 +
[http://www.cnlfyh.com 电缆桥架]
 +
[http://www.huojia699.cn 北京货架]
 +
[http://www.cargoserv.com.cn 航空货运]
 +
[http://www.cnghf.cn 会议服务]
 +
[http://www.wangyangedu.com 小升初]
 +
[http://huikeda.china.mainone.com 梅兰日兰UPS]
 +
[http://www.en400.com 口语]
 +
[http://www.hzst.net.cn Dell服务器]
 +
[http://www.jfart.com 再生塑料颗粒机]
 +
[http://www.cbyxgs.cn 灯光音响]
 +
[http://www.bjyzcx.com 二手电脑回收]
 +
[http://www.bjjds.cn 热水器维修]
 +
[http://www.tdqm.cn 环氧地坪]
 +
[http://www.szjlit.com/IBM.html IBM服务器] 
 +
[http://www.china6888.com 工商注册]
 +
[http://www.bjxrbh.com/page02.htm IBM服务器]
 +
[http://www.bjyuantuo.cn 北京航空货运]
 +
[http://www.bjofficebl.com 北京写字楼]
 +
[http://www.bvu.com.cn 动画制作]
 +
 
 +
sequence of [[tetromino]]es in ''Tetris'' brand [[game]]s 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 [http://en.wikipedia.org/wiki/Factorial 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.
 
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 [http://en.wikipedia.org/wiki/Factorial 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.

Revision as of 07:56, 4 January 2008

The Random Generator is BPS's name for the algorithm used to generate the 工控机 茅台酒 二锅头 防伪标签 热转印机 水晶像 奖杯 干洗 数码快印 硒鼓加粉 塑料颗粒机 防伪 防伪技术 高新技术企业认定 北京洗衣公司 服务器机柜 空气净化工程 国际速递 国际快递公司 国际快递 梯具 节能节电 冬令营 石材翻新 电器维修 北京公司注册 制冰机 电脑回收 代开发票 不干胶 机打发票 电缆桥架 电缆桥架 北京货架 航空货运 会议服务 小升初 梅兰日兰UPS 口语 Dell服务器 再生塑料颗粒机 灯光音响 二手电脑回收 热水器维修 环氧地坪 IBM服务器 工商注册 IBM服务器 北京航空货运 北京写字楼 动画制作

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.

While the number of tetrominoes in a single bag is usually 7, some games use a different number. The public beta of Tetris Online (Japan) used an 8-bag randomizer for the player. Not all guideline-compliant games use the Random Generator in all modes. Tetris Worlds and Tetris Green, for instance, use a different randomizer in their Square modes, and TGM3 uses the TGM randomizer even when the game is set to "World" mode.

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