image.png

Category: Math Kind: Operation Tags: Dice, Seed Description: Get a random item from a list

<aside> 💡

Random numbers generated by computers are not truly random, but rather pseudo-random. They are produced by algorithms that, while appearing random, are deterministic and predictable. This means the same algorithm will generate the same sequence of numbers if given the same starting conditions.

In random number generation, a seed is a starting number used to initialize a random number generator (RNG). It's essentially a point within a predetermined sequence of "random" numbers where the generator starts producing values.

</aside>

Inputs

Name Abbreviation Type Access Description
List L Any List The list to get the item from
Seed S Number Item The seed for the random number

Outputs

Name Abbreviation Type Access Description
Value V Any Item The random item

How to

  1. Feed in a list

    1. You could use the result of any node the produces or processes a list, such as map, Filter, encapsulate in list, etc
    2. Or, you can manually create a list using a panel
  2. Feed in a number for the seed

    1. This could be the a numeric result of another node
    2. Or, you can use a number node
    3. Or, you can type numbers into the boxes
    4. If you need to process multiple numbers in a list, use the map node
  3. The result is a random item in the list

    <aside> 💡

    The random list item is selected by the node producing a random integer, representing the index in the list on the item.

    </aside>