How do random number generators work? | Random Numbers

  Рет қаралды 104,814

the roadmap

the roadmap

Күн бұрын

There is nothing truly random when it comes to computers. Computers do what they are told to do. In this video, we cover all about random numbers, pseudo-random numbers, and random number generators. After watching this video, you will be able to answer the below questions:
What are random numbers?
What are random number generators?
What are pseudo-random numbers?
How do random number generators work?
What is the initial seed?
Why is it important to pick a good initial seed?
Channel website:
roadmap.sh
Discord Community:
/ discord
Find us on the internet:
/ roadmapsh
/ kamrify
github.com/kam...
/ roadmapsh

Пікірлер: 74
@RijoBeats
@RijoBeats 3 жыл бұрын
These digestible sessions are pretty cool
@FuryOutlaw
@FuryOutlaw Жыл бұрын
Thank you for the concise and straightforward content!
@Imisambi
@Imisambi 9 ай бұрын
gooooood stufffffffffffffff!!
@shri5248
@shri5248 Жыл бұрын
Got clarity. Thanks a lot.
@sadiasayed3917
@sadiasayed3917 3 жыл бұрын
this so underatted i swear
@Nabil_Khori
@Nabil_Khori Жыл бұрын
Thanks this is do easy to understand u gained new subscriber
@Rando_Shyte
@Rando_Shyte 2 жыл бұрын
Tres interesting... Was watching a video about quantum entanglement and the idea of randomness just seems strange to me. Like surely nothing can be truly random if all variables are known? Now I'm sounding deterministic lol.
@AdrianCosman
@AdrianCosman Жыл бұрын
Nothing wrong with determinism, just embrace it
@chiraz-p2g
@chiraz-p2g Жыл бұрын
Very helpful video, Thank you!
@vibhordwivedi5070
@vibhordwivedi5070 11 ай бұрын
Well explained, must watch video❤
@florianwege7563
@florianwege7563 3 жыл бұрын
I thought the "seed" only denotes the starting value as in you plant a tree and is thus not dynamic for different iterations of the same RNG. The current state could also be a function of multiple previous states. Furthermore, each iteration could depend on some exterior parameter like the temperature. But more importantly, it could be stated that the distribution of the output values of an RNG is not necessarily even, good statistical properties are a quality characteristic of an RNG. Lastly, the Pseudo RNG as a model could be contrasted to True RNGs and Cryptographically Secure Pseudo RNGs.
@siddharthrana8525
@siddharthrana8525 Жыл бұрын
thanx buddy 🎉 but i have a quetion for you ? if we have only random numbers from 1 to 99,00. so how can we find seed or anything for predicte the next number.
@letsdiscussitoversometea8479
@letsdiscussitoversometea8479 11 ай бұрын
By ultimately establishing every single parameter that the computer works on to determine the initial seed... However, such a feat would require several billion generations of several world populations' entire lifetimes, just to reach what is - ultimately - still technically possible. Because everything in computing is binary (i.e consisting of 1s and 0s), there will DEFINITELY be a point where this can be established. Whether or not you're up to _trying,_ is still your free choice I suppose! 🙂
@irmandade1mausoleu
@irmandade1mausoleu Ай бұрын
since the number are limited, you just need to find the pattern between the values. And it requires a lot of experience with math patterns.
@superfit2707
@superfit2707 Жыл бұрын
How can it be random if we are seeding the initial number - machine should know that it has to generate a random number but it should decide the numbers on its own - in that way we can truly call it as random number generator
@alolosbasha
@alolosbasha Жыл бұрын
The initial seed could be the time of day for example Check vid at end it is stated
@geanluiz100
@geanluiz100 Жыл бұрын
Have You actually watched the video?
@aarynforehand3130
@aarynforehand3130 11 ай бұрын
The computer doesnt think....it can only do what it is told.
@letsdiscussitoversometea8479
@letsdiscussitoversometea8479 11 ай бұрын
The computer determines the initial seed dependent upon variables which have been determined before the RNG instruction is executed. So for example, a given number of milliseconds may have passed inside the computer's internal clock, which would therefore consist of the number of the specific initial seed. Put even more simply, let's say that 1,494 milliseconds have passed since the computer booted up and was ready to accept instructions from the user; 1,494 milliseconds, could produce an initial seed, of, say, 646. Were it 1,495 milliseconds, then the computer could produce an initial seed, of, say, 71. 1,496 milliseconds, could produce an initial seed, of, say, 50935. All predetermined numbers as far as the manufacturer programmed-in initial seed might happen to be, but certainly not clearly noticeable to the person using the computer. If - just by astonishingly incidental chance the next time you booted the computer up, and took 1,494 milliseconds to execute an RNG instruction, the initial seed would - once again - be the hypothetical 646 given in the above example. In other words, it is ultimately fixed, and isn't *_truly_* random, no. But it is *_virtually_* random as far as the *oblivious* end user is concerned. And now that you know, you're technically just that little bit *_less_* oblivious, and could try to repeat the experiment, to see how the RNG instruction works on a given computer.
@pihlajafox
@pihlajafox 5 ай бұрын
It can't give you a random number without rng
@pineapplejuice1156
@pineapplejuice1156 2 жыл бұрын
Interesting. Thank you for the explanation
@mirriamjulile9738
@mirriamjulile9738 2 жыл бұрын
Sir if I may ask, How to get the Seed as well as that percentage you used?
@The_Ancient_Guardian
@The_Ancient_Guardian 2 жыл бұрын
escelent video, thank very much.
@SaumyaSharma007
@SaumyaSharma007 2 жыл бұрын
Awesome 😎👍 Thanks
@6up5ohcopoutprocon
@6up5ohcopoutprocon 6 ай бұрын
THANK YOU!!
@as_salafi_gadgets
@as_salafi_gadgets Жыл бұрын
Very perfectly explained
@pankajroshan2617
@pankajroshan2617 Жыл бұрын
Really nice video.
@eslam_faris
@eslam_faris Жыл бұрын
Is there is any tool to put the numbers and getting the results?
@letsdiscussitoversometea8479
@letsdiscussitoversometea8479 11 ай бұрын
You could simply write a machine code program which instructs the computer to display the given numbers using something like the PEEK command I suppose (but PEEK is a BASIC instruction, not a straightforward machine code instruction).
@irmandade1mausoleu
@irmandade1mausoleu Ай бұрын
so the Math.radom() function just uses a random seed(number) which is based on specific datas on the computer, like the number of ms and the keyboard buttons clicked in the day? wow, l thought it was a special rock that emits a different eletric charge everytime its pressed, but using the user as a compoment of the code is just... interesting, since the human is unpredictable by nature... most of the times
@mariodykstra6555
@mariodykstra6555 4 ай бұрын
I want to equip the Count’s Pipe Organ with a Random Number Generator. The Number of the Day is Seemingly Random.
@udaykirangarlapatti1622
@udaykirangarlapatti1622 Жыл бұрын
U got a subscriber
@nicolasleite8519
@nicolasleite8519 2 жыл бұрын
last 20 seconds were the most clarifiers, lol
@gautamthulasiraman18
@gautamthulasiraman18 2 жыл бұрын
Thanks man ❤️. You saved me..
@sharathpujari6364
@sharathpujari6364 Жыл бұрын
How is the formula used to calculate
@irmandade1mausoleu
@irmandade1mausoleu Ай бұрын
just a bunch of random basic arithimetic
@Cubixander
@Cubixander 9 ай бұрын
It would be better if you added the past seed to the next seed if it repeats
@noobicon4118
@noobicon4118 10 ай бұрын
What if I used random function giving the range 10 and it generates a value let's say 6 so when refresh it and use random function again giving range 10 will it give same value again?? Because it's using a specific formula which would give us the value
@JGD714
@JGD714 9 күн бұрын
That's on the seed. If refreshing your hypothetical random function you also reset the seed to be the same every time, then yes you will get the same initial value after the refresh.
@roberthutchison8197
@roberthutchison8197 Жыл бұрын
I have a thought on how to choose a random number. Why not use the value of Pi? As we know, Pi has NO resolution and so print out a couple of pages of those numbers and pick some!
@ArtyukhovBogdan
@ArtyukhovBogdan Жыл бұрын
How do you know which ones to choose? Another PI? Recursive, isn't it?)
@roberthutchison8197
@roberthutchison8197 Жыл бұрын
@@ArtyukhovBogdan Isn't that the idea, if you don't know, how will anyone else!
@JGD714
@JGD714 9 күн бұрын
@@roberthutchison8197 *1 year later* he means that the machine needs to know which numbers to pick, but the machine can't randomly pick Pi numbers, so a human has to pick which numbers to pick, so all you're doing is using those numbers as a seed, so it's literally the same system we use right now, just that you use Pi was your math formula.
@bahavamuru8354
@bahavamuru8354 Жыл бұрын
Thanks master,I win 200RM in Malaysia 4d lottery
@CHUKrishnavel-cq1co
@CHUKrishnavel-cq1co 9 күн бұрын
How bro
@lamer8310
@lamer8310 2 жыл бұрын
banger
@siddhuyarragani7742
@siddhuyarragani7742 2 жыл бұрын
The random numbers are 4, 2, 21, 7,1,28 can please tell me sir how???
@Inwbpwns4evr
@Inwbpwns4evr Жыл бұрын
% means the modulus (or “remainder”) between two numbers. 85%12 is the same as writing 85 mod 12 What you do first is divide the numbers 85/12= 7.083 Now we see that 7*12 is the last whole multiple before we hit 85. Therefore the modulus or the “remainder” will be 85-(7*12)=85-84=1 So we can now say that 85%12 (85 mod 12) = 1 A simpler example would be 7%3 = 1 or 9%7 = 2 Hope this helps! ◡̈
@AnimA-v2o
@AnimA-v2o 2 жыл бұрын
awesome
@ddphotospalani299
@ddphotospalani299 Жыл бұрын
Any idea
@killamaita
@killamaita 7 ай бұрын
The reason dice don't roll the same is because they are perfectly rigged but we roll them different and we roll them different because we are perfectly rigged to want randomness no matter what!
@harsh9558
@harsh9558 11 ай бұрын
Interesting
@sudalairaj3569
@sudalairaj3569 4 ай бұрын
115043,376453,506852 next numbers and next numbers
@pikazap6672
@pikazap6672 8 ай бұрын
my friend once told me im like a random generator of words. now at least I know how I function unlike him.
@TransformativeMind
@TransformativeMind 9 ай бұрын
Trying find edge on bovada
@botayza22
@botayza22 2 ай бұрын
What is *
@wahyoetube406
@wahyoetube406 2 жыл бұрын
Am I the only Person, think how this work in LOTRE System??? 🤔
@sdiaz212b
@sdiaz212b 10 ай бұрын
English?
@singaprakash106
@singaprakash106 9 ай бұрын
Me also
@shiel1
@shiel1 5 ай бұрын
bro forgot about 3 (0:54)
@neeshu
@neeshu 2 жыл бұрын
I would have a for loop run from 1-100 and stop a clock after every 1-2 milliseconds and get a new random number
@kazuha3149
@kazuha3149 2 ай бұрын
So youre saying lotto is rigged 😂
@songdjbaba824
@songdjbaba824 2 жыл бұрын
Hii
@irmandade1mausoleu
@irmandade1mausoleu Ай бұрын
dios mio, this guy stole 1:27 seconds of my time.
@Decent9669
@Decent9669 Жыл бұрын
RANDOM NUMBER
@songdjbaba824
@songdjbaba824 2 жыл бұрын
Teen patti game how to random number work
@leviackermann4080
@leviackermann4080 2 ай бұрын
That's literally predictable
@MutairuW.O
@MutairuW.O 6 ай бұрын
Great explanation 😊😊
NMCS4ALL: Random number generators
20:10
Dave Ackley
Рет қаралды 73 М.
How computers generate RANDOMNESS from math
5:06
Tony Zhang
Рет қаралды 66 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Random Numbers (How Software Works)
8:27
V. Anton Spraul
Рет қаралды 93 М.
Why is this number everywhere?
23:51
Veritasium
Рет қаралды 9 МЛН
How To Predict Random Numbers Generated By Computers
13:54
PwnFunction
Рет қаралды 569 М.
How Slot Machines ACTUALLY Work 👉 From a Slot Tech and Engineer
24:02
Gamble Smart
Рет қаралды 2,2 МЛН
How AI Discovered a Faster Matrix Multiplication Algorithm
13:00
Quanta Magazine
Рет қаралды 1,5 МЛН
True Random Numbers - Computerphile
12:16
Computerphile
Рет қаралды 132 М.
Almost All Random Numbers Are Actually Fake
19:38
Thoughty2
Рет қаралды 518 М.
Random Numbers (1 of 2: True vs. Pseudo RNGs)
13:30
Eddie Woo
Рет қаралды 39 М.