nature-of-code / The-Nature-of-Code-archive

The very first build system for The Nature of Code

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro.5: Monte Carlo vs Accept-Reject

ybakos opened this issue · comments

Just my opinion, but I think that renaming the montecarlo function in the text to something more akin to acceptReject better reflects the specific algorithm used. As a reader, digging into Monte Carlo after seeing the function does indeed lead me to investigate methods that use random numbers to observe phenomena, it is a deep and broad topic. The specific implementation, your description in the video, and exercise I.6 are all aligned with the idea of using functions that determine the accept-reject threshold for a "rejection sampling" approach. http://en.wikipedia.org/wiki/Rejection_sampling

yes, this makes total sense. thank you. I will revisit when I do the next big round of updates.

also agree, this was slightly surprising. Some research did clear it up, but renaming may prevent some initial confusion.

Changed in the next edition.