Screw the determinacy, it's the age of quantum / Random Combinator

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
EditorRUS
Fast Inserter
Fast Inserter
Posts: 118
Joined: Sat Feb 23, 2013 10:32 pm
Contact:

Screw the determinacy, it's the age of quantum / Random Combinator

Post by EditorRUS »

Long story short, there are no measurable sources of chaos in game. The only real (relatively) random thing I can think of is map generation. Everything else seems to be deterministic. I am not exactly sure whether biters attack are deterministic or not, but nevertheless it's ridiculously difficult to create a random cell out of biters and not to mention unreliable.

So the suggestion is to add a random combinator that would output a random number from 0 to 2^16-1 each tick.

Why? Because some combinator contraptions require those and there is no real way to add them to the game aside from mods.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Screw the determinacy, it's the age of quantum / Random Combinator

Post by Rseding91 »

It would still be deterministic.

Everything in the game except user-input is deterministic. That's how MP works.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Screw the determinacy, it's the age of quantum / Random Combinator

Post by Adil »

You might want to look up on how pseudorandom generation works. And what exactly is that "random" you are talking about.
Here's link to the most basic generator, that can be implemented with currently available facilities.
And here are blueprint strings of implementations.
once per second 1 to 253
Requested one 7 combinators
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

EditorRUS
Fast Inserter
Fast Inserter
Posts: 118
Joined: Sat Feb 23, 2013 10:32 pm
Contact:

Re: Screw the determinacy, it's the age of quantum / Random Combinator

Post by EditorRUS »

It would still be deterministic.
You might want to look up on how pseudorandom generation works. And what exactly is that "random" you are talking about.
Yeah, yeah, I know that. I didn't use word "pseudorandom" for convenience.
Here's link to the most basic generator, that can be implemented with currently available facilities.
This generator requires someone to input a seed value and perhaps a multiplier and modulus. Which basically means that the results will be reproducible if the three are known.
While you can say it's "random", it's not "random" enough because the generator is essentially a white box for everyone.
Everything in the game except user-input is deterministic. That's how MP works.
It appears to me that most (if not all) calculation are done on host's computer.
For the most part internal CPU clock is unpredictable enough to be used for a pseudorandom generator. In fact, I believe that's what it used in most pseudorandom number generators as a seed value.
Also, Factorio uses quite a lot of CPU and CPU usage is somewhat unstable so it makes it even better.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Screw the determinacy, it's the age of quantum / Random Combinator

Post by orzelek »

EditorRUS wrote:
It would still be deterministic.
You might want to look up on how pseudorandom generation works. And what exactly is that "random" you are talking about.
Yeah, yeah, I know that. I didn't use word "pseudorandom" for convenience.
Here's link to the most basic generator, that can be implemented with currently available facilities.
This generator requires someone to input a seed value and perhaps a multiplier and modulus. Which basically means that the results will be reproducible if the three are known.
While you can say it's "random", it's not "random" enough because the generator is essentially a white box for everyone.
Everything in the game except user-input is deterministic. That's how MP works.
It appears to me that most (if not all) calculation are done on host's computer.
For the most part internal CPU clock is unpredictable enough to be used for a pseudorandom generator. In fact, I believe that's what it used in most pseudorandom number generators as a seed value.
Also, Factorio uses quite a lot of CPU and CPU usage is somewhat unstable so it makes it even better.
Each map has a seed. You can even enter it by hand on map settings screen. Thats the seed for the random number generator for the whole game.
Usually things like additional modulo's etc are set based on required properties of the random number generator so they are constant.

So one number generator for whole map can be used on any machine and it results in "predictable" random numbers used through the game.

Each machine in multiplayer does it's own simulation - due to sheer amount of data thats processed per tick it would be simply impossible to send all the changes through the network for every tick.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Screw the determinacy, it's the age of quantum / Random Combinator

Post by Adil »

EditorRUS wrote:This generator requires someone to input a seed value and perhaps a multiplier and modulus. Which basically means that the results will be reproducible if the three are known.
While you can say it's "random", it's not "random" enough because the generator is essentially a white box for everyone.
What are you even trying to do? Implement bitcoin inside factorio?

On the other hand, I guess this addition is not something that would make game worse.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Post Reply

Return to “Ideas and Suggestions”