Probability of getting a specific Tetris piece given previous pieces I'm doing a small reinforcement learning project involving Tetris, just for fun.
Considering that each piece has a constant probability of being selected, how can I calculate the probability of receiving a specified next piece, given the record of the previous spawned pieces? (maybe the piece sequence is not independent as I'm using computer-generated random numbers?)
My idea is simple:  I would like to 'watch' the 'S', 'Z' and 'I' pieces distributions and somehow incorporate those numbers on the players policy, because are key pieces, so i think it would make a difference on the average performance.
Any ideas on how I can incorporate the variables?
Thanks!
 A: Here is an answer to the question as stated (as of writing):

Considering that each piece has a constant probability of being selected, how can I calculate the probability of receiving a specified next piece, given the record of the previous spawned pieces? 

Your best guess regarding the probability is simply the observed probability up to that point (i.e. the proportions of previously spawned pieces represented by each piece). Since you assume it is constant, it should converge to the true value as you get more data.
If you are concerned about oscillations and extreme estimates at the beginning of the game (when you don't have much data), you could perhaps consider some sort of Bayesian approach.
At the same time, the ideas about dependency, balancing out, etc. you expressed in the comments and other parts of the question contradict this problem statement as they would imply that the probability to get a given piece is not constant. If that's the case, anything is possible and you would need to be more specific about what you are willing to assume and what you are looking for.
