Blog

Simulating the Monty Hall problem on GPU with HIP

A one-day HIP build that brute-forces Monty Hall (N doors) to verify switch vs stay odds at scale.

8 August 2025 · HIP, CUDA, GPU, Simulation, Probability

Why #

I couldn’t sleep and kept thinking about the Monty Hall problem. The next day I wrote a HIP simulation to brute-force it on the GPU and watch the probabilities converge (switch ≈ 66.6%, stay ≈ 33.3% for 3 doors). I generalized to N doors and let the GPU chew through hundreds of millions of trials in seconds.

What I built in a day #

Interesting bits #

Takeaways #