# Randomizer Theory

Thread in 'Research & Development' started by colour_thief, 12 Jan 2007.

1. ### makalaka

I don't completely understand this

so explain to me how I got OOO at the beginning of one game

2. ### colour_thief

Digital's video and that CPU level 13 (human side) are definitely using 8-bag. The odds of any other randomizer matching up with that many pieces is astronomical.

I'd guess either you mis-remembered the OOO, or whatever you were playing used yet another randomizer.

3. ### caffeine

how does JIJJ say it's not another bag weaved between the bags? i'm lost.

4. ### colour_thief

Because no bag would have 3 Js in it? JIJJ is a sequence of 8th pieces.

Take a look at game #4, divide the pieces into groups of 8, and then delete one of every piece from each group of 8. What you're left with is the random 8th pieces. JIJJ were the 8th pieces for the first 4 consecutive bags of game 4, which is a sequence so hideous it can't be anything other than pure, memoryless piece selection.

5. ### caffeine

i must be missing something.
eight piece bags mean seven different pieces, plus one piece. so that would mean there will never be more than two of the same tetrominoes in any one bag. so JIJJ would mean you're ending one bag and going to the next. if that happened four times in a row, then it means no: every seven eight-bags, the eighth's are not a bag themselves. but is that what you meant?

6. ### colour_thief

I don't think I can make it clearer than this:

Sequence of pieces. From the start to the end of a match.

Code:
tojlijsztzlisjoilsztijjooisjjztljislozst
Bag-seperated sequence of pieces. By chance there is an 8-multiple number of pieces.
Code:
tojlijsz
tzlisjoi
lsztijjo
oisjjztl
jislozst
Making it really obvious which is the 8th piece in every bag...
Code:
--j--j--
---i---i
-----jj-
---jj---
--s---s-
Sequence of 8th pieces:
Code:
jijjs
If you don't now see how the sequence of 8th pieces is definitely not fed by it's own independent bag system, you're just not thinking about it enough.

7. ### Pineapple

No. J is the bonus piece in the first bag. I in the second bag, J in the 3rd bag, J in the 4th bag. That makes it somewhere between "very unlikely" and "impossible" that the bonus pieces are being generated from a bag.

8. ### makalaka

None of this makes sense. Why would they give the player an 8-bag randomizer, then give the CPU a different randomizer, and then have ANOTHER different one that allows OOO at the start? (luckily for you, I don't remember whether I got it when playing against the CPU, or in time attack mode.)

9. ### colour_thief

Well, you can look at it that way, but an overwhelming quantity of evidence supports 8-bag with 7-bag for the CPU. I'm not calling you a liar, and I strongly doubt they also included "9-bag" or something else in there somewhere. Maybe you witnessed a rare game bug? I don't know. For all intents and purposes your OOO never happened.

10. ### lee n

Did you get it right at the start, as in literally the first three pieces? .. or was it within the first 10 pieces or something?

11. ### tepplesLockjaw developer

It's likely that the first few pieces use a different randomizer to minimize unavoidable holds and soft drops without requiring the player to platform. TGM games are known to use a different randomizer for the first piece, with equal probability I, J, L, or T, for just this reason.

12. ### caffeine

oh okay, i got it.

i'll try to think harder next time.

13. ### Pineapple

We're not even sure if The New Tetris does use a memoryless randomizer. We suspect that it might do, but we don't know for sure...

14. ### Zaphod77Resident Misinformer

8 piece bag can give you the same piece 3 times in a row.

Maybe it starts with a random amount of the bag already dealt?

That could result in the OOO series.

this can be done on

piece 7,8,9

or

8.9.10

it's unlikely, but not quite as impossible as you'd think.

More calculations.

Odds of 2 of the same in a row.

For memoryless: 1/7

For 7 piece bag. 1/49 (1/7 on the first piece of the bag, if it's not bag 1)

Odds of getting a 4 snake series under 7 bag. 1/3087 (1/441 if you are at the right part in the bag, and 0 if not)

Here's a 7 piece bag variant that will be interesting to test.

Have a 1 in 7 chance to, instead of drawing the next peice from the bag, serve the same piece again. But at the start of a bag, if it matches the last piece of the previous bag, redraw.

That way, the odds of getting a repeat are exactly the same as memoryless, but otherwise it tends to an even distribution.

15. ### lee n

8 piece bag can give you the same piece 4 times in a row.

Also true.

17. ### Edoa.k.a. FSY

Okay, so tepples, you're assuming The New Tetris uses a memoryless randomizer, but am I right in saying that no one actually knows for sure? I mean, no one has ever investigated this, right? If that's the case, I wouldn't mind looking into it myself, it sounds quite interesting. I don't actually own The New Tetris, but I could play around with the square mode of Tetris Worlds for PS2.

18. ### colour_thief

The algorithm for Tetris Worlds square mode is known. It's:

I, O, J, L, T:

3/19 probability each.

S, Z:

2/19 probability each.

It's just random with skewed probabilities.

19. ### Pineapple

That doesn't tel the whole story, though. Tetris Worlds has 2 main ways of playing: Story mode and Arcade mode. Some of the 6 game modes differ between the two, and Square mode is one of them. (Note to anyone who has the game: the .tws files that start with M are the arcade mode versions)

In Story mode, it's 2/19 for S and Z and 3/19 for the others. In Arcade mode, it's 1/7 for all pieces.

As for TNT64, I have my suspicions that it's not traditional memoryless, but as I don't have an N64, I am unable to prove it...

Getting a few games transcribed would definitely help. Right now, we have just the one game transcribed, and that's Gilly's 868 video that's on YouTube.

Code:
sjozoojltlstszsliiizlojsojolszlittiititjozjtszzjjtillloozstzjisjizttstjjzliiltsojissloltisjlsjzlzoizotjoiltosiitzzjoolozsslztjss

===== Piece Counts =====
I: 18/128
Z: 18/128
S: 20/128
J: 18/128
L: 18/128
O: 18/128
T: 18/128

===== Interval Counts =====
Interval Size 24: Found 1/121, 0.008264
Interval Size 22: Found 1/121, 0.008264
Interval Size 21: Found 2/121, 0.016529
Interval Size 20: Found 1/121, 0.008264
Interval Size 16: Found 4/121, 0.033058
Interval Size 14: Found 4/121, 0.033058
Interval Size 13: Found 5/121, 0.041322
Interval Size 12: Found 6/121, 0.049587
Interval Size 11: Found 2/121, 0.016529
Interval Size 10: Found 10/121, 0.082645
Interval Size 9: Found 4/121, 0.033058
Interval Size 8: Found 4/121, 0.033058
Interval Size 7: Found 4/121, 0.033058
Interval Size 6: Found 10/121, 0.082645
Interval Size 5: Found 12/121, 0.099174
Interval Size 4: Found 5/121, 0.041322
Interval Size 3: Found 16/121, 0.132231
Interval Size 2: Found 11/121, 0.090909
Interval Size 1: Found 19/121, 0.157025
So far, the results are inconclusive...

20. ### colour_thief

Though I agree 128 pieces is inconclusive, I think this sample points towards it being true random.