4 ms·
“… try to generate a table of how likely it was to get various dice rolls when you rolled 4 6-sided dice and took the top 3.” I felt the urge to code this. Her
by roryokane 14y ago
“… try to generate a table of how likely it was to get various dice rolls when you rolled 4 6-sided dice and took the top 3.”
I felt the urge to code this. Here is the result: https://gist.github.com/2899137 https://gist.github.com/2899137. It doesn’t tell you “likelihood of various dice rolls”; it can either print out the rolls for each trial or tell you how common each of the 6 numbers were in all the rolls.
- ihodes 14y agoThat's simulating the answer; you can get an exact answer without using a computer.
- roryokane 14y agoThat’s true. But I thought doing it by hand would require writing a tediously large table because you have 6^3 possible roll results to give the probability of, if you were actually going to write the “likelihood of various dice rolls”. I suppose the appropriate compromise is a symbolic manipulation program like Mathematica, which can work with exact numbers easily while automating the creation of the table. (If anyone can explain the problem, it would be great if they could link to a document demonstrating the solution on somewhere like http://www.mathics.net/ http://www.mathics.net/ .) Or is there an easier, simpler way to solve this by hand?
- btilly 14y agoThere are 6^4 possible rolls. But you don't need to list them all. You can take shortcuts. After doing it by hand, I became interested in how I could do it by computer... :D
- Avshalom 14y agohttp://anydice.com http://anydice.com is pretty much your one stop shop anytime this comes up. It's pretty much the greatest thing ever if you're a P&P RPGer. in this case: output [highest 3 of 4d6]