Brief
Some odds you can work out exactly by counting. Others are easier to estimate by playing the game a million times on a computer. This project does both for the same questions and checks that they agree. That habit, an exact answer next to a simulation, is how you catch bugs in either one.
Poker is pure counting. There are = 2,598,960 five-card hands, each equally likely, so the chance of a hand class is its count divided by that total. Monopoly is harder because where you land depends on where you are. It is a Markov chain: a 40 × 40 matrix where is the chance a turn takes you from square to square . The long-run share of time on each square is the vector with , which you already know how to find with power iteration.
The simulation side is Monte Carlo: use a pseudo-random number generator to roll dice and deal cards, then count. An estimate of a probability from independent trials has standard error . To halve the error you need four times as many samples. Successive Monopoly turns are not independent, so the real error is a little larger, which is one reason to simulate many separate games.
DATA · game rules
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Every Monopoly square's simulated probability is within 0.5% (relative) of the exact Markov-chain value. Record the worst one with `python tools/mlarena.py record BM-23 "<max relative error>"`.
- Your poker counts match the known table (for example 3,744 full houses and 5,108 flushes) and sum to 2,598,960.
- The error plot shows the error falling like one over the square root of the number of samples.
Side quests
Terms in plain words
- Monte Carlo
- Estimating a probability or an average by running a random experiment many times and counting what happens.
- Pseudo-random number generator
- A deterministic algorithm that produces numbers that look random. The same seed always gives the same sequence, which makes runs repeatable.
- Standard error
- The typical size of the gap between a Monte Carlo estimate and the true value. For a probability p from n trials it is the square root of p(1 − p)/n.
- Markov chain
- A process where the next state depends only on the current one, described by a matrix of move probabilities.
- Stationary distribution
- The long-run share of time spent in each state. It is the left eigenvector of the transition matrix with eigenvalue 1.