Fork me on GitHub

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

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


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

thanks3 2