The initial position of the marbles is called the "seed." The seed is used to create the randomness. To come up with the seed some programs use time of day, while others convert background noise into a number.