### Author Topic: montecarlo simulator to generate numbers stream.  (Read 4429 times)

0 Members and 2 Guests are viewing this topic.

#### Bayes

• Veteran Member
• Posts: 688
• Thanked: 562 times
• roulettician.com
##### Re: montecarlo simulator to generate numbers stream.
« Reply #30 on: March 12, 2017, 11:00:26 AM »
Hi. I'm interested in rng.
Requirements:
1. Generation of number stream with given haracteristics.
" number stream" - list of numbers as they come up. You can often see these on roulette boards.
" haracteristics " just mean that some numbers will have more apiarences then others.
2. Posibility to manually specify how many times each number is populated in the sample.
" sample" - numbers stream generated.
If you can manage that, please say so. I do not mind to pay for your time.

Mr P, I'm not sure if this is exactly what you had in mind, and I know this is an old thread, but I've written a little command line program which generates a file of numbers with any bias you specify. I thought it might be interesting to play around with "what if" scenarios. I just happened to see this thread (which I missed when it was written) and thought I'd share the program.

At a windows command line, you just need to type the name of the program (bwg.exw = 'Biased Wheel Generator') followed by

1. The number of spins required.
2 A sequence of pairs of values which specifiy which number has a bias, and what that bias is.

Example: To generate 10000 spins in which # 34 has a probability of 3.4% of hitting, and also # 12 has a probability of 3.7% of hitting, you would type this:

Code: [Select]
`bwg.exe 10000 34=3.4 12=3.7`A file named 'spins.csv' will be saved in the current directory.There must be at least one space between each of the parameters. Obviously you can specify as many numbers as you like up 37.
Note that the highest 'resolution' of the probabilities you enter are 0.1 of a percentage point (so putting 34=3.423 won't take into account any decimal places beyond the first).

If you run the program without any n=p parameters (just the number of spins), then each number will be equally likely, i.e. an unbiased wheel.

Here's a bar chart of the spins generated from the above command, where you can clearly see the biased numbers:

Enjoy!

The following users thanked this post: Reyth

#### Reyth

• Global Moderator
• Hero Member
• Posts: 4065
• Thanked: 1352 times
##### Re: montecarlo simulator to generate numbers stream.
« Reply #31 on: March 12, 2017, 11:15:02 AM »
I put 1 black chip on 12 Red and 34 Red each!

#### MrPerfect.

• Hero Member
• Posts: 1463
• Thanked: 839 times
##### Re: montecarlo simulator to generate numbers stream.
« Reply #32 on: December 09, 2017, 03:32:06 AM »
Thank you Bayes, l will try it soon.
Only discovered it now...
Hope to see you back someday.

The following users thanked this post: Reyth

#### dobbelsteen

• Hero Member
• Posts: 1543
• Thanked: 528 times
##### Re: montecarlo simulator to generate numbers stream.
« Reply #33 on: December 09, 2017, 09:27:38 AM »
A biased random sequence creates by a pseudo RNG.

column A
A1= asellectbetween (0;37)

Column B

B1= IF(A1=37;10;asellectbetween (0;36))

In this case the random sequence 0-36 of column B has a biased number 10 with a higher probability.

The following users thanked this post: Reyth

#### MrPerfect.

• Hero Member
• Posts: 1463
• Thanked: 839 times
##### Re: montecarlo simulator to generate numbers stream.
« Reply #34 on: December 14, 2017, 03:24:10 AM »
Thanks Bayes, it works and gives interesting results.

The following users thanked this post: Reyth