Re: Random algorithm

2008-11-18 Thread François Chaplais
Le 13 nov. 08 à 19:35, Randall Reetz a écrit : Thank you Francois, Can statistics be rigorously derived from proability math? I hope so. yes, that is the "clean" way, which is, by the way, the best suited for academic teaching. Both are heavily dependent on what appears to be statistics (

Re: Random algorithm

2008-11-17 Thread Richard Gaskin
Dave Cragg wrote: On 17 Nov 2008, at 16:04, Richard Gaskin wrote: Dave Cragg wrote: ... > The two scripts measure the number of repeated sequences that are > generated by the two methods. The first method has yet to produce a > repeated sequence here. ... > METHOD 1 (no resetting) Bingo. Th

Re: Random algorithm

2008-11-17 Thread Dave Cragg
On 17 Nov 2008, at 16:04, Richard Gaskin wrote: Dave Cragg wrote: ... > The two scripts measure the number of repeated sequences that are > generated by the two methods. The first method has yet to produce a > repeated sequence here. ... > METHOD 1 (no resetting) Bingo. The psuedo-random alg

Re: Random algorithm

2008-11-17 Thread Richard Gaskin
Dave Cragg wrote: ... > The two scripts measure the number of repeated sequences that are > generated by the two methods. The first method has yet to produce a > repeated sequence here. ... > METHOD 1 (no resetting) Bingo. The psuedo-random algo used in Rev is pretty good as it is. -- Richard

RE: Random algorithm

2008-11-15 Thread Randall Reetz
This is good detextive work. Good science. I think richard has found out how long the truncated ticks number is that rev uses as a seed. -Original Message- From: "Dave Cragg" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: 11/15/2008 12:55 AM Subject:

Re: Random algorithm

2008-11-15 Thread Jacques Hausser
Interesting demonstration ! If I'm not wrong, the probablity to get twice the same sequence with the first method is about 6.25E-32 for "really random" numbers (equiprobability for each number from 1 to 1000), what's a quite satisfying zero for dirty statisticians ! Jacques Le 15 nov. 200

Re: Random algorithm

2008-11-15 Thread Dave Cragg
On 13 Nov 2008, at 19:38, Richard Gaskin wrote: So unless I'm missing something obvious (and it certainly wouldn't be the first time), beginning with a fresh seed as Rev does and then resetting it each time during the session seems a fair way to avoid discernible reproducible patterns for

Re: Random algorithm

2008-11-14 Thread Mark Wieder
Richard- Thursday, November 13, 2008, 11:38:35 AM, you wrote: > True, and I've used this to my advantage in some modest encryption > algorithms to arrive at non-obvious but reproducible patterns. In my world of software testing it is also quite advantageous to be able to craft "random" data stre

Re: Random algorithm

2008-11-14 Thread Richard Gaskin
Dave Cragg wrote: On 13 Nov 2008, at 19:38, Richard Gaskin wrote: Fortunately, it doesn't. Rev sets the randomSeed to some non-fixed number (a truncated portion of the milliseconds?) each time it starts. This implies that each session starts with a unique seed, so each sequence derived f

Re: Random algorithm

2008-11-13 Thread Dave Cragg
On 13 Nov 2008, at 19:38, Richard Gaskin wrote: Fortunately, it doesn't. Rev sets the randomSeed to some non-fixed number (a truncated portion of the milliseconds?) each time it starts. This implies that each session starts with a unique seed, so each sequence derived from it will be simi

Re: Random algorithm

2008-11-13 Thread Dave Cragg
On 13 Nov 2008, at 19:50, Malte Brill wrote: Somewhat related :) http://web.archive.org/web/20011027002011/http://dilbert.com/comics/dilbert/archive/images/dilbert2001182781025.gif http://xkcd.com/221/ Love them!! Dave ___ use-revolution mailing

Re: Random algorithm

2008-11-13 Thread Malte Brill
> It looks like the limit is 2^31 -- 2147483648 Thanks for testing that Dave! Somewhat related :) http://web.archive.org/web/20011027002011/http://dilbert.com/comics/dilbert/archive/images/dilbert2001182781025.gif http://xkcd.com/221/ Cheers, Malte __

Re: Random algorithm

2008-11-13 Thread Richard Gaskin
Jan Schenkel wrote: > --- Richard Gaskin wrote: >> >>set the randomSeed to random(4570422) >> >> It would seem that resetting the randomSeed each >> time you use the random function would only have >> a 1-in-4,570,422 chance of getting the same seed >> as the previous run, no? > > If you set

