Shop OBEX P1 Docs P2 Docs Learn Events
Random/LFSR on P2 - Page 44 — Parallax Forums

Random/LFSR on P2

1414244464792

Comments

  • evanhevanh Posts: 15,916
    edited 2018-04-08 08:04
    Aw, calling it useless is going way overboard. Sure, choosing the MIT license would add certainty to his "public domain" intent, but intent is clearly there and that counts.

    EDIT: Actually, that CC link is correct, just that their HTTPS redirection isn't working. The new page is https://creativecommons.org/publicdomain/zero/1.0/

  • Heater.Heater. Posts: 21,230
    edited 2018-04-08 10:12
    Ah, that's better,
    The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
    As far as I know that is not even possible. I have been fishing around for something to show that it might any legal sense for years. Haven't found it yet.
    Of course the "to the extent allowed by law" hints that it's not actually possible in most of the world, which is backed up by other comments about "public domain" on the CC site.
    You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. See Other Information below.
    That sounds like a license. No need for all that public domain blather then.





  • evanhevanh Posts: 15,916
    edited 2018-04-08 10:26
    Again, it's a statement of intent. Note the bolded "dedicated". If you want the legalese version, you should be reading the further linked document. There you see why they bolded it.

  • Heater.Heater. Posts: 21,230
    evanh,

    I don't see any "dedicated" in bold anywhere.

    I have read that legalese a few times over the years. It still makes no sense to me.

    You cannot put a work into the public domain. Your copyright cannot be given to everybody (or nobody). You can transfer those rights to others. Someone may inherit them from you. Copyright remains in force till decades after you death.

    The best you can do is licence the thing such that people are free to use it even if you still have copyright, which you do, like it or not. Which is why there are so many open source licenses.

    Anyway, the intent is clear, I'm not worried. I just think it could be done better. For example, what happens when the author dies and his children come looking for royalties? The attached licence had better be clear.


  • evanhevanh Posts: 15,916
    Here's the source:
    <li class="license nolaw">
    <p id="nolaw-text" style="margin-bottom:1em;">
    The person who associated a work with this deed has <b>dedicated</b> the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
    </p>
    <p>
    You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. See <b>Other Information</b> below.
    </p>
    </li>
    
  • I think, only in the 'Common Law' World it's possible to put a work into the public domain. In the rest of the world not. So there is some risk as heater described. What is, if 'Sebastiano Vigna' does not have U.S. citizenship. Can he then put his work into public domain or not?
    The term "worldwide" may even invalidate the whole statement.
    Ask a lawyer specializing in copyright.
  • I hope this doesn't blow up into a mess. Wasn't my intent. A single sentence can put the matter to rest.

    Just a direct statement to Chip will suffice.

  • Heater.Heater. Posts: 21,230
    evanh,

    Oh that bold "dedicated" ? Sorry I missed it. Either my eyesight is giving out or my monitor or both.

    Make no difference. You can't just dedicate the law away willy nilly.
  • evanhevanh Posts: 15,916
    edited 2018-04-08 13:56
    The terms give the intent clear enough. The only way it would be challenged is on the basis of illegality. And on those grounds it also has fallback provisions.

    EDIT: Here's the logic as I see it: The default state is copyrighted. It can't be legally "public domain" until certain criteria are met.
    So, that license is defining CC0 as equivalent to public domain, with details of what that encompasses. The legalese version doesn't actually name it as public domain.

  • evanhevanh Posts: 15,916
    I remember someone telling me one day I couldn't use the term "cellphone" to talk about a cellphones because it is the name of a company. That one made me laugh pretty hard. The funniest part was he actually seemed to believe it.

  • TonyB_TonyB_ Posts: 2,179
    edited 2018-04-08 15:54
    I hope the public domain discussion has come to an end. FYI, Sebastiano Vigna is a professor of Computer Science at the University of Milan.
  • TonyB_ wrote: »
    Chip,

    Seba would like to mention in his forthcoming paper that the new xoroshiro128 algorithm is/will be in a processor. He asked me how to quote Parallax and the P2 correctly.

    How about:
    Parallax Propeller 2 microcontroller
  • cgraceycgracey Posts: 14,155
    TonyB_ wrote: »
    TonyB_ wrote: »
    Chip,

    Seba would like to mention in his forthcoming paper that the new xoroshiro128 algorithm is/will be in a processor. He asked me how to quote Parallax and the P2 correctly.

    How about:
    Parallax Propeller 2 microcontroller

    That would be perfect.
  • cgracey wrote: »
    TonyB_ wrote: »
    TonyB_ wrote: »
    Chip,

    Seba would like to mention in his forthcoming paper that the new xoroshiro128 algorithm is/will be in a processor. He asked me how to quote Parallax and the P2 correctly.

    How about:
    Parallax Propeller 2 microcontroller

    That would be perfect.

    Thanks, Chip.
  • evanhevanh Posts: 15,916
    evanh wrote: »
    TonyB_ wrote: »
    ... Also, is your new xoroshiro128 test still running?
    Currently three 128's running. Two are 32-bit sampling of original algorithm while the third is 8-bit, [7:0], sampling of the Prop2's algorithm.
    Smile, that's ruined. I woke up this morning to find I must have turned the computer off when going to bed. :( Turning everything off is totally a habit for me. I've almost done this in prior days too and had to stop myself.

    One was due to tick over to 8 TB maybe within minutes of the shutdown. The other two were due to tick over to 32 TB this morning.



  • jmgjmg Posts: 15,173
    evanh wrote: »
    Smile, that's ruined. I woke up this morning to find I must have turned the computer off when going to bed. :( Turning everything off is totally a habit for me. I've almost done this in prior days too and had to stop myself.
    One was due to tick over to 8 TB maybe within minutes of the shutdown. The other two were due to tick over to 32 TB this morning.

    On the plus side, you've saved a few cents worth of power ;)


  • TorTor Posts: 2,010
    I never turn computers off.. so some of mine have had years of uptime.
  • TonyB_TonyB_ Posts: 2,179
    edited 2018-04-09 00:03
    evanh wrote: »
    evanh wrote: »
    TonyB_ wrote: »
    Evan, is it worth trying the five 12-bit groups?
    ... These new scripts don't do the CPU load checking, so I have to be careful not to fire off too many test cases at once
      Xoroshiro32(16)++ PractRand Score Table.  PractRand v0.93 options: -multithreaded -te 1 -tf 2 -tlmin 1KB
    __________________________________________________________________________________________________________
                    Sampling apertures of the generator output, labelled as most to least bit-significance
      Candidate    ----------------------------------------------------------------------------------------
    [ A  B  C  D]  15:03 14:02 13:01 12:00    15:04 14:03 13:02 12:01 11:00
    ==========================================================================================================
    [ 5  2  6  9]     2G    4G    4G    4G     512M  512M  512M  512M    1G
    [ 6  2  5  9]     2G    2G    4G    2G     512M  512M  512M  512M  256M
    [14  2  7  5]     4G    4G    4G    2G     512M    1G    1G  512M  512M
    [14  2  7  6]     4G    4G    4G    4G     512M  512M  512M  512M  512M
    [15  4 12  9]     4G    8G   16G    4G       1G    1G    1G    1G    1G
    

    Thanks, Evan. [14,2,7,5] and [14,2,7,6] scores repeated below, in a different format.
        Bits           xoroshiro32++
    Total  Group  [14,2,7,5]  [14,2,7,6]
    
     16    15:0      256M        512M
    
     15    15:1        2G          4G
     15    14:0        4G          8G
    
     14    15:2        4G          2G
     14    14:1		  	 
     14    13:0        4G          2G
    
     13    15:3        4G          4G
     13    14:2        4G          4G
     13    13:1        4G          4G
     13    12:0        2G          4G
    
     12    15:4        512M      512M
     12    14:3        1G	     512M
     12    13:2        1G	     512M
     12    12:1        512M      512M
     12    11:0        512M      512M
    
      8    15:8        1G          2G
      8    14:7        1G          1G
      8    13:6        1G	     256M
      8    12:5        1G	     256M
      8    11:4        1G          2G
      8    10:3        1G	     512M
      8     9:2        1G	     512M
      8     8:1        1G	     512M
      8     7:0        1G	     512M
    

    EDIT:
    The 16 single-bit tests might be interesting.
  • TonyB_TonyB_ Posts: 2,179
    edited 2018-04-09 01:10
    Below are repeat frequency results for three PRNGs we've tested that have a 32-bit state:

    xoroshiro32+ [14,2,7]
    xoroshiro32+p [14,2,7] PRN[0] replaced by parity of PRN[16:0]
    xoroshiro32++ [14,2,7,8]

    The latter is the very worst xoroshiro32++ [14,2,7,d] quadruple and still does better than the two xoroshiro+.

    Actual values
    # a,  b,  c,  d, repeats,    f0,    f1,    f2,    f3,    f4,    f5,    f6,    f7,    f8,    f9,   f10
     14,  2,  7,  -,   65448, 20729, 28205, 13123,  2973,   455,    48,     3,     0,     0,     0,     0
     14,  2,  7,  p,   65509, 21890, 26596, 12982,  3413,   575,    72,     7,     0,     0,     0,     0
     14,  2,  7,  8,   65430, 26025, 22216, 11183,  4265,  1350,   371,    91,    29,     5,     1,     0
    #binomial, , , ,   65536, 24109, 24109, 12055,  4018,  1005,   201,    33,     5,     1,     0,     0
    

    Actual-Expected values
    # a,  b,  c,  d, repeats,    f0,    f1,    f2,    f3,    f4,    f5,    f6,    f7,    f8,    f9,   f10
     14,  2,  7,  -,     -88, -3380,  4096,  1068, -1045,  -550,  -153,   -30,    -5,    -1,     0,     0
     14,  2,  7,  p,     -27, -2219,  2487,   927,  -605,  -430,  -129,   -26,    -5,    -1,     0,     0
     14,  2,  7,  8,    -106,  1916, -1893,  -872,   247,   345,   170,    58,    24,     4,     1,     0
    

    Provided the state is small enough to test the full period, repeat frequency seems to be a good way of detecting poor-quality PRNGs. A proper random number tester should be used to select the best ones.
  • evanhevanh Posts: 15,916
    jmg wrote: »
    On the plus side, you've saved a few cents worth of power ;)
    Lol, it's more these days. I put solar PV on the roof a few years back - just when the power companies stopped offering a good deal. One of the things they took away was the half price on night rate electricity. :( If I was to disconnect the panels the night rate option comes back.

  • Cluso99Cluso99 Posts: 18,069
    Just changed my name to "Public Domain".
    Seems I have lots of new IP with which to gouge extort squeeze get $$$ from users ;)
  • Heater.Heater. Posts: 21,230
    Clusso99,

    Ha. I had the same idea last night!

  • That's hilarious!
  • potatoheadpotatohead Posts: 10,261
    edited 2018-04-09 12:45
    So all we need is one baller to take the name and participate in a legal trust, self funded by modest fees used to put things into the public domain. BAM! Instant public domain.

    Wash, rinse, repeat.

  • TonyB_TonyB_ Posts: 2,179
    edited 2018-04-28 19:14
    I had a look at Seba's prng discussion group today for the first time in a while. In the Clarification of equidistribution properties for Xorshift* and Xoroshiro+ topic, he says:
    Is it possible to say anything about how many 0's in a row that Xoroshiro128+ may produce?
    Mmmmm should be no more than 2, but good question.

    Now that got me thinking. I've tested repeated outputs and posted the results here, but they were for two successive outputs the same. This evening I looked for three successive outputs identical for xoroshiro32++ [14,2,7,x] and the results are as follows:
    Quadruple     Triple	Triple
    	       Runs	Output (~State)
    [14,2,7,0]	0
    [14,2,7,1]	1	31F4 (A65C60F9)
    [14,2,7,2]	1	BA2E (57034B5E)
    [14,2,7,3]	0	
    [14,2,7,4]	1	EB30 (09457C20)
    [14,2,7,5]	1	819F (CE46D69D)
    [14,2,7,6]	0
    [14,2,7,7]	1	AC28 (9CBA9F8E)
    [14,2,7,8]	1	EBD5 (8F59A05A)
    [14,2,7,9]	3	F14D (BFC9B467); 2AF3 (C125DE2B); C017 (103659DE)
    [14,2,7,10]	2	5331 (72D59C0F); A8FB (4C93ECF5)
    [14,2,7,11]	2	F8E2 (DDD8F8BC); 36BF (6E765418)
    [14,2,7,12]	0
    [14,2,7,13]	0
    [14,2,7,14]	0
    [14,2,7,15]	3	E245 (D4B65EFA); F5C8 (B1FA53AD); EB91 (63E1A74E)
    

    Thus [14,2,7,9] and [14,2,7,15] have three different outputs with triple runs. ~State is the state one iteration before the triple outputs (if PRN calculated before the new state), e.g. use seed CE46D69D to verify the triplicated 819F for [14,2,7,5] which could be done with the XORO32 instruction.

    Now, for XORO32 we switched recently from [14,2,7,6] to [14,2,7,5] and the former has no triplicates whereas the latter has one. In view of Seba's reply above, a zero result for this test should be better. I asked Seba for his thoughts and he said:
    I don't think it changes in any way the quality of the generator. However, if *all other parameters and tests give equivalent results*, you might want to pick a generator which does not have triples of identical outputs.

    Note however that this does not tell you anything of the equidistribution: if you want to measure what happens, you have to count how many times *each possible pair of 16-bit values* appears consecutively. In a 2-dimensionally equidistributed generator, all pairs should appear all exactly 1 time. You might count how many times each pair of values appears and use the maximum as a "figure of demerit". This is a much more precise process than counting repetitions.

    I think that xoroshiro32++ is only 1-dimensionally equidistributed but the pair test is something that we have never tried. My PC isn't up to the job as 4 Gbytes of RAM would be needed to record how often each 32-bit pair occurs during the full period, then it's simply a matter of finding the highest count. The frequency distribution might provide more information, i.e. how often pairs occur never, once, twice, etc.
  • Heater.Heater. Posts: 21,230
    edited 2018-04-28 03:22
    Cluso99,
    Just changed my name to "Public Domain".
    Seems I have lots of new IP with which to gouge extort squeeze get $$$ from users
    All your IP belongs to these guys: https://en.wikipedia.org/wiki/Public_Domain_(band)

    If only they had called themselves "The Public Domain".

  • kwinnkwinn Posts: 8,697
    Heater. wrote: »
    Cluso99,
    Just changed my name to "Public Domain".
    Seems I have lots of new IP with which to gouge extort squeeze get $$$ from users
    All your IP belongs to these guys: https://en.wikipedia.org/wiki/Public_Domain_(band)

    If only they had called themselves "The Public Domain".

    I would hope that if something like this ever got to court anywhere in the world the judge would be intelligent enough to throw it out. For some reason I feel that hope is optimistic.
  • Heater.Heater. Posts: 21,230
    Conversely, if such a crazy claim ever got to court, I would love it if some decrepit old judge somewhere ruled in favour of it.

    That might finally wake people up and the whole ridiculous copyright house of cards would collapse.

  • TonyB_TonyB_ Posts: 2,179
    edited 2018-04-28 20:26
    TonyB_ wrote: »
    I think that xoroshiro32++ is only 1-dimensionally equidistributed but the pair test is something that we have never tried. My PC isn't up to the job as 4 Gbytes of RAM would be needed to record how often each 32-bit pair occurs during the full period, then it's simply a matter of finding the highest count. The frequency distribution might provide more information, i.e. how often pairs occur never, once, twice, etc.

    I've tested xoroshiro16++ and the frequency distribution of 16-bit pairs is close to the binomial for the best quadruples, which confirms that xoroshiro++ is not 2-dimensionally equidistributed.

    Evan, could you do one more set of tests, of 32-bit pair frequency for xoroshiro32++ [14,2,7,x] when x=0 to 15? 4 GB of RAM must be zeroed first. One state iteration is required before there is a 32-bit pair, which is used as an address to increment a byte value. Each output provides the low word of one address and the high word of the next. The total number of pairs is the same as the period, 2^32-1.

    An array of 256 double words would be more than enough to store frequency values. After a full period, simply go through the entire 4 GB of RAM, using each byte value as an index to increment the corresponding 32-bit frequency value. A binary file containing the frequencies would be easy to interpret with the pre-existing program I have. Only frequencies f0-f15 are relevant, therefore the size of the file could be 16 (for x=0-15) * 16 (for f0-f15) * 32 bits = 1 KB.

    I predict very close agreement to binomial distributions for the best quadruples, in view of the repeat tests done already (just a special case of the pair tests) and the much larger sample size of 2^32 compared to 2^16. If I could do the pair tests myself I would.
  • Cluso99 wrote: »
    Just changed my name to "Public Domain".

    I just checked and thepublicdomain.com is available to be registered. It looks like publicdomain.com has been registered but is available for sale.

    Sandy
Sign In or Register to comment.