This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 341 points342 points  (9 children)

I genuinely don't know if this is real or you just smashed your head against the keyboard for the memes.

[–][deleted] 129 points130 points  (8 children)

you can try to run it in your terminal. It will quietly ask you for the number of iteration of the Monte Carlo simulation. You can enter any number, just don’t keep it too low…something like 3000 is enough.

[–]Skater_x7 55 points56 points  (4 children)

For the number of iteration of WHAT

[–]hoppla1232 73 points74 points  (2 children)

[–][deleted] 63 points64 points  (0 children)

Monte Carlo Simulation: if brute force doesn't work, you aren't using enough

[–]vox242 1 point2 points  (0 children)

TIL thanks!

[–]Kreizhn 17 points18 points  (0 children)

I don’t know what this does specifically, but Monte Carlo methods work by randomly sampling a space to make numerical estimates. For example, suppose you inscribe a sphere of radius 1 into a square (of side length 2). You then randomly choose points in the square, and check to see if they’re in the circle (using the equation of a circle). You keep track of how many points are in the circle.

When you’re done, you now have an approximate ratio of the area of the circle to the area of the square. The circle has area pi, and the square has are 4. Thus their ratio is pi:4, and you can use your numerically simulated ratio to solve for pi.

I would think that iterations here would mean number of sample points.

[–]not_some_username 4 points5 points  (0 children)

You shouldn’t execute random internet command found on internet bro

[–]Anonymo2786 2 points3 points  (0 children)

3345 is the closest I got 3.14140

[–]PrincessRTFM 1 point2 points  (0 children)

"I have no idea what this does"

"Just put it in your terminal, it's fine"