4 ms·
"I spent a few hours hacking together a little rails app which would play out 100,000 rolls in a few seconds and tell me the chances of everything coming up. "
by DividesByZero 14y ago
"I spent a few hours hacking together a little rails app which would play out 100,000 rolls in a few seconds and tell me the chances of everything coming up. "
Why did the author write a rails app to run statistical experiments on what are easy to calculate probabilities? It seems that if you want to make a probability based game you ought to have at least a working knowledge of the basics.
- tantalor 14y agoMaybe the rules are too complex to work out the probabilities directly. For example, landing on each property in Monopoly. The real question is why write a rails app? How does a web application framework help you roll dice?
- p0ckets 14y agoActually, it's pretty simple to use Markov chains to calculate the expected time spent as each property in Monopoly.
- DividesByZero 14y agoI can forgive that - I often accidentally say 'rails' when I mean ruby as well.
- sim0n 14y agoExcept this is a Rails app, not just Ruby.
- steveklabnik 14y ago> How does a web application framework help you roll dice? Many games also include an online component. This can easily just be the start of a new product...
- Torrents 14y agoMaybe because that makes it easier to put it online and link to it from a blog post, and raise awareness of the game. Blog posts can be both useful for other entrepreneurs as well as great marketing.
- patio11 14y agoThe rules require knowledge of the dice' relative orientations in meatspace and I believe subsequent rolls in a turn exhibit memory (dice are not equivalent), which makes the conditional probabilities substantially more difficult than a Monte Carlo simulation.
- DividesByZero 14y agoUnless the script simulated dice orientation, I don't think it would help any there. Having read the rules of the game I think there's still a pretty good closed-form solution, minus the dice orientation stuff, that wouldn't take a lot of work to find. Or better yet you could write a script to compute exact probabilities!
- sequoia 14y ago> It seems that if you want to make a probability based game you ought to have at least a working knowledge of the basics. People have been making games of chance since long before advanced mathematics. Being a statistician doesn't necessarily mean you can design a great game - the opposite holds as well.
- DividesByZero 14y agoThat's true, but I'm sure it would have helped while the author was trying to balance the game out to better understand the sources of particular imbalances, rather than having to guess-and-iterate on them.
- padraigm 14y agoThe guess-and-iterate method would still be more efficient than trying to work through a stats textbook if the author is not educated in mathematics, though. Anyway, a lot of people don't enjoy learning math (crazy as that concept may seem to me, and, I guess, you) but guessing-and-iterating on a game you're excited about would always be fun.
- DividesByZero 14y agoVery fair. I guess more maths isn't always better after all.
- heironimus 14y agoBecause people who get stuff done typically use whatever they know and make it work "good enough" while people who don't get things done (like me too often) spend their time thinking about the proper language, statistics, probability, and the like.
- incision 14y ago>Why did the author write a rails app to run statistical experiments on what are easy to calculate probabilities? Perhaps it's along the same lines as the physical prototype he made prior to that. "It really helped to make a prototype, as I could actually play the game rather than everything being hypothetical." Building the app seems like perfectly logical extension of that. >It seems that if you want to make a probability based game you ought to have at least a working knowledge of the basics. Yet here he is with a fully finished product in spite of that notion. He wanted to make a game, he made a game using the tools he was aware of and comfortable with.
- Falling3 14y agoProbably because he was able to do it extremely quickly and have something more visual to use. People sometimes like that ya know.