Ok, so after looking through different tutorials, I found out pandas is way easier to handle then SQL.
So for the first step in that machine learning experiment from the last post, I came up with this little piece of code.
It uses random/randomint and pandas as import.
Resources and references are in the code comments.
As always, drop me a comment, hate it, love it, what to improve.
Next step is to get this rolling with more math involved and a bigger sets of probability data to store.
Adding an 'old_odd_probability' and 'old_even_probability' would probably be the next step toward getting that bayes to interpret a bigger picture of when and how random chooses it's *random integers*.
For example, to use the water droplet example from Jurassic Park (assuming you repeat the experiment 5 times)...
The red text console.logs were for debugging, and will take over the animation if the comments are removed.
The bold red number is the point at which the loop stops. My CPU didn't have too much trouble with that large number, but I'd recommend dialing it down if your CPU is slow.
Also if your CPU is really fast, you'll have to change the pause to something much lower to see the animation better. That too is in a loop, so the more that pause happens, the more loops your CPU is running.