Roulette
Designed by | RainbowDash |
---|---|
Appeared in | 2025 |
Memory system | Seeded Random Number Generators |
Computational class | Unknown |
Reference implementation | Unimplemented |
File extension(s) | .roll |
This is a proof of concept article, so this is not fleshed out fully or written in proper manners.
Roulette is a programming language, where you can append wheels onto an imaginary rod.
A wheel is a seeded random number generator, that has a starting seed as well as a output display. A wheel can be spun, which correlates to the random number generator generating the next term in the sequence, then that is what is displayed. Upon creation of a wheel it will need a seed and the set of all possible outputs from the wheel. Once the wheel has those it will spin once to generate the first value for the display, then later you can change the seed of the wheel but that wont initiate a new spin until you decide to spin it again.
Each time you reset the seed, it will generate the same sequence of numbers each time. We can abuse this fact to produce reliable outputs every time.
For example if you create a wheel with the output space [0,1,2,3,4,5,6,7,8,9] and the seed 3656. Then at the start if you spin it.
- 0 times you get 0
- 1 times you get 1
- 2 times you get 8
- 3 times you get 4
- 4 times you get 2
- 5 times you get 6
- 6 times you get 7
- 7 times you get 3
- 8 times you get 9
- 9 times you get 5
Now you have a way to set a wheel to a guaranteed symbol every time.
then you can create a function mapping of how much to spin based on what symbol you have.
incrementFunc = [1,4,7,3,9,5,6,2,8,0]
this says, if you have the 0th symbol of the output space, then spin it 1 times. if you have the 1th symbol of the output space spin it 4 times etc etc.
Once you have that, you can now start working with conditionals and loops you can do
incrementFunc = [1,4,7,3,9,5,6,2,8,0] ones = 3656, [0,1,2,3,4,5,6,7,8,9] tens = 3656, [0,1,2,3,4,5,6,7,8,9] while (tens not 9) and (ones not 9): if(ones == 9): incrementFunc(tens) incrementFunc(ones) print(tens,ones)
to count from 00 to 99.
Now obviously you have to find the mappings, but once you find the mappings of a symbol set then it is smooth sailing from there. And you can use the mappings for other functions other than incrementing you could find a XOR gate and do boolean logic, or functions for other symbol sets, it is truly up to you.
Specification
You can set a wheel symbol to a have a space as a symbol like this
Spaceful = 123, [ , ,hi, ]
To print a string you can just do
printstring = 123, [hello]
print(printstring)
to spin you can do
spin(ones)
inorder to set a seed do
ones.reseed(3531)
I will probably change the syntax to not represent python so much. But the random number generator being used is pythons random number generator, just generate an int between 0 and the length of the symbol output space and select the symbol that falls on that index.