RE: Random algorithm

2008-11-13 Thread Randall Reetz
ssage- From: "Eric Chatonet" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: 11/13/2008 9:51 AM Subject: Re: Random algorithm Bonsoir François, Great post indeed :-) I fully agree. Le 13 nov. 08 à 18:47, François Chaplais a écrit : > > Le 13 nov. 08 à

Re: Random algorithm

2008-11-13 Thread Eric Chatonet
- From: "Randall Reetz" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: 11/12/2008 6:18 PM Subject: RE: Random algorithm There is a huge difference between random and unique. If you are after unique then just use the counting numbers. If you need both random a

Re: Random algorithm

2008-11-13 Thread François Chaplais
2/2008 6:18 PM Subject: RE: Random algorithm There is a huge difference between random and unique. If you are after unique then just use the counting numbers. If you need both random and unique you will have to check each number generated against a saved list of every previous number. There

Re: Random algorithm

2008-11-13 Thread Dave Cragg
On 13 Nov 2008, at 07:36, Malte Brill wrote: on each run of the following script: on mouseUp pMouseBtnNo repeat with i= 2130706432 to 2130706442 set the randomseed to i put random(34) & cr after fld 1 end repeat end mouseUp Malte It looks like the limit is 2^31 -- 21474

Re: Random algorithm

2008-11-13 Thread Dave Cragg
t; <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: 11/12/2008 5:26 PM Subject: Re: Random algorithm It would seem that resetting the randomSeed each time you use the random function would only have a 1-in-4,570,422 chance of getting the same seed as the previous run, no? Yes,

Re: Random algorithm

2008-11-13 Thread Dave Cragg
Malte It looks like I miscalculated the upper limit, or have goofed something entirely. The script I ran first was this: on mouseUp put the milliseconds into tSeed set the randomSeed to tSeed put empty into field 1 repeat 5 put random (1000) & cr after field 1 end rep

Re: Re: Re: Random algorithm

2008-11-12 Thread Malte Brill
Dave wrote: > The maximum number it can be set to seems to be 2130706432. Hi Dave (and all) I am not too sure about that, though I would love to know if there are upper limits. On my Intel mac I get: 9 4 34 30 25 21 16 12 8 3 33 on each run of the following script: on mouseUp pMouseBtnNo

Re: Random algorithm

2008-11-12 Thread Jan Schenkel
--- Richard Gaskin <[EMAIL PROTECTED]> wrote: > >>set the randomSeed to random(4570422) > > > > In theory, that could result in the same series of > > random numbers multiple times, as the first random > may > > start with the same randomseed as another, thus > > resulting in the same random f

Re: Random algorithm

2008-11-12 Thread Mark Brownell
random(upperLimit - lowerLimit + 1) + lowerLimit - 1 Gads, I've given myself a headache. The Vegas stuff is interesting. The modern RNGs are safe up to a half a million spins for their one armed bandits. After that an attack can find repeats of the random sequences. Before they fixed it they we

Re: Random algorithm

