[Coco] AM Radio to CoCo Cassette Port to Random Number Generator Software

Alex Evans varmfskii at gmail.com
Sat Apr 4 09:35:34 EDT 2020


I don't see how you get that conclusion. All I see is unequal probability,
and possibly an issue with oversampling. How often are you taking the
readings? A signal from an AM radio (static or no) is going to be band
limited. Look at the samples no more that 1000 times a second and look at
the correlation between samples, not their frequencies. If you become value
nine times out of ten and another one time in ten at random, it is still
random.

On Fri, Apr 3, 2020, 18:12 Melanie and John Mark Mobley <
johnmarkmelanie at gmail.com> wrote:

> I tuned the AM radio to static.
> I had the program generate 16-bit numbers.
> I counted how many time it registered 65535, 65534, 65533, 65532, 3, 2, 1,
> and 0.
> This is the results.
> Total numbers generated: 129,073
> 65535) 0
> 65534) 0
> 65533) 0
> 65532) 0
> 3) 29
> 2) 173
> 1) 198
> 0) 1423
>
> So 1423 times out of 129,073 the random number was 0.
>
> You can make a histogram with these results.
>
> I take these results to mean that the program is more likely to produce a
> string of consecutive 0s then consecutive 1s.
>
> So it looks like talk radio gives better results than static.
>
> So sampling the cassette port is not a very good way to get random numbers.
>
> I think playing the audio into the joystick port (or an analog-to-digital
> port) would work better.
>
> -John Mark Mobley
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list