Controlling Resource Flow

From MachinationsWiki
Jump to: navigation, search

Previous: Flow of Information, next Four Economic Functions


Pools are not the only possible nodes in a Machinations diagram. Gates are another type of node. In contrast to a pool a gate does not collect resources, instead it immediately redistributes them. Gates are represented as diamond shapes that often have have multiple outputs (see the diagram below). Instead of a flow rate, each output is labeled with a probability or a condition. The first type of outputs are referred to as probable outputs while the other are referred to as conditional outputs. All outputs of a single gate must be of the same type: when one output is probable, all must be probable and when one output is conditional, all must be conditional.


Probabilities can be represented as percentages (for example '20\%') or weights indicated by single numbers (for example '1' or '3'). In the first case a resource flowing into a gate will have a probability equal to the percentage indicated by each output, the sum of these probabilities should not add up to more than 100 percent. If the total is less than 100 percent there is a chance that the resource will not be sent along any output and is destroyed. In the latter case the chance that a resource will flow through a particular output is equal to the weight of that output divided by the sum of the weights of all outputs of the gate. Gates with probable outputs can be used to represent chances and risks. For example, in Risk players risk armies in order to gain territories. This type of risk can easily be represented by a gate with probable outputs indicating the rates for success or failure.

An output is conditional when it is labeled with a condition (such as '>3' or '==0' or '3-5'). In this case, all conditions are checked every time a resource arrives at the gate and one resource is sent along every output whose condition is met. As the conditions might overlap this can lead to duplication of resources, or, when no condition is met, to the destruction of the resource.

Like pools, gates have three activation modes: gates can be passive, interactive or automatic. Interactive gates also have a double outline and automatic gates are also marked with a star. When a gate has no inputs, it triggers every time it fires, this way gates can be used to produce triggers either automatically or in response to player actions.

Furthermore, gates have one of two different distribution modes: deterministic distribution and random distribution. A deterministic gate will distribute resources evenly according to the distribution probabilities indicated by percentages or weights if it has probable outputs. When it has conditional outputs it will count the number of resources that have passed through it every time step and uses that number to check the conditions of its outputs (it can be convenient to think of a deterministic gate with conditional outputs as 'counting gate'). A deterministic gate has no special symbol and is represented as a small open diamond.

A random gate generates a random value to determine where it will distribute incoming resources. When it has probable outputs it will generate a suitable number (either a value between 0 and 100 percent, or a number below the total weights of the outputs). When its outputs are conditional it will produce a value between 1 and 6 to check against the conditions, just as if the diagram rolled a normal six-sided die. Random gates are marked with a dice symbol.

Gates might have only one output. Gates with one output act exactly the same way as gates with multiple outputs. The gates on the middle row of figure above will (from left to right) randomly let 30 percent of all the resources pass, immediately pass the resource to the output regardless of the output's flow rate, and let only the first two resources pass.

All output state connections from a gate are as triggers; gates do not accumulate resources and therefore label modifiers, node modifiers and activators originating from a gate have no function. The triggers are activated instead of redirecting resources. These triggers can also be conditional or probabilistic. In this way gates can be used to control the flow of resources:


Previous: Flow of Information, next Four Economic Functions