randomizer stats + comparison

Thread in 'Research & Development' started by rain, 3 May 2017.

  1. So I started a little Python code suite for testing and comparing randomizers. It can also serve as a collection of reference implementations. It doesn't aim for perfect PRNG accuracy (using Python's random module is fine), but if the generator is known, it is included (such as for TAP).


    TGM1 is missing, and there are a lot of improvements to be made, but I wanted to get it out here in case anyone else wanted to help or use it. (More randomizers? More/different metrics? HTML output? Graphs? Randomizer tester in pygame?)

    - added accurate TI randomizer thanks to DrPete and zid
    - added TGM1 randomizer
    - added test game in pygame (roughly TAP mechanics)
    Last edited: 4 May 2017
    colour_thief and DrPete like this.
  2. Dude! I wrote this like a year ago, same sort of thing I think:


    FYI it was my first python program so might not be the best but hopefully it's simple enough. At a glance some features I have that might be interesting to you:
    • More than just droughts, calculates conditional entropy
    • Card Captor Sakura randomizer
    • GameBoy randomizer (including DIV register and bitwise biases)
    • TOJ randomizer
    • The New Tetris randomizer (aka 63-bag)
    We should like collaborate or something?
  3. Oh nice ! Will definitely pull those in. TOJ is just bag + a random extra piece? That's kind of funny. Is this just to throw off the playing forever algo?

    Yeah I'm thinking this might turn into a kind of dump of Tetrisy data -- e.g., I already added ARS position data. Could have scripts that format it for different languages or otherwise output something useful. Will probably put my MAME verification stuff in there too. Aim to make the test game a sort of clone reference implementation. Feature creep or best idea??
  4. It's a misleading name maybe because TOJ dropped that algo after beta. But during the beta it gave the CPU 7-bag while the player got a weird 8-bag. I don't think it was to throw off playing forever. I assume the motivation was monetising the game, with pay/grind to win for 7-bag.

    What's your verification stuff? Sounds interesting.
  5. The idea is to have a simple replay format with extra information (field state, active piece, etc.) which can be output from a clone and fed into MAME with a lua script, and automatically verified for accuracy. It needs work but a lot of the basics are done.

Share This Page