# redward42/montyhallsimulator architecture

> Architecture diagram of the GitHub repository redward42/montyhallsimulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/redward42/montyhallsimulator
- Repository: https://github.com/redward42/montyhallsimulator

## Overview

This repository is a small Monty Hall simulation presented as a Jupyter notebook. The documented workflow is to simulate many games under two strategies—switching or keeping the first choice—and compare their outcomes. The notebook is the only implementation file, so the graph cannot separate internal stages or verify runtime calls beyond what the README states.

Main entry points: [`MontyHall.ipynb`](https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb) (Monty Hall notebook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Game simulation"]
  node_notebook["Monty Hall notebook<br/>[MontyHall.ipynb]"]
  node_switching["Switch strategy<br/>[MontyHall.ipynb]"]
  node_keeping["Keep strategy<br/>[MontyHall.ipynb]"]
  node_results["Simulation outcomes<br/>[MontyHall.ipynb]"]
end

node_user(("User"))

node_user -->|"runs"| node_notebook
node_notebook -->|"simulates"| node_switching
node_notebook -->|"simulates"| node_keeping
node_switching -->|"produces"| node_results
node_keeping -->|"produces"| node_results

click node_notebook "https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb"
click node_switching "https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb"
click node_keeping "https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb"
click node_results "https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_notebook,node_switching,node_keeping,node_results,node_user toneBlue
```

## Components

### Game simulation

- [Monty Hall notebook](https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb): `MontyHall.ipynb`
- [Switch strategy](https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb): `MontyHall.ipynb`
- [Keep strategy](https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb): `MontyHall.ipynb`
- [Simulation outcomes](https://github.com/redward42/montyhallsimulator/blob/main/MontyHall.ipynb): `MontyHall.ipynb`

### Other components

- **User**

## Connections

- User → Monty Hall notebook: runs (evidence: `README.md`)
- Monty Hall notebook → Switch strategy: simulates (evidence: `README.md`)
- Monty Hall notebook → Keep strategy: simulates (evidence: `README.md`)
- Switch strategy → Simulation outcomes: produces (evidence: `README.md`)
- Keep strategy → Simulation outcomes: produces (evidence: `README.md`)
