3SIMULATE THE REAL WORLD

Image

Computer simulations are programs that use randomness to simulate real-world events and processes. More specifically, computer simulations manipulate models, programmatic stand-ins for the real world.

We’ll begin this chapter by defining what a model is. Then we’ll get our feet wet with two straightforward simulation examples: estimating π by throwing darts and gathering people together in a room to estimate the probability that at least two of them share a birthday. Once we’ve done that, we’ll wade in further to explore Darwinian evolution via simulation, capturing essential characteristics of natural selection and genetic ...

Get The Art of Randomness now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.