Pi Approximation using Monte Carlo

Learning and science

interactive math visualization

SHOW HN2014

39points
55comments
#810of 2,272 in 2014
Top 36%of 2014 by points

How HN took it

CuriousMostly questions and neutral comments

3 positive, 19 neutral or asking, 0 mixed, 4 critical, out of 26 comments about the project. Thread score -0.07.

Idea: 1 for, 2 againstPerformance: 0 for, 2 againstDesign: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Valuable for teaching and education

    From 1 comment
    • Do not underestimate the value of these visualizations. They reach 1000s of kids, students, and who-knows, adults fooling around on Sundays. So, perhaps you can turn this around,…
      MrQuincle on HN

Objections

  • Converges slowly; estimate often far from pi at low iteration counts

    From 2 comments
    • Nice visualization. After playing with it for a while, the number never really converged to Pi. The value even reached 3.135 after 10000 iterations. Do you have any measure how…
      clemsen on HN
    • I got 3.1544 after 10000 iterations, which also didn't match my intuition of how quickly it "should" converge. So I decided to knock up a quick deterministic version in C that…
      Karellen on HN
  • Monte Carlo is an inefficient way to compute pi

    From 2 comments
    • I will never understand why people think Monte Carlo is such a neat solution. There is nothing random about pi. Why didn't you just pick the center of the square, use that to…
      wfunction on HN
    • Monte Carlo methods are never "seriously" used to approximate pi – there are algorithms which converge much, much faster. This here, however, is not a "serious" attempt at…
      adwn on HN

Requests

  • Graph of pi approximation versus n

    From 1 comment
    • Nice visualization! Some UI comments I think the reset button should be smaller (you usually don't want to reset the simulation). I expected that the number in the upper right…
      gus_massa on HN
  • Error estimates or bounds

    From 1 comment
    • Nice visualization! Some UI comments I think the reset button should be smaller (you usually don't want to reset the simulation). I expected that the number in the upper right…
      gus_massa on HN
  • Advanced mode and smaller reset button

    From 1 comment
    • Nice visualization! Some UI comments I think the reset button should be smaller (you usually don't want to reset the simulation). I expected that the number in the upper right…
      gus_massa on HN

Questions

  • Why does the estimate overshoot more than undershoot?

    From 1 comment
    • I notice that it seems to overshoot more than it undershoots. Any idea why this is?
      skykooler on HN
  • How many iterations are needed for stable digits?

    From 1 comment
    • Nice visualization. After playing with it for a while, the number never really converged to Pi. The value even reached 3.135 after 10000 iterations. Do you have any measure how…
      clemsen on HN

Alternatives named

  • Deterministic grid sampling

    From 2 comments
    • I got 3.1544 after 10000 iterations, which also didn't match my intuition of how quickly it "should" converge. So I decided to knock up a quick deterministic version in C that…
      Karellen on HN
    • I will never understand why people think Monte Carlo is such a neat solution. There is nothing random about pi. Why didn't you just pick the center of the square, use that to…
      wfunction on HN
  • Quasi-Monte Carlo with Sobol sequences

    From 2 comments
    • It would be interesting to see how quickly a quasi-random, low-discrepancy sequence converges to PI (e.g. a Sobol Sequence).
      brotchie on HN
    • The comment has a point. It is possible that the particular deterministic rule that chooses points could interact with the shape (quarter circle). In this case, the error would…
      mturmon on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/8159010)