Fork me on GitHub
#off-topic
<
2022-02-13
>
Stuart21:02:35

I wrote some code to generate a deck of cards, shuffle it, then find the last ace (or last 2, last 6 etc) in the deck. Ran it a million times to see what the most likely last position was (I know it's the last card, but couldn't really get my head around it intuitively, so wrote some code to confirm what I was reading was correct). This is one run looking for last ace (graphed in Reveal), found the distribution curve really pleasing 🙂 One run in the million had the aces in position 1, 2, 3 and 4!

nice 5
p-himik22:02:13

That is a nice plot indeed.

Colin P. Hill13:02:07

What did you use to graph it? I write monte carlos like this all the time for similar reasons, but never got around to hunting for a good visualization tool

Stuart14:02:20

This was using the clojurr repl reveal. It's just built into reveal to graph scatter and line charts, and other cool features. https://vlaaad.github.io/reveal/

thanks3 2