Which random generator does TGM3 use?

Thread in 'Discussion' started by JoshuaD, 5 Jul 2007.

  1. JoshuaD

    JoshuaD Unregistered

    I'm reading over the Wiki and implementing the various block generation systems for my clone.


    I'm pretty sure that TGM3 just uses TGM2's generator, but I wanted to check in here for confirmation.


    Thanks guys.
     
  2. JoshuaD

    JoshuaD Unregistered

    Thanks kotetsu.


    I currently have these generators implemented. While I'm working on this, are there any others that you guys would like to see?


    • Completely Random
    • TGM1
    • TGM2
    • CustomTGM - You can specify number of tries and initial history
    • Tetris Guidelines
    • TGMAce - Guidelines Generator with first block = {L, J, T, I}
    • N-Bag Generator - works for any value > 0
    • Behaved Bag Generator - N-Bag Generator with first block = {L, J, T I}

    Anything else out there? Give me your archaic generator with some specs and I'll implement it. Thanks.
     
  3. Bastet?
     
  4. K

    K

  5. Additionally, it is suggested by some that you don't use the Mersenne Twister, because it has a considerable time increase every 25th number generated. I am not sure how correct this is, though.


    If you are going to have a replay system, you will need a PRNG that is repeatable. You will be adviced to not do what Doom did, though, which had a table of 256 random numbers that it uses. Certain numbers don't appear, and the distribution is notably pseudorandom.
     
  6. tepples

    tepples Lockjaw developer

    Ah, the well-known ANSI C settings for a linear congruential generator. I'm assuming that it then does ROLL = SEED % 7.

    Lockjaw also uses a LCG, with the BCPL formula that, according to the LCG page, produces a better spectral test result:
    Code:
    p->seed = p->seed * 2147001325 + 715136305;
     

Share This Page