How does uranium processing not cause desync?
-
- Fast Inserter
- Posts: 185
- Joined: Sat Apr 11, 2015 7:52 pm
- Contact:
How does uranium processing not cause desync?
It's the only thing in the entire game that's random. Though, random doesn't really square with deterministic gameplay such as this game requires.
So, how does it work? Does the game not only save the random seed, but also how many times it's been used to maintain the offset?
And how about multiplayer, if a player enters, are they given the seed and the offset? But if so, what if in that exact moment, the seed was used, but then not properly transmitted?
So, how does it work? Does the game not only save the random seed, but also how many times it's been used to maintain the offset?
And how about multiplayer, if a player enters, are they given the seed and the offset? But if so, what if in that exact moment, the seed was used, but then not properly transmitted?
Re: How does uranium processing not cause desync?
Random numbers are not true random and created deterministicaly, and no it's not the only random thing in the game.
-
- Fast Inserter
- Posts: 109
- Joined: Sat Apr 29, 2017 11:13 pm
- Contact:
Re: How does uranium processing not cause desync?
A seed is picked, and then operations are done in order for all computers. So, you'll get the same random number for each computer.
Re: How does uranium processing not cause desync?
If you want to learn more about this, you can search the Interne for pseudorandom or pseudorandomness.
Koub - Please consider English is not my native language.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How does uranium processing not cause desync?
Package/Gamestate CRC error -> Resend package or fail to join. But that goes for *any* sort of transmission error.
And yea, computers can't do random, they just do "is pretty difficult to distinguish from random but is actually deterministic".
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: How does uranium processing not cause desync?
There are random numbers that are predictable and deterministic, there are random numbers that are unpredictable and deterministic and then there are random numbers that are unpredictable and nondeterministic. Sadly there are no numbers that are predictable and nondeterministic, so no can't do the full quote.
You can modify the internal state of the random number generator with the game state.
Also computer can easily do random, just use the lowest bits from a camera feed. Enough quantum magic going on there.
You can modify the internal state of the random number generator with the game state.
Also computer can easily do random, just use the lowest bits from a camera feed. Enough quantum magic going on there.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: How does uranium processing not cause desync?
Yeah, specialized hardware can do it. Various tricks with tiny unconnected capacitors and stuff work too, and modern CPUs and/or motherboard chipsets have high quality randomness generators too. Don't need to go that far to find real, or at least impossible to tell from real, randomness.
Doesn't mean you want it most of the time, though.
Re: How does uranium processing not cause desync?
Isn't that cheating like picking up random numbers from the lottery ? It feels to me like what would be random there would be the output of the feed, but that wouldn't require quantum magic.
I thought computers couldn't do true random, just non-predictable without so much time machine that it is considered safe enough to assume it look like random.
Is that using quantum mechanics ?slippycheeze wrote: ↑Tue Jul 02, 2019 10:03 pmVarious tricks with tiny unconnected capacitors and stuff work too, and modern CPUs and/or motherboard chipsets have high quality randomness generators too.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: How does uranium processing not cause desync?
The former, I understand yes. The later I don't know, but something close enough. It *could* be an NSA planted PRNG with a known key/seed using cryptography to generate apparently random output, but probably not. Like, maybe 80 percent.mmmPI wrote: ↑Tue Jul 02, 2019 10:05 pmIsn't that cheating like picking up random numbers from the lottery ? It feels to me like what would be random there would be the output of the feed, but that wouldn't require quantum magic.
I thought computers couldn't do true random, just non-predictable without so much time machine that it is considered safe enough to assume it look like random.
Is that using quantum mechanics ?slippycheeze wrote: ↑Tue Jul 02, 2019 10:03 pmVarious tricks with tiny unconnected capacitors and stuff work too, and modern CPUs and/or motherboard chipsets have high quality randomness generators too.
Ultimately, like the camera feed deal, there are lots of things where quantum randomness is available, and we keep finding more confirmation that you can't fully know a quantum system externally.
Re: How does uranium processing not cause desync?
I disregard the non-philosophical implications of the discussion
In my head the question is : can a computer flip a coin ? and I thought it was no, like for the camera feed, someone else has flipped the coin, the computer just read the answer; another computer with the same feed would do the same thing in parallel and achieve the same result. ( in my mind).
Now if a computer could flip a coin the philosophical implications are : then we will know which side it will land. Meaning that if the computer could toss the coin it would toss it in a way that was programmed before ( the egg and the chicken) so it could be unpredictable, but would be deterministic anyway, and I don't think that is the "true" random.
The only reason we consider flipping a coin random, is because we don't do it at the exact same angle/energy/in a vaccum every time, else we could predict the air flow and rotation speed ect and we would know then which side it lands.
Does quantum mechanic allow in a way to let the computer toss a coin ? in the sense as do manufacturer have implemented the incertainty scientist have looking at quantum physics in chips already available for consumer market ? that would leave the field of philosophy then
In my head the question is : can a computer flip a coin ? and I thought it was no, like for the camera feed, someone else has flipped the coin, the computer just read the answer; another computer with the same feed would do the same thing in parallel and achieve the same result. ( in my mind).
Now if a computer could flip a coin the philosophical implications are : then we will know which side it will land. Meaning that if the computer could toss the coin it would toss it in a way that was programmed before ( the egg and the chicken) so it could be unpredictable, but would be deterministic anyway, and I don't think that is the "true" random.
The only reason we consider flipping a coin random, is because we don't do it at the exact same angle/energy/in a vaccum every time, else we could predict the air flow and rotation speed ect and we would know then which side it lands.
Does quantum mechanic allow in a way to let the computer toss a coin ? in the sense as do manufacturer have implemented the incertainty scientist have looking at quantum physics in chips already available for consumer market ? that would leave the field of philosophy then
Re: How does uranium processing not cause desync?
Yes, a computer can generate truly random numbers without adding any special hardware or using any input channel - if it is "vulnerable" to the Rowhammer attack (wich almost all PCs using non-ECC DDR3/4 RAM seem to be).
The Rowhammer attack can be used to (randomly) change bits in RAM rows a process has no direct access to. But you can also use it to (randomly) change bits in RAM rows you have direct control over. You hammer a row containing an alternating bit pattern until any bit flips. If a bit flips, you got one truly random bit. You then reset the flipped bit and repeat the hammering until another bit flips...
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How does uranium processing not cause desync?
I thought about saying "math can't do random" to distinguish better between a "conceptual computer" and "physical computer". Because what you're saying isn't computing randomness, it's reading it from where it already exists.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: How does uranium processing not cause desync?
A computer can easily flip a coin. All you need is a coin, a robot arm and a camera to see how the coin lands.mmmPI wrote: ↑Tue Jul 02, 2019 10:52 pmI disregard the non-philosophical implications of the discussion
In my head the question is : can a computer flip a coin ? and I thought it was no, like for the camera feed, someone else has flipped the coin, the computer just read the answer; another computer with the same feed would do the same thing in parallel and achieve the same result. ( in my mind).
Now if a computer could flip a coin the philosophical implications are : then we will know which side it will land. Meaning that if the computer could toss the coin it would toss it in a way that was programmed before ( the egg and the chicken) so it could be unpredictable, but would be deterministic anyway, and I don't think that is the "true" random.
The only reason we consider flipping a coin random, is because we don't do it at the exact same angle/energy/in a vaccum every time, else we could predict the air flow and rotation speed ect and we would know then which side it lands.
Does quantum mechanic allow in a way to let the computer toss a coin ? in the sense as do manufacturer have implemented the incertainty scientist have looking at quantum physics in chips already available for consumer market ? that would leave the field of philosophy then
As for cameras no two computers can have the same feed. Even if you use a single lens and then split the light into two identical cameras each photon can only go either left or right. Not both. So they will never be identical. The particle/wave duality of light comes into play there.
Also cameras them self are non-deterministic even if they don't move and the scene changes in no way. They digitize the image they see into a brightness between 0 and 255. Now if the actual light is 42.5 the result can be 42. Next frame it's 43. Then 43, 43, 42, 43, 42, 42, ... The result will be random because the analog/digital conversion runs into true physical random effects when it's between two clear values. In effect the circuit will flip a coin to determine if it is 42 or 43. Get a cheap camera and it will be 40, 45, 42, 41, 46, ...
The same can be done with a sound card. You don't even have to connect a microphone to it. There will still be some random noise in the recorded sound.
Read https://en.wikipedia.org/wiki/Hardware_ ... _generator for more purpose build designs and theory behind it.
Re: How does uranium processing not cause desync?
It depends what do you mean with "computer". If you mean an ideal finite state machine, then you can not achieve randomness if you do not have random inputs. If you mean practical computers they may have devices which give random numbers (at least unpredictable, determinism of the nature is another story). Real computers have also random bit changes at some finite rate, so they are somewhat random even when they try to be exact. Such events are very rare in specified conditions, but have to be taken into account in some sensitive applications.mmmPI wrote: ↑Tue Jul 02, 2019 10:52 pmI disregard the non-philosophical implications of the discussion
In my head the question is : can a computer flip a coin ? and I thought it was no, like for the camera feed, someone else has flipped the coin, the computer just read the answer; another computer with the same feed would do the same thing in parallel and achieve the same result. ( in my mind).
Most practical way to produce randomness at high bitrate is to use high frequency electronic noise. It has very quantum mechanical nature but it is also possible to generate random numbers from classical systems, if they are sensitive to initial conditions (i.e. chaotic). For example fluid flows in lava lamp has been used, which is classical system in first approximation.
Re: How does uranium processing not cause desync?
I read the wiki page and some of the reference, this one is tricky. The randomness of the numbers is not in question here. I would more question the term "generate". I feel like what is done in a Rowhammer attack is more checking for random occuring. ( as in the camera feed a little)Oktokolo wrote: ↑Wed Jul 03, 2019 4:08 amYes, a computer can generate truly random numbers without adding any special hardware or using any input channel - if it is "vulnerable" to the Rowhammer attack
The random comes from the bit shifting, due to random event like cosmic particle interacting with some electrons in the memory. And you detect it by accessing the memory a lot very often.
One way to say it would be, this is not computationnal random from how eradicator says it, this is a physical phenomenon, that computers happens to be sensitive to, if you try hard enough to notice it you will. But it is like if you use a webcam from your computer. It is not the logic that you ask it to execute that is "generating" the random, this "print" an image of the random.
The "proof" would be that this phenomenon wouldn't occur in a deep burried and isolated computer. You would still be able to ask the memory to read the same rows lots of time, but there wouldn't be any side effect, since it relies on an external phenomenon.
This doesn't change the fundamental philosophical view i had about what the computer logic is able to do. However it does change my view on what a computer is. I didn't know i had a cosmic ray detector. Neither did those who made it apparently.
I was thinking about the new "quantum computer" could have been designed to take advatange of physical phenomenom that i ignore to "generate real random" , not that the actual one i have is making random errors due to manufacturing being already obsolete!
This is a hack ! someone managed to use the memory as a webcam that receive a random feed to make something very useful out of those errors.
I will further read ! I couldn't find some examples of a component that would be deisgned with an intended use of those mechanism !mrvn wrote: ↑Wed Jul 03, 2019 9:27 amRead https://en.wikipedia.org/wiki/Hardware_ ... _generator for more purpose build designs and theory behind it.
I had not taken in account the non-deterministic nature of the digital camera itself (that i ignored). And i didn't thought about the photons and quantum mechanic involved in light I was considering the "ideal finite state machine" in the previous point, but i didn't know it was called like that.
I did not consider the case of the sound card for example, which I compare to the residual noise on old TV when you had not a channel selected. It is the "random" of the initial universe or so. Not something induced by logic, but inherently present on the artifacts.
If you take that in account , then you dont even need a coin, or an arm, to " flip a coin". As the conceptual equivalent of getting a random 0 or 1 whenever you want, just the camera is enough as the photons are already going one or another direction.
But if you use just an arm to flip the coin in a vaccum and someone else tell the result, it will always flip it the same way. Unless you explictly give the arm a random parameter, which you can't get if you count on the coin result to be your RNG ( the egg and the chicken).
This distinction between the " ideal finite state machine" and the "real computer" seals the deal for me, i didn't know you could refers to things using those concepts. It makes things clearer, I was definetly refering to one over the other. And also i didn't know that regular real computer were affected by random bit change, but it seems to me like similar to the physical phenomemon that occurs during rowhammer, i guess you wouldn't want a solar eruption to trigger some nuke launch, so you don't just make sure the logic is safe ( which it is )you also make sure the physical condition in which it will be executed won't prevent its correct execution. ( which is not for most consumer computer using DDR3 or DDR4 but it doesn't seem to matter that much for regular use).
Re: How does uranium processing not cause desync?
That is not how rowhammer works. Reading a memory cell drains energy from the cell but also rewrites it to restore it. But it also affects nearby cells. All cells are constantly read and rewritten by the memory controller in the background to counteract the drain cells experience over time. But by hammering a single row in the memory the drain of nearby cells becomes more than the refresh can handle and the information in the cell is lost. The next read or refresh then restores a bogus value and the bit flips.mmmPI wrote: ↑Wed Jul 03, 2019 10:48 amI read the wiki page and some of the reference, this one is tricky. The randomness of the numbers is not in question here. I would more question the term "generate". I feel like what is done in a Rowhammer attack is more checking for random occuring. ( as in the camera feed a little)
The random comes from the bit shifting, due to random event like cosmic particle interacting with some electrons in the memory. And you detect it by accessing the memory a lot very often.
One way to say it would be, this is not computationnal random from how eradicator says it, this is a physical phenomenon, that computers happens to be sensitive to, if you try hard enough to notice it you will. But it is like if you use a webcam from your computer. It is not the logic that you ask it to execute that is "generating" the random, this "print" an image of the random.
The "proof" would be that this phenomenon wouldn't occur in a deep burried and isolated computer. You would still be able to ask the memory to read the same rows lots of time, but there wouldn't be any side effect, since it relies on an external phenomenon.
Nothing to do with cosmic radiation or any outside effect. It's purely internall. Same goes for generating noise from a webcam. Put black tape in front of the camera and you still get the noise. Put it in a deep cave, still noise. Unplug the microphone from the soundcard, still noise. The noise comes from the diode noise effect in the analog digital converter, not from anything external.
Re: How does uranium processing not cause desync?
I was confused, Rowhammer is not about cosmic rays, "soft memory error" is about cosmic rays.
In wikipedia the two are compared as similar physical phenomenon, Rowhammer would function on an deep burried machine, what you need is the ability to ask for reading the memory a lot, it induce on demand , the same malfunction that could occurs sometimes because of cosmic rays ( AND/OR others causes).
Both are means to interract with the physical computer . It has nothing to do with any mathematical or philosophical concept of the "finite state machine". The conceptual computer that you could do all operation manually on paper. This one you have no way to create soft memory error or Rowhammer.
It is considered to me "external" to the logic of the machine. It is more a malfunction. Contrary to the hardware random number generator, or an algorithm based on lava lamp, or just listening to the soundcard noise. Those are external input that are already random. You can integrate them into a physical device and call the new device a computer on purpose or not. It can happen that your device called computer is in fact a little different than what is a theorical computer. It can also opens the question is it possible to make a physically perfect "finite state machine".
The analog/digital converter is in a way another device than the computer. So is the memory.
If it was only your code that induce the random. Then you would need to induce a random parameter in your code but you can't if you are coding the random parameter itself. ( the egg or the chicken). It is the interaction of the code based on a not perfect machine that creates the random. The imperfections of the machine are not part of the machine as it was intended.
In wikipedia the two are compared as similar physical phenomenon, Rowhammer would function on an deep burried machine, what you need is the ability to ask for reading the memory a lot, it induce on demand , the same malfunction that could occurs sometimes because of cosmic rays ( AND/OR others causes).
Both are means to interract with the physical computer . It has nothing to do with any mathematical or philosophical concept of the "finite state machine". The conceptual computer that you could do all operation manually on paper. This one you have no way to create soft memory error or Rowhammer.
It is considered to me "external" to the logic of the machine. It is more a malfunction. Contrary to the hardware random number generator, or an algorithm based on lava lamp, or just listening to the soundcard noise. Those are external input that are already random. You can integrate them into a physical device and call the new device a computer on purpose or not. It can happen that your device called computer is in fact a little different than what is a theorical computer. It can also opens the question is it possible to make a physically perfect "finite state machine".
The analog/digital converter is in a way another device than the computer. So is the memory.
If it was only your code that induce the random. Then you would need to induce a random parameter in your code but you can't if you are coding the random parameter itself. ( the egg or the chicken). It is the interaction of the code based on a not perfect machine that creates the random. The imperfections of the machine are not part of the machine as it was intended.
Re: How does uranium processing not cause desync?
No, you can not create randomness in an deterministic machine.mmmPI wrote: ↑Wed Jul 03, 2019 1:38 pmI was confused, Rowhammer is not about cosmic rays, "soft memory error" is about cosmic rays.
In wikipedia the two are compared as similar physical phenomenon, Rowhammer would function on an deep burried machine, what you need is the ability to ask for reading the memory a lot, it induce on demand , the same malfunction that could occurs sometimes because of cosmic rays ( AND/OR others causes).
Both are means to interract with the physical computer . It has nothing to do with any mathematical or philosophical concept of the "finite state machine". The conceptual computer that you could do all operation manually on paper. This one you have no way to create soft memory error or Rowhammer.
It is considered to me "external" to the logic of the machine. It is more a malfunction. Contrary to the hardware random number generator, or an algorithm based on lava lamp, or just listening to the soundcard noise. Those are external input that are already random. You can integrate them into a physical device and call the new device a computer on purpose or not. It can happen that your device called computer is in fact a little different than what is a theorical computer. It can also opens the question is it possible to make a physically perfect "finite state machine".
The analog/digital converter is in a way another device than the computer. So is the memory.
If it was only your code that induce the random. Then you would need to induce a random parameter in your code but you can't if you are coding the random parameter itself. ( the egg or the chicken). It is the interaction of the code based on a not perfect machine that creates the random. The imperfections of the machine are not part of the machine as it was intended.
Anyway, factorio has no randomness, only pseudo-randomness based on the seed. So the whole thing got way OT.
- Ranger_Aurelien
- Fast Inserter
- Posts: 170
- Joined: Thu Apr 25, 2019 1:53 pm
- Contact:
Re: How does uranium processing not cause desync?
As far as I recall the only other pseudorandom event in the game is the cooldown between sending out of settlement biters (each time randomly between 4-30 minutes).
https://wiki.factorio.com/World_generator
-
Ranger Aurelien
"Knowledge Brings Fear" -- Motto of Mars University, Futurama
Ranger Aurelien
"Knowledge Brings Fear" -- Motto of Mars University, Futurama
Re: How does uranium processing not cause desync?
I thought that terrain generation and resource generation also used pseudo-random numbers.Ranger_Aurelien wrote: ↑Wed Jul 03, 2019 8:44 pmAs far as I recall the only other pseudorandom event in the game is the cooldown between sending out of settlement biters (each time randomly between 4-30 minutes).
https://wiki.factorio.com/World_generator