An open API service indexing awesome lists of open source software.

https://github.com/nodesocket/monty-hall-problem-simulation

A simple web-based simulation of the Monty Hall problem
https://github.com/nodesocket/monty-hall-problem-simulation

css html javascript montyhall montyhallproblem

Last synced: about 1 month ago
JSON representation

A simple web-based simulation of the Monty Hall problem

Awesome Lists containing this project

README

          

# Monty Hall Problem Simulation

A simple web-based simulation of the [Monty Hall problem](https://en.wikipedia.org/wiki/Monty_Hall_problem).

*Play at: https://nodesocket.github.io/monty-hall-problem-simulation/*

_Coded with AI assistance from Cursor._

## How to play

1. Open `index.html` in your browser _(or run a local http server)_.
2. Pick one of three cups.
3. The host removes an empty cup.
4. Choose to **stay** with your original cup or **switch** to the other remaining cup.
5. All cups are revealed — see if you found the ball.

## Run locally

```bash
# from this directory
python3 -m http.server 8888
```

Then visit [http://localhost:8888](http://localhost:8888)