4 ms·
I love small simulations like this, but I find tiresome writing all the scaffolding to summarize the results. So I wrote this Python module: https://github.com
by BoppreH 5y ago
I love small simulations like this, but I find tiresome writing all the scaffolding to summarize the results. So I wrote this Python module:
https://github.com/boppreh/carlo https://github.com/boppreh/carlo
pip install carlo
carlo "d(20)+randint(2, 5)+int(random()*20)"
This will continually generate samples and show them in a self-updating histogram.
This is harder than it looks, because there's too many samples to store them all, and we don't know the range of values at start. But I'm quite happy with the results.
- ImaCake 5y agoThat is pretty neat! I have a dice stats python script I use specifically for DnD. It has command line flags and basically the same syntax as the discord dice bot. Very useful when you are considering strategy, even though my group plays fast and loose with the DnD rules.