2008-11-12 Thread John Vokey
All, This has bugged me for a long time (back to the days of the Apple //, at least). All programming languages should *document* their RNGs, so we have some idea of what they are, and, especially, how bad they are (and most are very bad). LGN RNGs are not necessarily bad (a colleague a

RE: Random algorithm

2008-11-12 Thread Randall Reetz
isnt a good diagnosis of severe case of the geeks. -Original Message- From: "Randall Reetz" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: 11/12/2008 6:18 PM Subject: RE: Random algorithm There is a huge difference between random and unique. If you are a

RE: Random algorithm

2008-11-12 Thread Randall Reetz
use Revolution" Sent: 11/12/2008 5:26 PM Subject: Re: Random algorithm > It would seem that resetting the randomSeed each time you use the > random function would only have a 1-in-4,570,422 chance of getting > the same seed as the previous run, no? Yes, but the chances of

Re: Random algorithm

2008-11-12 Thread Noel
I came into this discussion late, so apologies if this has been mentioned. Have you considered utilizing http://www.random.org ? They might have something available that would work for a solution. - Noel At 04:58 PM 11/12/2008, you wrote: Le 12 nov. 2008 à 23:41, Richard Gaskin a écrit (e

Re: Random algorithm

2008-11-12 Thread Jacques Hausser
Hi Richard, In the future, why not ? But I would be ashamed to show my quick-and- dirty scripts in their present state... Jacques Le 13 nov. 2008 à 01:41, Richard Gaskin a écrit : Any chance we'll see a screen shot or two of the output and/or input UIs? Simulations are an interest of m

Re: Random algorithm

2008-11-12 Thread Dave Cragg
It would seem that resetting the randomSeed each time you use the random function would only have a 1-in-4,570,422 chance of getting the same seed as the previous run, no? Yes, but the chances of having the same seed as any of teh previous runs becomes progressively larger. Is it not a bit

Re: Random algorithm

2008-11-12 Thread Richard Gaskin
Jacques Hausser wrote: > The application I'm developping presently is a general-purpose analyse > program of ecological data mostly designed for students training (but > it should be useful for "serious" work too). I don't want a good RNG > for THIS application only, it's to be used as a library

Re: Random algorithm

2008-11-12 Thread Dave Cragg
On 12 Nov 2008, at 21:21, Jan Schenkel wrote: If memory serves me well (and I admit mine is comparable to that of a goldfish) then the engine initializes the randomseed to the value of the milliseconds at startup. I thought the same. But while playing just now (as a result of this thread :-)

Re: Random algorithm

2008-11-12 Thread Jacques Hausser
Le 12 nov. 2008 à 23:41, Richard Gaskin a écrit (excerpts): for pure science, probably not. But for getting work done in Rev, maybe. One not-so-marginal problem is the criticism of pernickery* referees when you (try to) publish your results. They DO want pure science, and usually ask h

Re: Random algorithm

2008-11-12 Thread Joe Lewis Wilkins
Thank you Richard. My middle name. (smile) Joe Wilkins On Nov 12, 2008, at 2:44 PM, Richard Gaskin wrote: Joe Lewis Wilkins wrote: In my personal use, I have followed the users mouse clicks, used the last one to plug into a pretty exotic personal equation that spits out a seed number for

Re: Random algorithm

2008-11-12 Thread Richard Gaskin
Joe Lewis Wilkins wrote: In my personal use, I have followed the users mouse clicks, used the last one to plug into a pretty exotic personal equation that spits out a seed number for use. Since the mouse clicks of a user are pretty much uncharted, except for being limited pretty much to the

Re: Random algorithm

2008-11-12 Thread Richard Gaskin
Jacques Hausser wrote: >>> --- Richard Gaskin wrote: Me too. Wouldn't it suffice to do this before each run?: set the randomSeed to random(4570422) ... >> It would seem that resetting the randomSeed each time you use the >> random function would only have a 1-in-4,570,422 chanc

Re: Random algorithm

2008-11-12 Thread Joe Lewis Wilkins
Gentle Rev users, If you have ever watched any of the History Channels exposés regarding this topic, the Las Vegas gerús have come to the conclusion that there is no such thing as a random number generator, or they would be using it to foil "us". Read all you want, but it is a waste of time

Re: Random algorithm

2008-11-12 Thread Jacques Hausser
It depends of what you use to reset the randomSeed. Some papers (reference burried to deep in my memory to be retrieved) suggest to generate an array of random numbers at start, and then to reset the seed each time it's needed with one of these elements, the index being randomly choosen. A

Re: Random algorithm

2008-11-12 Thread Richard Gaskin
Jan Schenkel wrote: --- Richard Gaskin wrote: Mark Brownell wrote: > I'm surprised that the random seed was not mentioned. Me too. Wouldn't it suffice to do this before each run?: set the randomSeed to random(4570422) In theory, that could result in the same series of random numbers mu

Re: Random algorithm

2008-11-12 Thread Jan Schenkel
--- Richard Gaskin <[EMAIL PROTECTED]> wrote: > Mark Brownell wrote: > > I'm surprised that the random seed was not > mentioned. > > Me too. Wouldn't it suffice to do this before each > run?: > >set the randomSeed to random(4570422) > > > -- > Richard Gaskin > In theory, that could re

Re: Random algorithm

2008-11-12 Thread Mark Smith
It all depends on what you need. This wouldn't do for high quality cryptography, for instance, since a brute-force trial of possible seeds would eventually produce the same sequence of numbers. For many other purposes, the fact that rev sets a new randomseed every time it starts up is goo

Re: Random algorithm

2008-11-12 Thread Brian Yennie
Although this is fit for 99% of people's purposes, I would be careful about expecting randomSeed or multiple samples to actually improve the underlying random algorithm. For sake of a silly example, suppose you had a "bad" random algorithm which only returns even numbers. No matter how many

Re: Random algorithm

2008-11-12 Thread Richard Gaskin
Mark Brownell wrote: I'm surprised that the random seed was not mentioned. Me too. Wouldn't it suffice to do this before each run?: set the randomSeed to random(4570422) -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tut

Re: Random algorithm

2008-11-12 Thread Mark Smith
Splitter :) On 12 Nov 2008, at 19:09, J. Landman Gay wrote: Mark Smith wrote: One day, all people will be called Mark, unlike now, when it's only people The rest of us are named Jacque. Jacques Jacque -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software

