Random numbers (emphasis on seeding the number)
-
-
A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)You could put a microphone on your local sewer dump, record the random crap splash sounds and from there seed your random crap number generator. :laugh: That basic need can be unpleasantly random.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
-
You could put a microphone on your local sewer dump, record the random crap splash sounds and from there seed your random crap number generator. :laugh: That basic need can be unpleasantly random.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
Although your post was geared to be funny, and it was, it proves my point. Using digital output from anything around us in the physical world and the digital world would work.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
The capacity is limited to only three numbers (2,3 and 6). How's that random? ;P
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
Although your post was geared to be funny, and it was, it proves my point. Using digital output from anything around us in the physical world and the digital world would work.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)I guess you're right. Random it will be. And I tend to believe that nothing is more random than nature (if it is at all), in your case, pictures taken and uploaded by people (nature). I'd just use another method, instead of dimensions, I'd get a few pixels from the pictures and with some sort of algorithm, create the seed. If security is not a concearn, than both our methods would work. The difference is, your are not so nasty.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
-
A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
There is no perfect Random generator. All I was doing was getting community feedback on an idea I was toying with on "seeding" RNG's. The whole idea being that you cannot generate the seed. The seed has to be random. Well, how do you get random? My idea was to use some sort of random "image/picture" grab from the net and use the pixel count of that image as your seed. I'm sure color count or something similar could be used as well...as long as you are not in monochrome format or the like. Thanks for the suggestion.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)Absolutely true, there is no perfect random number generator. I was just showing an example of using the Windows Guid generator (pretty darn random) to seed the RNG. Really it's kind of a moot point, in that, according to MSDN the RNG seed value is ignored in the present implementation. It uses some undisclosed seeding method internal to the constructor.
Kevin Rucker, Application Programmer QSS Group, Inc. United States Coast Guard OSC Kevin.D.Rucker@uscg.mil "Programming is an art form that fights back." -- Chad Hower
-
Actually, no. If you have ever been on 4Chan then you would understand what I am talking about. You also need to know that there is no way for you to grab the image at the same time I am because you have no idea when I'm grabbing it. Images on 4Chan come and go (get moved or deleted) every second. If you don't know when I am going to grab that image, then you have no idea what my seed value was or is.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)You didn't get my meaning - my point was not whether I know or not when you're grabbing it, but that the only random component in your 'algorithm' is exactly that: when you're grabbing it. And that's a time stamp. So you can just as well use that time stamp as your seed.
-
You didn't get my meaning - my point was not whether I know or not when you're grabbing it, but that the only random component in your 'algorithm' is exactly that: when you're grabbing it. And that's a time stamp. So you can just as well use that time stamp as your seed.
I'm not using time at all. I am using the image properties. I don't care about the time. It is not even part of the equation. I would never use time to seed a rng.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
Isn't
rand(42);
random enough for you. :cool:
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)I use ranGens allot for simulated hardware. My seed solution that never fails. Random number seeded with QueryPerformanceCounter and then reseeding random number and using the random number from the last seed as a Mod on a new call to QPCntr.
-
jschell wrote:
Do you see any circles there?
do you because I don't. The images are random by nature. I don't create the randomness in that, the internet does. I use that natural randomness of the images to seed my random number. The only thing I am creating is the final random number.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)Slacker007 wrote:
do you because I don't.
It was explicit in the statement.
Slacker007 wrote:
The images are random by nature.
That is inprecise. There are two parts to it. 1. The content of picture A. 2. The selection of picture A in the first place. If you use a 'random' process to arrive at 2 then the methodology for 'random' in that case is open to question.
-
I'm not using time at all. I am using the image properties. I don't care about the time. It is not even part of the equation. I would never use time to seed a rng.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)The image properties depend on the image. That part is deterministic and not random at all. The image depends on the exact time. Once you know the time, determining the image is not random at all either. It all comes down to when you grab the image, because that determines the image. when is time. It's about time you realize that.
-
The image properties depend on the image. That part is deterministic and not random at all. The image depends on the exact time. Once you know the time, determining the image is not random at all either. It all comes down to when you grab the image, because that determines the image. when is time. It's about time you realize that.
I don't think you understand anything about image dumps (sites that people, all over the world, upload images to). You seem to focus on time. Time is not important here. There is no other way I can get this idea through to you. You seem to be fixated on time. Time is irrelevant here.
Stefan_Lang wrote:
The image properties depend on the image. That part is deterministic and not random at all.
wrong. every image has it's own properties. every image is different then the next. the image i grab is random; their for the properties I work from are random.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
I don't think you understand anything about image dumps (sites that people, all over the world, upload images to). You seem to focus on time. Time is not important here. There is no other way I can get this idea through to you. You seem to be fixated on time. Time is irrelevant here.
Stefan_Lang wrote:
The image properties depend on the image. That part is deterministic and not random at all.
wrong. every image has it's own properties. every image is different then the next. the image i grab is random; their for the properties I work from are random.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)I completly understand about the randomness of images in general. The point I somehow fail to get across is, that if you say time is not a factor, then you effectively say that you could freeze the internet at its current state, and perform your algorithm. Let's say you do that: 1. You freeze the internet ... NOW! 2. you grab the first image you can get from 4chan 2.a the image you get is, let's say, some landscape with a bridge in front and a couple of birch trees to the side 3. you extract some properties from that image, and mangle it into a number 4. You seed your RNG with that number. Now consider someone else figured out this algorithm, so what he does is this: 1. He grabs the first image he can get from 4chan 1.a the image you get is, let's say, some landscape with a bridge in front and a couple of birch trees to the side 2. You say it can't be. But I say you just claimed it must be, because you stated time does not play into this. If you discount for the time factor, then for all purposes, the state of the internet will not change! 3. He extrats the properties just like you did and 4. feeds it into his RNG, getting the exact same sequence. The only random element in here is the fact that the internet changes, and that is a function of time. Without time there is no change. It's as elementary as that.
-
I completly understand about the randomness of images in general. The point I somehow fail to get across is, that if you say time is not a factor, then you effectively say that you could freeze the internet at its current state, and perform your algorithm. Let's say you do that: 1. You freeze the internet ... NOW! 2. you grab the first image you can get from 4chan 2.a the image you get is, let's say, some landscape with a bridge in front and a couple of birch trees to the side 3. you extract some properties from that image, and mangle it into a number 4. You seed your RNG with that number. Now consider someone else figured out this algorithm, so what he does is this: 1. He grabs the first image he can get from 4chan 1.a the image you get is, let's say, some landscape with a bridge in front and a couple of birch trees to the side 2. You say it can't be. But I say you just claimed it must be, because you stated time does not play into this. If you discount for the time factor, then for all purposes, the state of the internet will not change! 3. He extrats the properties just like you did and 4. feeds it into his RNG, getting the exact same sequence. The only random element in here is the fact that the internet changes, and that is a function of time. Without time there is no change. It's as elementary as that.
The images get moved and deleted, usually in a day. There are thousands of images from all over the world that get processed through 4Chan's queue. The chances of you grabbing the same image I did is very slim. The randomness is in the image grab. I don't know what image I am going to grab...neither do you and you would never know what image I used to seed my RNG.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
Collin Jasnoch wrote:
But a pattern does exist, again you just are unaware of it.
I know where you are going with this...I think. However, if your theory is correct then we could predict precisely when each of us die and when someone kills...based on patterns of course.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)That is an interesting question, and one many philosphers and scientists ponder about. Many say that yes, if we could create a model of the real world that precisely emulates all that is going on up to the finest detail, then we will indeed be able to predict anything, including the actions of all beings, and also when each one will die. Some state, that while theoretically possible, the model must be so detailed that the hardware required to hold it would exceed the material available in the universe. And therfore we will never be able to do this. (that's also my opinion) Yet others claim that there is a free will in each of us, and that this cannot be predicted, no matter how detailed the model. Most religions and religious people fall into that category, although there are some that do claim everything is predetermined. (look up the term 'Kismet' - I don't recall which religion it was, but there is (at least) one that explicitely uses it in this context) But anyway, this is a bit beside the topic: for your purpose it's probably safe to assume that at least for now it is not possible to predict human actions. And it will stay that way for a very long time ;)
-
The images get moved and deleted, usually in a day. There are thousands of images from all over the world that get processed through 4Chan's queue. The chances of you grabbing the same image I did is very slim. The randomness is in the image grab. I don't know what image I am going to grab...neither do you and you would never know what image I used to seed my RNG.
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)which part of 'freeze' didn't you get? ;)
-
That is an interesting question, and one many philosphers and scientists ponder about. Many say that yes, if we could create a model of the real world that precisely emulates all that is going on up to the finest detail, then we will indeed be able to predict anything, including the actions of all beings, and also when each one will die. Some state, that while theoretically possible, the model must be so detailed that the hardware required to hold it would exceed the material available in the universe. And therfore we will never be able to do this. (that's also my opinion) Yet others claim that there is a free will in each of us, and that this cannot be predicted, no matter how detailed the model. Most religions and religious people fall into that category, although there are some that do claim everything is predetermined. (look up the term 'Kismet' - I don't recall which religion it was, but there is (at least) one that explicitely uses it in this context) But anyway, this is a bit beside the topic: for your purpose it's probably safe to assume that at least for now it is not possible to predict human actions. And it will stay that way for a very long time ;)
I'm dropping off this thread now. I get your point. I don't agree with most of it. Anything further would just be a pointless argument. ;)
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) -
A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)
Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)That's as good a way as any other. Pseudo random number generators merely cycle through all the values in their range in a circular loop, you just get the values out of order. The seed only determines where in that cycle you start. So yes, by all means pick a relatively unpredictable seed, but don't waste time knocking yourself out about it -- no possible seed value will change how random the numbers you get from the generator are. System uptime in milliseconds, or the microsecond portion of the real time clock is plenty sufficient when a human determines when the generator is seeded. If you're seeding generators programatically, then you're in trouble, and yes, finding an external seed value might be helpful. However, processing images probably won't generate a better seed than just asking the system to give you it's microsecond clock and its a heck of a lot easier to determine how likely there will be some predictability to the seed values received.
We can program with only 1's, but if all you've got are zeros, you've got nothing.