Difference between revisions of "Randomizer"

From StarMade Wiki
(created page)
 
(Expanding slightly, clarifying some details.)
Line 1: Line 1:
 
{{infobox block/Randomizer}}
 
{{infobox block/Randomizer}}
'''Randomizers''' are logic circuit blocks that as its name suggests will randomly output a logic signal when it receives a high signal (On).
+
Randomizers are logic blocks which have a 50% chance to change state when given a [[Logic Signals|logic signal]]. They can be used in series or parallel to create more complex probabilities.
  
 
==Item Description==
 
==Item Description==
Line 8: Line 8:
  
 
==Usage==
 
==Usage==
Randomizers are a unique logic block as it is the only one whose state is intended to be unstable. When it is connected to another logic block any logic signals that the randomizer receives has a 50% chance to change the block's state. This behavior is intended to allow players to create circuits that require random outputs. Much like the [[Button]] before it, Randomizers are single block condensations of much larger and more elaborate circuits.
+
Randomizers function in a similar manner to [[Flip Flop]]s, in that when on, they remain on until caused to change state again. The key difference, of course, is that a Randomizer will not always change state when given an input. The chance, per input, of a Randomizer changing state is 50%. It is relevant to note that, for a Randomizer, an "input" actually constitutes any change in state of a block which is linked to it, ''not'' just high signals. This means that a [[Button]] produces two inputs to a Randomizer; one when the Button is activated, one when it turns off again.
  
While a single randomizer can lower the chances of a signal being sent players can do some additional work to alter those chances even further. Connecting several randomizers to an [[AND-Signal]] will dramatically decrease the chances of a signal being outputted. This is because all connected randomizers will need to output a signal at the same time in order for the AND gate to change its state and also output a signal. On the other end of the spectrum connecting randomizers to an [[OR-Signal]] will increase the odds. The idea is the opposite of the AND gate in that as long as one randomizer is outputting a signal then the OR gate will do so also.
+
While a single Randomizer has a constant 50% chance of changing state, more complex probabilities can be created by linking many Randomizers to a single logic gate.  
 +
 
 +
Connecting several Randomizers (all with the same input) to a single [[AND-Signal]] should result in an output probability (from the AND-Signal) of ('''P''' = '''0.5'''^'''n'''). For the AND-Signal to activate, of course, all of the Randomizers must turn on simultaneously; this behavior can be reasonably compared to multiplying along the branches of a probability tree to find the probability of a particular outcome (''Disclaimer: the exact behaviors of Randomizers are not yet fully tested, and this analogy may prove incorrect'').  
 +
 
 +
Conversely, linking many Randomizers to an [[OR-Signal]] will result in an increased chance of activation. Since the OR-Signal will turn on when ''any'' Randomizer activates, the probability of an output is much higher than the same circuit using an AND-Signal. Although this probability may approach 1, it is not known if any configuration will result in the OR-Signal always activating (creating such a circuit would be redundant, regardless of its possibility). There is no current analysis of how the output probability of this kind of circuit might be measured.
 +
 
 +
Increasingly complex probabilities can be created by combining various layers of these two circuits, in varying proportions.
 
[[Category:Logic]] [[Category:General]]
 
[[Category:Logic]] [[Category:General]]

Revision as of 13:05, 14 October 2016

Randomizer
Randomizer.png
Hit Points15
Armor0.0%
Mass0.01
Luminositynone
Data Value (ID)979

Randomizers are logic blocks which have a 50% chance to change state when given a logic signal. They can be used in series or parallel to create more complex probabilities.

Item Description

"This block produces random results when activated. Each time it receives any signal (true or false) it changes it’s state by a 50:50 chance."

Production

Production Info
Produced in a Standard Factory Standard Factory.png
RequiresTo create
Alloyed Metal Mesh
x2
Alloyed Metal Mesh.png Randomizer
x1
Randomizer.png
Crystal Composite
x2
Crystal Composite.png

Usage

Randomizers function in a similar manner to Flip Flops, in that when on, they remain on until caused to change state again. The key difference, of course, is that a Randomizer will not always change state when given an input. The chance, per input, of a Randomizer changing state is 50%. It is relevant to note that, for a Randomizer, an "input" actually constitutes any change in state of a block which is linked to it, not just high signals. This means that a Button produces two inputs to a Randomizer; one when the Button is activated, one when it turns off again.

While a single Randomizer has a constant 50% chance of changing state, more complex probabilities can be created by linking many Randomizers to a single logic gate.

Connecting several Randomizers (all with the same input) to a single AND-Signal should result in an output probability (from the AND-Signal) of (P = 0.5^n). For the AND-Signal to activate, of course, all of the Randomizers must turn on simultaneously; this behavior can be reasonably compared to multiplying along the branches of a probability tree to find the probability of a particular outcome (Disclaimer: the exact behaviors of Randomizers are not yet fully tested, and this analogy may prove incorrect).

Conversely, linking many Randomizers to an OR-Signal will result in an increased chance of activation. Since the OR-Signal will turn on when any Randomizer activates, the probability of an output is much higher than the same circuit using an AND-Signal. Although this probability may approach 1, it is not known if any configuration will result in the OR-Signal always activating (creating such a circuit would be redundant, regardless of its possibility). There is no current analysis of how the output probability of this kind of circuit might be measured.

Increasingly complex probabilities can be created by combining various layers of these two circuits, in varying proportions.