Re: Random algorithm

2008-11-12 Thread J. Landman Gay
Mark Smith wrote: One day, all people will be called Mark, unlike now, when it's only people The rest of us are named Jacque. Jacques Jacque -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com

Re: Random algorithm

2008-11-12 Thread Thomas McGrath III
I am very glad that Mark posted the random seed idea. I have spent some time trying to get better random results in different projects but I think that reseting the random seed would have been a lot easier. Regards, Mark (Tom McGrath) Lazy River Software [EMAIL PROTECTED] iTunes Libra

Re: Random algorithm

2008-11-12 Thread Mark Smith
One day, all people will be called Mark, unlike now, when it's only people Best, Mark On 12 Nov 2008, at 18:04, Jacques Hausser wrote: Many thanks for your two cents ! I wonder if the first name of people answering my first question is really random : Mark, Mark and Mark... Jacque

Re: Random algorithm

2008-11-12 Thread Jacques Hausser
Many thanks for your two cents ! I wonder if the first name of people answering my first question is really random : Mark, Mark and Mark... Jacques Le 12 nov. 2008 à 18:46, Mark Brownell a écrit : I'm surprised that the random seed was not mentioned. Please excuse this if someone has resp

Re: Random algorithm

2008-11-12 Thread Mark Brownell
I'm surprised that the random seed was not mentioned. Please excuse this if someone has responded with that. I'm on digest mode. I've solved the random RNG problem by simulating the function of the Roulette wheel. This idea of using random bits or like some websites do it is the clue. When Revo

Re: Random algorithm

2008-11-12 Thread Jacques Hausser
Very interesting ! I didn't know that... my information is slightly obsolete. Many thanks Jacques Le 12 nov. 2008 à 03:34, Mark Smith a écrit : Interestingly, on OS X and Linux, you can read from "/dev/random" and get crypto-quality random numbers: put "/dev/random" into tFile

Re: Random algorithm

2008-11-11 Thread Mark Smith
Interestingly, on OS X and Linux, you can read from "/dev/random" and get crypto-quality random numbers: put "/dev/random" into tFile open file tFile for binary read read from file tFile for 1000 uint4 put it into tRandNums close file tFile will get you a comma de

Re: Random algorithm

2008-11-11 Thread Mark Smith
Jaques, I wonder if it would be practical to do what some of the crypto-quality RNGs do, and use the microphone input of the users computer as a source of random bits. Hmm.. Best, Mark On 11 Nov 2008, at 22:57, Jacques Hausser wrote: Hi Mark (and Mark), For small series, sure, it is ran

Re: Random algorithm

2008-11-11 Thread Jacques Hausser
Hi Mark (and Mark), For small series, sure, it is random enough. But I'm afraid that the period is actually rather short for what I suppose is a linear congruential generator (for instance Excel algorithm was famous for its period of 32000 numbers only), not speaking of the pattern due to

Re: Random algorithm

2008-11-11 Thread Mark Schonewille
Hi Jacques, Depending on the kind of project you are working on, you could download a few thousand (or more) random numbers from the site at once and simulate the random series for your students. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering http://e

Re: Random algorithm

2008-11-11 Thread Jacques Hausser
Many thanks, Mark, That's far better than an algorithm, (true random numbers, not pseudo ones ! ). I'll use it for "serious research" simulation programs, but not in the standalone I'll distribute to the students. I do not want random.org to be drowned under simultaneous queries from 70 peo

Re: Random algorithm

2008-11-11 Thread Mark Smith
Jacques, as you probably know, there are many measures of randomness... Taking the 'r' correlation as a measure of it, I've done this test: generate two series of 1000 numbers between 1 and 1 each, using the random() function. Take the correlation between the two series, and append it to

Re: Random algorithm

2008-11-11 Thread Mark Schonewille
Hi Jacques, You can find a library for random.org here: . I have never seen any specific documention on the algorithm behind Rev's built-in random function. I suspect it is a standard C++ function. -- Best regards, Mark Schonewille Economy-x-Ta