Replies: 6 comments 11 replies
-
|
Seeding every time is breaking it. Don't do that. At least not with such a terribly bad seed. Another random source in Berry is |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Do not forget that random is in hi numbers. 52 weeks is no to hi.
How plots looks if generated 100.000 times?
El El sáb, 30 de set. de 2023 a la(s) 20:23, sfromis <
***@***.***> escribió:
… Here's the random numbers drawn in a weekly lotto game in Denmark, year
2021, strictly audited sets of balls for high quality randomness. And a
pretty bumpy ride, just as it should be.
[image: image]
<https://user-images.githubusercontent.com/47082390/271798809-b921e965-fb52-48c2-aca6-abe7d462cb69.png>
—
Reply to this email directly, view it on GitHub
<#19624 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4OKRDQBDC76KBQHILTX5CSXZANCNFSM6AAAAAA5NBMPHY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Here's the code above ported to Berry, without needing to be integrated in the Berry runtime. Doing a speed comparison with math.rand(), a simple loop summing 2000 numbers took 160 ms vs 46 ms on an ESP32-C3. The speed of this should be fine for most purposes. This code can be stored in the Tasmota file system as |
Beta Was this translation helpful? Give feedback.
-
|
Here's a repository https://github.com/dkoneill/millershuffle_berry |
Beta Was this translation helpful? Give feedback.
-
|
I've noticed that, a month ago, there was a "significant update" to the https://github.com/RondeSC/Miller_Shuffle_Algo repo. I've not looked into integrating that in the Berry port, or how beneficial that might be. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
math.rand() in berry appears to not be very good.....
The plot is over 4800 samples.... over a range of 1-198
math.rand was seeded each time
Is there a better random function in Tasmota that can be called from Berry??
random() as used in Arduino, tends to be more uniform... I have NOT tested it on ESP32...
Beta Was this translation helpful? Give feedback.
All reactions